text:
Memory leak when executing HTTP.request(...)

Hello,
I found a severe memory leak when using ClientRequest class from KituraNet. Executing just 300 requests leaked around 45MB of memory 0_0. From what i see the main leaks happen when opening curl session, but I'm no leak-finding expert.
Steps to reproduce:
import KituraNet // 0.19.0

for i in 1..<1000 {
  let request = HTTP.request("https://google.com") {
    response in
    print(response?.statusCode)
  }
  request.end()
}

I have only tested this on OSX, can somebody( @djones6 , @ianpartridge ?) please confirm the same happens on Linux? I have no knowledge of Linux profiling tools.

Thanks for the report, @michalkalinowski-. @djones6 is on holiday at the moment. I'll take a look at this and try and reproduce the issue. I know @djones6 was using massif on Linux for his earlier heap profiling work.

I believe this has been fixed, @ianpartridge can you confirm?

I still see this issue using Kitura-net-0.26.0 on OSX

Thanks Michal, we'll take another look.

@michalkalinowski- The commit above fixes this for me. Thank you for reporting this!

Progress update:  there is a memory leak in the error path in ClientRequest.end() where the ClientResponse has a strong reference cycle with the HTTPParser which is never broken (similar to the one seen in #655).
Fixing this resolves the significant leak which you would experience if repeatedly issuing a request to a URL that fails.  I've pushed a fix to the Kitura-net issue_548 branch.
A second leak remains and seems to be related to strings passed to CCurl (such as headers and the request URL). From a first look, everything seems to be in order in terms of the curl cleanup functions being called in the right places, so I need to look closer.

After discussion we don't currently plan to pursue the remaining leak, as this code is going to be deprecated in favour of Kitura-Request anyway.  Closing this issue.

authors: dfirsht djones6 ianpartridge michalkalinowski-

repo: IBM-Swift/Kitura


text:
Clarifying SSL setup on Linux vs MacOS

Hey y'all, I have a question about setting up an SSL server.
I have everything working a-ok on MacOS, where the only option is to use a chain file. The odd thing is that while I was unable to get it working with a .pem file (perhaps because mine aren't passworded and the code path seems to fail if a password isn't specified), I was able to get it working using .pfx files I converted from my authority assigned .pems (from Let's Encrypt).
When I switch to Linux, however, neither using this path with .pfx files or .pems nor using the Linux specific SSLConfig.inits (such as in the example found here seem to work. The server silently does not report any failure with my keys, however any client that attempts to connect via TLS/HTTPS is sent back a HTTP response.

Hi @yoiang I have similar question, but regarding macOS.
Why we can't use here configuration like on linux - with cert and key?

Hi @yoiang
The underlying library to enable SSL/TLS on Kitura is OpenSSL on Linux and Apple Secure Transport on macOS. This was done so that the framework integrates with native libraries and no additional packages need to be installed. However what this means is that there are slight differences in behavior depending on platform.
One of these differences is the certificate format. OpenSSL accepts many types of certificate format, including PEM, whilst Secure Transport is limited to PKCS#12 (.pfx). That is why you can only do .pfx on macOS. Note that you can do both self-signed and cert chain in both PEM or PFX format.
Your second question is not completely clear to me. Can you give me a bit more info please?
Feel free to have a look at my SSL example with all different types of certificate configurations here: https://github.com/gtaban/SSLExample
More details on blog:
https://developer.ibm.com/swift/2016/09/22/securing-kitura-part-1-enabling-ssltls-on-your-swift-server/

Hey @gtaban , thanks for the response!
In your example using the non-self signed Cert Chain config is commented out. Does that path currently work?
I am trying to use valid Cert Chain files I'm authorized using an authority. On MacOS everything works ok (when I use .pfx files,  I was unable to get the .pems the .pfx came from to work on MacOS). When I switch to Linux and I'm forced to use .pems HTTPS no longer works, all responses from the server are in HTTP and there are no error messages explaining why this has happened.
Writing this out it seems like I am having trouble with .pems on Mac and Linux then, where converting them to .pfx works. Why would the .pems fail? Where in the code can I look to see why they aren't being used or why the code is (silently) switching to HTTP?
Let me know if I can provide any more information!

Hi @yoiang, I used to have that sample working with a cert chain on linux, let me have a look and I'll get back to you.

Hi @yoiang
I had commented out that line for other reasons: I was testing out pushing app to Bluemix and only one server could use the port variable. So I couldn't have two servers. You should be able to use the second server fine if you uncomment.
However, I did discover a bug in my code in the cert chain code (I was using the wrong init), so if you do a pull, you can see the updated code. Uncomment that server, try it out and let me know if you have problems with the server on port 8080.

Closing as old issue. Reopen if help still needed!

source: gharchive/issue

authors: gtaban ianpartridge krystiansliwa yoiang

license_type: permissive

license_source: github-api


text:
Update kubeflow component with new pytorch constructor

Description
Fixes #401 (issue)
We realized the Kubeflow component was still using an older version of the PyTorch constructor, so we want to update the arguments to map with the most up to date version. Also changing the default value for s3_url because Kubeflow now supports multi-user and the default storage is now always under Kubeflow namespace.
Type of change
Please check all relevant options.

[x] Bug fix (non-breaking)
[ ] New feature (non-breaking)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

[ ] Test A
[ ] Test B

Test Configuration:

OS
Python version 3.7
ART version or commit number 1.2
TensorFlow / Keras / PyTorch / MXNet version PyTorch 1.3

Checklist

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

Hi @Tomcli Thank you very much for your pull request. It looks good to me. I was wondering if it would make sense a quick unittest for the kubeflow component's content to test for changes like this?

Sorry I have been busy recently, I will try to add a test case against one of the mnist example.

source: gharchive/pull-request

authors: Tomcli beat-buesser

repo: IBM/adversarial-robustness-toolbox

license: MIT


text:
[Win] After transfer, asked to "Terminate batch job (Y/N)?"

Environment

ascli 4.0.0.pre2
Win10 x64, ruby 2.7.2p137

Description
With Windows ascli, after every transfer I get prompted with "Terminate batch job (Y/N)?". It doesn't seem to matter what I enter; the command finishes running whether I enter 'y' or 'n'. Maybe this issue is specific to Windows command prompt? Would be good if this prompt could be removed.
C:\Users\WDAGUtilityAccount\Downloads>ascli faspex --url=https://10.0.213.232/aspera/faspex --insecure=yes --user=*** --password=*** package recv --id=21281
200KB.100                                     100%  200KB  2.2Mb/s    00:00
Completed: 200K bytes transferred in 0 seconds
 (1974K bits/sec), in 1 file, 1 directory.
^CTerminate batch job (Y/N)? y

C:\Users\WDAGUtilityAccount\Downloads>

Notes

Linux (and presumably Mac) ascli does not have this issue with the unexpected "Terminate batch job" prompt.
Not an issue with ascli commands that don't involve transfers (ex: browse, apiinfo).

I have also seen this with a customer.

I have also seen this with a customer.

fixed in "develop" branch, so will be in next version (one can try by just copying the file: local.rb )

fixed in "develop" branch, so will be in next version (one can try by just copying the file: local.rb )

authors: laurent-martin willgcho

repo: IBM/aspera-cli


text:
feat(table): column selection (no reordering yet)

Summary
Added column selection.  Reordering is not supported yet, and the design will change (see related issue)... but the props interface won't change.

Change List (commits, features, bugs, etc)
(see PR)
Related Issues
https://github.com/IBM/carbon-addons-iot-react/issues/28
Acceptance Test (how to verify the PR)

Test column toggling on/off in the stateful storybook example
View the new static story

:tada: This PR is included in version 1.12.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

@bryancboyd the size of the buttons should be using the small version. I'm not sure if the use of gray is appropriate, it's the same style as carbon's tertiary button, and the color is closer to the Disabled state.

:tada: This PR is included in version 1.12.0 :tada:
The release is available on npm package (@release-1.x dist-tag)
Your semantic-release bot :package::rocket:

authors: CynZhang bryancboyd tay1orjones

repo: IBM/carbon-addons-iot-react


text:
feat(tiles): Add skeleton states

Closes #946

Instead of just blanking out, maybe it would be nice if it could toggle to a provided skeleton content/template?

Instead of just blanking out, maybe it would be nice if it could toggle to a provided skeleton content/template?

Good call, then the skeleton state wouldn't allow the users to perform any actions on the component.

Sorry, I meant a little more involved than that ... If I have a tile I may have arbitrary content in it, when the tile is in a skeleton state I should be able to provide a skeleton template/ng-content that allows me to represent that unloaded content

authors: Donisius cal-smith

repo: IBM/carbon-components-angular


text:
Overflow Menu Component Slowing Page on Firefox

Detailed description
Describe in detail the issue you're having. Is this a feature request (new component, new icon), a bug, or a general issue?
general issue: When using a large number of overflow menu on the page, the navigation on this page gets too slow, and the more overflow components  I add, more slow it gets. But.... it happens only on Firefox, and is not just on my machine... All my co-workers experienced this.
We need to use this component on our data tables, and, as all the rows will have this component, it's necessary that it be fixed, otherwise, it will be impossible to navigate on pages with tables, and it must work on Firefox, not just on Chrome... Could you guys take a look?

Is this issue related to a specific component?
Overflow Menu Components and possibly, other ones...

What did you expect to happen? What happened instead? What would you like to see changed?
I expected the navigation to be normal on Firefox when having lots of overflow menus on it, as it happens on Chrome. Instead, I got a slow page, that depending on the number of overflow menus, gets inoperable. What I would like you guys to change, is that the component be usable on the Firefox too.

What browser are you working in?
Firefox

What version of the Carbon Design System are you using?
9.1.16

What offering/product do you work on? Any pressing ship or release dates we should be aware of?
I'm working on a important app that must be release as soon as possible, once we have already exceeded the target date.

Steps to reproduce the issue

Step one
First, add to a common page a small amount of overflow menus, like five of them.
Add a input text on that same page.
Press and keep pressed any key, like 'a' and see the speed of the letters appearing in the text field. It will probably looks ok.
Now, add more 20 overflow menus, and try to type again on the text field. It will be slower.
Now, add more 80 overflow menus. It will be almost inoperable. The texts will barely appear.

Additional information

Screenshots or code
See the Gif below:

Notes
It's possible that this is happening with some other components also...

Add labels
Please choose the appropriate label(s) from our existing label list to ensure that your issue is properly categorized. This will help us to better understand and address your issue.

Is there any way you could link to your example showing this either on CodePen or CodeSandbox? It would help us reproduce the specific issue

I could send to you on CodePen, but I already try it and this problem doens't appear there.

I'm using carbon with angular 6

Hmm, could you try it in an Angular environment in CodeSandbox? https://codesandbox.io/s/angular

Sure! How can I use carbon components there?

Over on the left-hand side, you should see a Add Dependency Button. You can add Carbon that way, or use the CDN links found on our website

Great, let me try.

Hi @MurAnn thank you for entering this issue. Before I suggest a solution, quick question - Why does your application need many dozens of overflow menus? It signals having too many DOM elements active which itself slows down your app (e.g. requires heavy paint task). Thanks!

Hi @asudoh ! Actually, I need my data table to have one over flow per row, that's why I need I lot of them. I'm back now, I will check on codeSandBox.

Hi @MurAnn have you considered using the pagination UI?

authors: MurAnn asudoh tw15egan

repo: IBM/carbon-components


text:
Re-work deployer logic to use existing services

The deployer currently always creates a free tier conversation
service and uploads a new workspace to that service. That leads to
many services and being unable to find their newly uploaded
workspace from the devops pipeline (it links to whatever it finds
first in the backend).
The idea here is to create a new service only if one doesn't already
exist. If one exists, use it. If more than 1 exists, then use the
first found, this isn't any worse than the current situation.

This would close issue #8

We can merge to test it out. I don't think we have solved all of the corner cases, like BAE instance exists but it is the second instance returned. Now we have BAE chatbot workspaces added to the non-BAE conversation instance. That could be confusing.

authors: rhagarty stevemart

repo: IBM/chatbot-deployer


text:
feat: Support for directlink connection type

PR summary
Add support for Directlink type connections
PR Checklist
Please make sure that your PR fulfills the following requirements:

[ ] The commit message follows the Angular Commit Message Guidelines.
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type

[ ] Bugfix
[ X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[X ] New tests
[ ] Build/CI related changes
[ ] Documentation content changes
[ ] Other (please describe)

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ X] No

Other information

:tada: This PR is included in version 0.20.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

repo: IBM/networking-go-sdk


text:
chore: updated semver version

dependency: none
PR summary

Fixes: fixing the semver vulnerability issue by updating the version number.

link: https://github.com/IBM/networking-java-sdk/security/dependabot/5
PR Checklist
Please make sure that your PR fulfills the following requirements:

[ ] The commit message follows the Angular Commit Message Guidelines.
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] New tests
[ ] Build/CI related changes
[ ] Documentation content changes
[x] Other (please describe) - updating dependency versions.

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

:tada: This PR is included in version 0.34.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

authors: MalarvizhiK jkalandaibm

repo: IBM/networking-java-sdk


text:
pgm-call: result-xml structure corrupt due to randomly added characters (urgent)

Node.js version: 12.14.0
itoolkit version: 1.0.0
IBM i version: 7.3
XMLSERVICE version: XML Toolkit 2.0.2-dev

Describe the bug
The node-script requests IBM i DB-Data via a call to rpg-pgm.
As working with daily-data for one month the call to the program is added to a toolkit conn-object for 30/31 times.
Running the con results in a successful execution but gives back a corrupted xml-structure (e. g. ... type=a'4p2' ..., ... <d ...).
We are using different person-ids in the request. With some PER# the error is reproducible others work fine.
Maybe there is a stringbuffer involved?!?
! Running the script multiple times with identic PERS# results always in the same error at the same position in xml-string.
To Reproduce
see above
Expected behavior
Please locate the bug and provide a corrected version of itoolkit or xmlservice
Files
If needed, we can provide our code snippet and some xml-data.

Examples for Errors:
0<,00

<

1279

17032020

1431

15,04

code for the function
Function.ts.txt

Meantime tested with transporttype=odbc > no errors!
Maybe there is some issue in transporttype = idb ?!!

Hello @nedi-dev :wave:
Interesting that when using odbc transport you do not run into the errors. Does the error occur every time using idb transport or randomly?
I noticed from your code snippet that you have conn.debug(true) enabled. Does the xml input look malformed on the way in as well?
It would nice to have a simplified example of the RPG program being called (without confidential info) so that the issue can be readily reproduced.

Hi @abmusse
The error occurs always when using 'idb' transport. Even the misspelled tag is the same for the same input parameters.
The input-xml is fine in all cases.
Find the abbreviated rpg-source attached.
ZEI109_short.rpglesrc.txt

What version of idb-connector do you have installed?
$ npm list idb-connector

$ npm list idb-connector
trb-pgm-ZEI109@1.0.0 /home/NEUMANN/nodejs/trb-pgm-ZEI109
`-- itoolkit@1.0.0
  +-- idb-connector@1.2.9
  `-- idb-pconnector@1.0.8
    `-- idb-connector@1.2.9  deduped

Thinking you are on the right track:
XML Error:
<success><![CDDATA[+++ success LGIZEIT ZEI109 ]]></success>
Duplicated "D" at pos 15!
Output from idbTransport:
      '<parm>\n' +
      "<data type='50A'>Keine Daten vorhanden !</data>\n" +
      '</parm>\n' +
      '<success><![CD'
  },
  {
    OUT151: 'DATA[+++ success LGIZEIT ZEI109 ]]></success>\n' +
      '</pgm>\n' +
      "<pgm name='ZEI109' lib='LGIZEIT' error='fast'>\n" +
      '<parm>\n' +
      "<data type='2p0'>1</data>\n"

@abmusse , should we transfer this one over to idb-connector?

From your output looks like the data retrieved using idb-connector is already corrupted before we iteratere over results array and append to the xmlOutput. So seems to be an issue with idb-transport since you tried odbc and did not receive an error.
@ThePrez That would make sense given the issue seems to be caused by idb-connector.

authors: ThePrez abmusse nedi-dev

repo: IBM/nodejs-itoolkit


text:
fix(Metrics Router): add new regions br-sao, ca-tor, jp-osa and jp-tok

PR summary
Added new regions Brazil(br-sao), Toronto(ca-tor), Osaka(jp-tok) and Tokyo(jp-tok) to metrics-router
PR Checklist
Please make sure that your PR fulfills the following requirements:

[x] The commit message follows the Angular Commit Message Guidelines.
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

Current vs new behavior
Added new region. No change in old code
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Divi-Tiru-Sai-Gopala-Pavana-Phaneendra seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Integration Tests are successful

:tada: This PR is included in version 0.61.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

authors: CLAassistant PhaniDivi-613 ibm-devx-sdk

repo: IBM/platform-services-go-sdk


text:
Registration page times out

As reported by someone who wants to try this and reproduced by me:
https://ptopenlab.com/cloudlabconsole/#/register
This site can’t be reached
ptopenlab.com took too long to respond.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_TIMED_OUT

registration site changed.  Fixing README with links.

repo: IBM/powerai-vision-object-detection


text:
gmap api

if i deploy on cloud how will i insert the api?

Sorry, that part of the code needs fixing. For now, you can ssh to the instance and manually add your key to server/public/index.html to line#40:
        src="https://maps.googleapis.com/maps/api/js?key=<your_key_here>&callback=initMap"  >

I'll abstract that to the server/js/index.js file so that it can be added as an environment variable, but that change might not happen until monday.

thanks
On 21 July 2018 at 15:02, scottdangelo notifications@github.com wrote:

Sorry, that part of the code needs fixing. For now, you can ssh to the
instance and manually add your key to server/public/index.html to line#40:
    src="https://maps.googleapis.com/maps/api/js?key=<your_key_here>&callback=initMap"  >

I'll abstract that to the server/js/index.js file so that it can be added
as an environment variable, but that change might not happen until monday.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/IBM/predict-wildfire-intensity/issues/12#issuecomment-406790944,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS-CQyeLv9C-8IAUmzfZx7zaXcknKQ6mks5uIxhXgaJpZM4VZhfT
.

This is now documented, and you can put the MAPS_APIKEY into the server/.env file to run locally, or update the IBM Cloud Deployment Runtime variable if running in the cloud.

authors: madvincy scottdangelo

repo: IBM/predict-wildfire-intensity


text:
That use itoolkit to run one sql query returns an BADPARSE error.

Recreated steps:

Use iSqlQuery to run a sql "SELECT DATA FROM qusrsys.QATOCTCPIP WHERE KEYWORD='RMTNAMESV';" Below is the code.
itool = iToolKit()
itool.add(iSqlQuery('query', sql, {'error': 'on'}))
itool.add(iSqlFetch('fetch'))
itool.add(iSqlFree('free'))
itool.call(itransport)
command_output = itool.dict_out('fetch')

However, seems there is a BADPARSE error.

The output:
{'error': {u'error1': u' ?xml version='1.0'? xmlservice sql var="query" query error="on" var="query" conn='conn1' stmt='stmt1' success ![CDATA[+++ success SELECT DATA FROM qusrsys.QATOCTCPIP WHERE KEYWORD='RMTNAMESV';]] /success /query /sql sql var="fetch" fetch block="all" error="fast" var="fetch" stmt='stmt1' row data desc='DATA' ![CDATA[9.0.128.50 9.5.178.0 U ', 'fetch': {...}, u'error': u'*BADPARSE'}}"

BTW, this sql "SELECT DATA FROM qusrsys.QATOCTCPIP WHERE KEYWORD='LOCALDMNME';" can be finished successfully. The only difference between the good one and the bad one is the value of KEYWORD.

The error report points to the "fetch" instruction, so there is probably a problem with the data returned.
Running the same SQL statement with keyword "RMTNAMESV" on our server returns some binary data after the 'U' character - so this seems to be the cause of the error.
I think you should be careful when accessing the table QATOCTCPIP - the column DATA is character but with CCSID 65535 which indicates binary data is stored in this column. Better use the "new" DB2 for i Services like QSYS2.TCPIP_INFO if possible...

QSYS2.TCPIP_INFO doesn't contain the info I need. Anyway, use the sql
select cast(data as varchar(100)) from qusrsys.qatoctcpip WHERE KEYWORD='RMTNAMESV' instead. Thanks.

authors: LiJunBJZhu chrjorgensen

repo: IBM/python-itoolkit


text:
fixed JVM's config name corresponding to MaxWaitTime

Fixed JVM config name for MaxWaitTime config in docs.
Incorrect JVM config: fetch.wait.max.ms <-- docs mention this.
Correct JVM config: fetch.max.wait.ms

@abhipranay thanks, this is a good spot and worth correcting.
One small clarification is that fetch.wait.max.ms was previously correct and was used in the original Consumer implementation in Apache Kafka (which was eventually deleted in 2.1.0) that Sarama implemented in its first incarnation in the early days. When Kafka implemented Consumer Groups in 0.8.2 they renamed the property to fetch.max.wait.ms

authors: abhipranay dnwe

repo: IBM/sarama


text:
Adding ltsr branch for Monitoring

What this PR does / why we need it:
Adding ltsr branch for Monitoring builds
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Specify your PR reviewers:

/cc @gyliu513 @horis233
Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

/assign @ashank07

repo: IBM/test-infra


text:
zti does not respect /etc/hosts

When opening a session and specifying a host defined within /etc/hosts, zti ignores me and does a dns lookup, then fails it with:
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

Which would be true for this particular host if I didn't have the mapping in /etc/hosts, but I do and other programs like ssh respect it.

I wonder why Python doesn't use /etc/hosts?

More system info:
python 3.7.8
ubuntu 18.04.6 LTS

I see the problem in zti.;py!
            if "." not in hostname:
                fqdn = socket.getfqdn()
                fqdn = fqdn.split(".")
                if len(fqdn) > 1:
                    hostname += "."+".".join(fqdn[1:])

It is making an incorrect assumption that if you don't have a '.' in the hostname that you must want zti to append the suffix of the local machine.
That just looks wrong and should be deleted.

repo: IBM/tnz


text:
[Core] Adding Strict Priority Scheduling

FILL IN THE PR DESCRIPTION HERE
Motivation
Currently, vLLM supports first-come-first-served scheduling based on the arrival time of requests. This PR aims to add priorities to requests such that high-priority requests are prioritized better than lower-priority ones in the scheduler. Prioritization has also been mentioned previously in discussion e.g. https://github.com/vllm-project/vllm/issues/3058.
Implementation
There are two major changes implemented:

Addition of a new policy SP (strict priority) to the policy factory in addition to FCFS.
Adds a user-defined priority variable to sequence. All requests in the running queue and the waiting queue are sorted first based on this priority. If there is a tie, it falls back to the FCFS policy.

Force preemption of request from the running queue back into the waiting queue.
If there are requests in the running queue whose priority is lower than the requests in the waiting queue, they are forcefully preempted out back into the waiting queue to allow immediate execution of the higher priority request. This force preemption does not use KV cache swapping for now (can be extended in the future).

Evaluation
Evaluation conducted with the benchmark_prioritization.py with Llama-7B and A10 GPU. Requests are randomly assigned low or high priority with equal probability.

Throughput is not impacted significantly in this policy

Request Throughput
Token Generation

FCFS
1.26 requets/s
650 tokens/s

SP
1.32 requests/s
672 tokens/s

There is no significant difference in throughput between FCFS and SP policy.

Latency for high priority requests is reduced

High Priority - FCFS
Low Priority - FCFS
High Priority - SP
Low Priority - SP

p50
61s
44s
28s
79s

p75
74s
78s
43s
95s

p90
104s
97s
64s
113s

p99
141s
145s
83s
143s

Head of line blocking time reduction

Head-of-line blocking time also reduces from waiting for ~100 decode iterations to 1 iteration for the request at the front of the waiting queue. This corresponds to a decrease from 3s to 0.03s.

FIX #xxxx (link existing issues this PR will resolve)
BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE

 PR Checklist (Click to Expand)
Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

[Bugfix] for bug fixes.
[CI/Build] for build or continuous integration improvements.
[Doc] for documentation fixes and improvements.
[Model] for adding a new model or improving an existing model. Model name should appear in the title.
[Frontend] For changes on the vLLM frontend (e.g., OpenAI API server, LLM class, etc.)
[Kernel] for changes affecting CUDA kernels or other compute kernels.
[Core] for changes in the core vLLM logic (e.g., LLMEngine, AsyncLLMEngine, Scheduler, etc.)
[Hardware][Vendor] for hardware-specific changes. Vendor name should appear in the prefix (e.g., [Hardware][AMD]).
[Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:

We adhere to Google Python style guide and Google C++ style guide.
Pass all linter checks. Please use format.sh to format your code.
The code need to be well-documented to ensure future contributors can easily understand the code.
Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.
Please add documentation to docs/source/ if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.

Notes for Large Changes
Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.
What to Expect for the Reviews
The goal of the vLLM team is to be a transparent reviewing machine. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process:

 After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.
 After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.
 After the review, the reviewer will put an  action-required label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.
 Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.

Thank You
 Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone!

@njhill please help us review.

Actually, maybe instead of adding the priority argument directly a scheduling_metadata dict could be passed instead so that custom scheduling schemes can be supported in the future.

Thanks for the suggestions. Two changes were made to make the implementation more generalizable: (1) Priority is now under the sched_metadata dict , and (2) Helper functions are added in the policy class (e.g. specifying whether policy supports forced preemption).

Hello:) I was reviewing the proposed changes for the new policy, they look very good!
I have some suggestions and questions for future extensions:

It would be nice to have the sched_metadata parameter enter through the openAI as well
It would be nice to have the policy parameter enter through the CLI (engine/arg_utils.py) as well
In case that a specific policy needs more input parameters for configuration, what would be the right way to proceed in terms of implementation? For example, if implementing a policy based on VTC we would need to configure parameters weight_input_tokens and weight_output_tokens.
In case that a specific policy needs to add more logging through the prometheus endpoint, what would be the right way to proceed in terms of implementation? For example, in VTC, we would like to show the evolution of the user cost counters. I was thinking of adding a new method in the Policy class, i.e., alternative_logging() that is called by the scheduler and llm_engine every time the default logs are executed

What do you think about these suggestions/questions/comments? I can proceed with their implementation if they seem good to you as well.

authors: FerranAgulloLopez apatke maxdebayser saurabhjha1

repo: IBM/vllm


text:
Expanded properties 20190709

These are the latest changes in the pelahi:expandedproperties branch of VR that everyone has agreed to include in this version.

All looking good, merging now

repo: ICRAR/VELOCIraptor-STF


text:
🛑 IDR (well 1024671) is down

In 723f6b8, IDR (well 1024671) (https://idr.openmicroscopy.org/webclient/?show=well-1024671) was down:

HTTP code: 0
Response time: 0 ms

Resolved: IDR (well 1024671) is back up in 8f3cd67 after 18 minutes.

repo: IDR/upptime


text:
Changing Bottleneck Features

Currently DBN/DNN/SDA use the output of  layer just above log-regression layer as bottleneck feature and used in exporting.
We can change it to last rbm/da layer?

In models/dbn.py Lines
    self.features = self.layers[-2].output;
    self.features_dim = self.layers[-2].n_out

is saying bottle neck features are output layer just above logregression layer ( ie Second last layer).
change it to
    self.features = self.rbm_layers[-1].output;
    self.features_dim = self.rbm_layers[-1].n_out

ie last rbm layer's output become bottle neck features
N.B: if you are using SDA change accordingly in src/model/sda.py

Is it needed to move to config ??
I think config become more complex if we move.

repo: IITM-DONLAB/python-dnn

license_source: bigquery


text:
Insert ILLIXR Compositor into Monado

What
This PR inserts the ILLIXR compositor (timewarp) into Monado. We first use Monado to perform the layer compositing, then call timewarp for LSR step. Then timewarp handles the presentation of the buffers.
Still Needed
The infrastructure needs to be improved for the actual running. For example, we need to decide on a way to run the service, compared to a list of OpenXR apps that will also be run in the process. Right now the runner just comments out the OpenXR process and only runs the service. The YAML file may also need to be updated to account for this as well.
Testing
To test this PR, the ILLIXR repository should be up to date with this PR. To run another OpenXR app while the service is running, pass in the XR_RUNTIME_JSON provided in the monado build as an environment variable, e.g:
XR_RUNTIME_JSON=home/user/monado/build/openxr_monado-dev.json ./LinuxApp

Here's an example OpenXR application for Linux exported from Unreal Engine which can be used for testing.
Notes
When testing, it seems to work fine when I run Monado with my NVIDIA 3070 GPU. However, there seem to be some artifacts (namely banding) when my AMD integrated graphics is the selected device.

Closing with a more updated version in #18.


text:
🛑 namescape tagger is down

In 94e44b0, namescape tagger (https://ner.namescape.nl/namescape/ui) was down:

HTTP code: 503
Response time: 607 ms

Resolved: namescape tagger is back up in b889e5c.

repo: INL/ivdnt-statusoverzicht


text:
🛑 Main is down

In addab8c, Main (https://ipmgroupuk.com) was down:

HTTP code: 403
Response time: 727 ms

Resolved: Main is back up in fdef4cb after 9 minutes.

repo: IPMGroupLtd/Uptime


text:
example 3 equations model is not running

@jaromir-benes , @nul0m , hey! I'm trying to run 3 equation model from the 'irispie examples' repo with irispie 0.54.8, but it returns an error:
Rule 'source' matched in its entirety, but it didn't consume all the text. The non-matching portion of the text begins
with '!transition-shocks`

Would appreciate any advice how to change the model code or anything else to make it work

In this file
https://github.com/IRIS-Solutions-Team/Iris-Pie-Examples/blob/master/linear_3eq_model/linear_3eq.model
!transition-shocks

    shk_y_gap, shk_diff_cpi, shk_rs

Should be
!unanticipated-shocks

    shk_y_gap, shk_diff_cpi, shk_rs

``

repo: IRIS-Solutions-Team/irispie


text:
Crash on orientation change / restore instance state

There's some kind of bug introduced with the 0.9.6 version. When changing the orientation of the device, an unhandled exception is throw from the restore instance state code. It can be replicated using the demo app. Version 0.9.5 works correctly.
FATAL EXCEPTION: main
  Process: de.codecrafters.tableviewexample, PID: 20881
  java.lang.RuntimeException: Unable to start activity ComponentInfo{de.codecrafters.tableviewexample/de.codecrafters.tableviewexample.MainActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.AbsListView$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/tableView. Make sure other views do not use the same id.
	  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
	  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
	  at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4053)
	  at android.app.ActivityThread.access$900(ActivityThread.java:156)
	  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357)
	  at android.os.Handler.dispatchMessage(Handler.java:102)
	  at android.os.Looper.loop(Looper.java:211)
	  at android.app.ActivityThread.main(ActivityThread.java:5373)
	  at java.lang.reflect.Method.invoke(Native Method)
	  at java.lang.reflect.Method.invoke(Method.java:372)
	  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
	  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
   Caused by: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.AbsListView$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/tableView. Make sure other views do not use the same id.
	  at android.view.View.onRestoreInstanceState(View.java:13847)
	  at android.view.View.dispatchRestoreInstanceState(View.java:13823)
	  at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2888)
	  at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
	  at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
	  at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
	  at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
	  at android.view.View.restoreHierarchyState(View.java:13801)
	  at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2012)
	  at android.app.Activity.onRestoreInstanceState(Activity.java:1023)
	  at android.app.Activity.performRestoreInstanceState(Activity.java:978)
	  at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1162)
	  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2352)
	  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
	  at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4053)
	  at android.app.ActivityThread.access$900(ActivityThread.java:156)
	  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357)
	  at android.os.Handler.dispatchMessage(Handler.java:102)
	  at android.os.Looper.loop(Looper.java:211)
	  at android.app.ActivityThread.main(ActivityThread.java:5373)
	  at java.lang.reflect.Method.invoke(Native Method)
	  at java.lang.reflect.Method.invoke(Method.java:372)
	  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
	  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

Thank you for reporting this issue. This will be fixed as soon as possible.

Hi siimav,
finaly I made to fix this bug. Please use the version 1.0.0 of the tableview. This version should not contain this bug anymore ;)


text:
Ampliación de script user_score.json #450

Se han agregado 21 elementos más en el archivo user_score.json brindando un conjunto robusto de datos de pruebas para mayor diversidad.
user_score.json

Es necesario revisar la siguiente casuística para asegurar consistencia de datos:

El campo status en base de datos sólo podrá tener los valores "EMPTY","STARTED" o "ENDED" (UPPER case).
Un registro de la collection Solutions cuyo campo status sea EMPTY deberá ser bookmarked true. Esto es porque sólo fijamos el registro en base de datos si el usuario lo marca como favorito, o bien cuando lo comienza a efectuar (status STARTED).

authors: anagarcialainez jonatanvicente

repo: IT-Academy-BCN/ita-challenges-backend


text:
Optimize randomMPS

Major optimization of randomMPS, by using thin QR to generate random unitaries. Moved random_orthog function to NDTensors linearalgebra.jl file.

Codecov Report

Merging #298 into master will increase coverage by 3.22%.
The diff coverage is 90.87%.

@@            Coverage Diff             @@
##           master     #298      +/-   ##
==========================================
+ Coverage   79.81%   83.03%   +3.22%
==========================================
  Files          35       36       +1
  Lines        2878     2994     +116
==========================================
+ Hits         2297     2486     +189
+ Misses        581      508      -73

Impacted Files
Coverage Δ

src/ITensors.jl
100.00% <ø> (ø)

src/decomp.jl
96.05% <ø> (ø)

src/physics/site_types/tj.jl
95.77% <0.00%> (-4.23%)
:arrow_down:

src/mps/abstractmps.jl
90.00% <44.44%> (-6.83%)
:arrow_down:

src/physics/site_types/electron.jl
81.60% <86.95%> (-17.27%)
:arrow_down:

src/physics/tag_types.jl
87.50% <90.90%> (+0.83%)
:arrow_up:

src/mps/mps.jl
83.22% <91.66%> (-15.37%)
:arrow_down:

src/physics/autompo.jl
91.68% <96.03%> (+38.44%)
:arrow_up:

src/mps/mpo.jl
98.55% <96.20%> (-0.97%)
:arrow_down:

src/physics/fermions.jl
100.00% <100.00%> (ø)

... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93244d9...33d3a8b. Read the comment docs.

authors: codecov-io emstoudenmire


text:
🛑 Events is down

In 5909668, Events (https://events.pt.ivao.aero) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Events is back up in b64505a.

repo: IVAO-Portugal/status-page


text:
🛑 Website is down

In ad821ef, Website (https://pt.ivao.aero/portal) was down:

HTTP code: 500
Response time: 5894 ms

Resolved: Website is back up in 02ce04c after 839 days, 4 hours, 40 minutes.


text:
🛑 API is down

In f970174, API ($API_ENDPOINT) was down:

HTTP code: 0
Response time: 0 ms

Resolved: API is back up in b559398 after 14 minutes.


text:
UI view of Swap platform completed

Description
Concise description of proposed changes, We recommend using screenshots and videos for better description
I have successfully completed every UI visuals required for the ScrollSwap Ether Wrapper
What is left now is the implementation of the smart contract with its test suites.
Additional Information

[x] I have read the contributing docs (if this is your first contribution)
[x] This is not a duplicate of any existing pull request

Related Issues
Closes #{issue number}
Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request.
Your ENS/address:
0xDB9B936373f859Ce8C580Bbc35b0Eab89cA9fd70

Great

authors: IbrahimIjai SteffQing

repo: IbrahimIjai/WETH-ETH


text:
Markers disappear when rebuild on next bloc state.

Description:
Markers appear when State1 occurs as soon as State2 event is received, map rebuilds, and markers disappear. Please see the logs.
My use case is to display/remove markers dynamically based on bloc states.
Version: 0.0.2
Flutter version: 2.10.0
Simulator: iOS 13 mini (15.2)
Code:
 Widget _buildMap() {
    print("_buildMap");
    return CustomGoogleMapMarkerBuilder(
        key: Key('custom_google_map_marker'),
        customMarkers: _customMarkers,
        // screenshotDelay: Duration(seconds: 3),
        builder: (BuildContext context, Set<Marker>? markers) {
          print("_customMarkers: ${_customMarkers.length}");
          print("markers: ${markers?.length}");
          print("----------------");

           return GoogleMap(
               markers: markers ?? {},
               ....
                    );
       }
    }

 _customMarkers.add(MarkerData(
        marker: Marker(
          markerId: MarkerId('marker'),
          position: _latLng,
          anchor: Offset(0.5, 1.0),
        ),
        child: MyMarker(
          title: 'Custom Marker',
        ),
      ));

Logs:
 build
 builder -> state: InitialState()
 _buildMap
 _customMarkers: 0
 markers: 0
 ----------------
 builder -> state: State1()
 setMapMarkers
 _buildMap
 _customMarkers: 2
 markers: null
 ----------------
 _customMarkers: 2
 markers: 2
 ----------------
 builder -> state: State2()
 _buildMap
 _customMarkers: 2
 markers: null
 ----------------

@mehtabghani Thank you for reporting this issue
it was solved, a new version will be published in the couple few hours
FYI @Yahllil

issue was fixed
please upgrade your version to 0.0.2+1

authors: IbrahimTabba mehtabghani


text:
disable map reload

reload I think is so bad UX for user
an example is for test data which build it in if we get data from the server and wait for data and reload the map takes many seconds.
please find a right way to implement this issue

Yes same issue here, would be cool if we could do live location updates, like Uber.  Maybe process all the widget things in the background ? (Not sure that is possible in flutter) Or maybe once markers are added make it so we can move them without reloading ?
But great work still I am gonna try to contribute if I have the time !

I have used the above code in order to be able to add widget containing markers on click on a certain point, the code is far from perfect, but if it can help someone ^^
Maybe we could add this into the library somehow.
`import 'dart:typed_data';
import 'package:flutter/cupertino.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:collection/collection.dart';
import 'dart:ui' as ui;
import 'package:synchronized/synchronized.dart';
class MapOptiTemp extends StatefulWidget {
const MapOptiTemp({Key? key}) : super(key: key);
@override
State createState() => _MapOptiTempState();
}
class _MapOptiTempState extends State {
// GoogleMapController? _mapController;
List locations = [];
late MarkersController markersController;
Set markers = {};
double latitude = 0.0;
double longitude = 0.0;
@override
void initState() {
_loadLocationMarkers();
super.initState();
}
void markersControllerListener() {
// This listener only will be called when all the widgets are converted to images
if (markersController.images != null) {
try {
setState(() {
markers = locations
.map((point) => Marker(
markerId: MarkerId(point.id),
position: LatLng(point.lat, point.long),
onTap: () {},
icon: BitmapDescriptor.fromBytes(
markersController.images![locations.indexOf(point)])))
.toSet();
});
} catch (error) {
print("Error custom Map: $error");
}
}
}
// Call this function in your initState
void _loadLocationMarkers() async {
if (mounted) {
locations = [
Point("init point 1", 45.413811, 6.991759),
Point("init point 2", 45.414698, 6.988807)
];
}
markersController = MarkersController(
value: List<Uint8List?>.filled(locations.length, null),
childCount: locations.length);
markersController.addListener(markersControllerListener);

}
@override
Widget build(BuildContext context) {
return Stack(
children: [
// Add A generated list of custom markers in the tree of your app to capture the images and convert them to pngs to be added as bytes in the google marker
...(markersController.ready
? []
: List.generate(
markersController.childCount,
(index) => Positioned(
left: -MediaQuery.of(context).size.width,
child: CustomMarker(
child: Icon(Icons.account_circle),
screenshotDelay: Duration.zero, // Remove delay
onImageCaptured: (data) {
markersController.updateRenderedImage(index, data);
},
),
))),
    GoogleMap(
      initialCameraPosition: CameraPosition(
          target: LatLng(45.449320496612295, 6.976185903919156)),
      myLocationButtonEnabled: false,
      tiltGesturesEnabled: false,
      zoomControlsEnabled: false,
      mapToolbarEnabled: false,
      mapType: MapType.hybrid,
      rotateGesturesEnabled: false,
      buildingsEnabled: false,
      onCameraMove: (object) {
        print("Markers : $markers");
        latitude = object.target.latitude;
        longitude = object.target.longitude;
      },
      minMaxZoomPreference: const MinMaxZoomPreference(0, 20),
      onMapCreated: (controller) async {},
      markers: markers,
    ),
    Positioned(
        bottom: 16,
        left: 0,
        right: 0,

        child: FloatingActionButton(
          child: Icon(Icons.add),
            onPressed: () async {
          print("latitude $latitude");
          print("longitude $longitude");
          locations.add(Point("New point", latitude, longitude));
          markersController.prepareAddWidget();
          markersController.childCount = locations.length;
          setState(() {});
        }))
  ],
);

}
}
class Point {
String id = "";
double lat = 0.0;
double long = 0.0;
Point(this.id, this.lat, this.long);
}
/// [MarkersController] handles the state of rendered markers and notify
/// listeners when all marker are rendered and captured.
class MarkersController extends ValueNotifier<List<Uint8List?>> {
int childCount = 0;
List<Uint8List?> renderedWidgets = List.empty(growable: true);
MarkersController({required List<Uint8List?> value, required this.childCount})
: super(value) {
renderedWidgets = List<Uint8List?>.filled(childCount, null);
}
updateRenderedImage(int index, Uint8List? data) {
renderedWidgets[index] = data;
if (ready) {
value = List.from(renderedWidgets);
}
}
bool get ready => !renderedWidgets.any((image) => image == null);
void prepareAddWidget() {
renderedWidgets = renderedWidgets.toList();
renderedWidgets.add(null);
childCount++;
}
List? get images => ready ? value.cast() : null;
}
////////////////CUSTOM MARKER//////////////////////
/// a widgets that capture a png screenshot of its content and pass it through
/// [onImageCaptured].
class CustomMarker extends StatefulWidget {
final Widget child;
final Function(Uint8List?)? onImageCaptured;
final Duration? screenshotDelay;
const CustomMarker(
{Key? key,
required this.child,
this.onImageCaptured,
this.screenshotDelay})
: super(key: key);
@override
_CustomMarkerState createState() => _CustomMarkerState();
}
class _CustomMarkerState extends State {
final GlobalKey key = GlobalKey();
final Function eq = const ListEquality().equals;
Uint8List? _lastImage;
final lock = Lock();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
WidgetsBinding.instance.addPostFrameCallback((_) {
lock.synchronized(() async {
await Future.delayed(
widget.screenshotDelay ?? const Duration(milliseconds: 500));
final _image = await _capturePng(key);
if (_lastImage == null || !eq(_lastImage!, _image)) {
_lastImage = _image;
widget.onImageCaptured?.call(_image);
} else {
widget.onImageCaptured?.call(_lastImage);
}
});
});
return RepaintBoundary(
key: key,
child: widget.child,
);
}
Future<Uint8List?> _capturePng(GlobalKey iconKey) async {
try {
final RenderRepaintBoundary? boundary =
iconKey.currentContext?.findRenderObject() as RenderRepaintBoundary?;
if (kDebugMode && (boundary?.debugNeedsPaint ?? false)) {
await Future.delayed(const Duration(milliseconds: 200));
return _capturePng(iconKey);
}
ui.Image? image = await boundary?.toImage(pixelRatio: 3.0);
ByteData? byteData =
await image?.toByteData(format: ui.ImageByteFormat.png);
var pngBytes = byteData?.buffer.asUint8List();
return pngBytes;
} catch (e) {
return null;
}
}
}
`

I have used the code from @Djcharles26  to try to add Widget containing markers to the map on click of a fab. ^
Hope this helps ^^
import 'dart:typed_data';

import 'package:flutter/cupertino.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:collection/collection.dart';
import 'dart:ui' as ui;
import 'package:synchronized/synchronized.dart';

class MapOptiTemp extends StatefulWidget {
  const MapOptiTemp({Key? key}) : super(key: key);

  @override
  State<MapOptiTemp> createState() => _MapOptiTempState();
}

class _MapOptiTempState extends State<MapOptiTemp> {
  // GoogleMapController? _mapController;
  List<Point> locations = [];
  late MarkersController markersController;
  Set<Marker> markers = {};
  double latitude = 0.0;
  double longitude = 0.0;

  @override
  void initState() {
    _loadLocationMarkers();
    super.initState();
  }

  void markersControllerListener() {
    // This listener only will be called when all the widgets are converted to images
    if (markersController.images != null) {
      try {
        setState(() {
          markers = locations
              .map<Marker>((point) => Marker(
                  markerId: MarkerId(point.id),
                  position: LatLng(point.lat, point.long),
                  onTap: () {},
                  icon: BitmapDescriptor.fromBytes(
                      markersController.images![locations.indexOf(point)])))
              .toSet();
        });
      } catch (error) {
        print("Error custom Map: $error");
      }
    }
  }

// Call this function in your initState
  void _loadLocationMarkers() async {
    if (mounted) {
      locations = [
        Point("init point 1", 45.413811, 6.991759),
        Point("init point 2", 45.414698, 6.988807)
      ];
    }
    markersController = MarkersController(
        value: List<Uint8List?>.filled(locations.length, null),
        childCount: locations.length);

    markersController.addListener(markersControllerListener);
  }

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        // Add A generated list of custom markers in the tree of your app to capture the images and convert them to pngs to be added as bytes in the google marker
        ...(markersController.ready
            ? []
            : List.generate(
                markersController.childCount,
                (index) => Positioned(
                      left: -MediaQuery.of(context).size.width,
                      child: CustomMarker(
                        child: Icon(Icons.account_circle),
                        screenshotDelay: Duration.zero, // Remove delay
                        onImageCaptured: (data) {
                          markersController.updateRenderedImage(index, data);
                        },
                      ),
                    ))),

        GoogleMap(
          initialCameraPosition: CameraPosition(
              target: LatLng(45.449320496612295, 6.976185903919156)),
          myLocationButtonEnabled: false,
          tiltGesturesEnabled: false,
          zoomControlsEnabled: false,
          mapToolbarEnabled: false,
          mapType: MapType.hybrid,
          rotateGesturesEnabled: false,
          buildingsEnabled: false,
          onCameraMove: (object) {
            print("Markers : $markers");
            latitude = object.target.latitude;
            longitude = object.target.longitude;
          },
          minMaxZoomPreference: const MinMaxZoomPreference(0, 20),
          onMapCreated: (controller) async {},
          markers: markers,
        ),
        Positioned(
            bottom: 16,
            left: 0,
            right: 0,

            child: FloatingActionButton(
              child: Icon(Icons.add),
                onPressed: () async {
              print("latitude $latitude");
              print("longitude $longitude");
              locations.add(Point("New point", latitude, longitude));
              markersController.prepareAddWidget();
              markersController.childCount = locations.length;
              setState(() {});
            }))
      ],
    );
  }
}

class Point {
  String id = "";
  double lat = 0.0;
  double long = 0.0;

  Point(this.id, this.lat, this.long);
}

/// [MarkersController] handles the state of rendered markers and notify
/// listeners when all marker are rendered and captured.

class MarkersController extends ValueNotifier<List<Uint8List?>> {
  int childCount = 0;

  List<Uint8List?> renderedWidgets = List.empty(growable: true);

  MarkersController({required List<Uint8List?> value, required this.childCount})
      : super(value) {
    renderedWidgets = List<Uint8List?>.filled(childCount, null);
  }

  updateRenderedImage(int index, Uint8List? data) {
    renderedWidgets[index] = data;
    if (ready) {
      value = List.from(renderedWidgets);
    }
  }

  bool get ready => !renderedWidgets.any((image) => image == null);

  void prepareAddWidget() {
    renderedWidgets = renderedWidgets.toList();
    renderedWidgets.add(null);
    childCount++;
  }

  List<Uint8List>? get images => ready ? value.cast<Uint8List>() : null;
}

////////////////CUSTOM MARKER//////////////////////

/// a widgets that capture a png screenshot of its content and pass it through
/// [onImageCaptured].
class CustomMarker extends StatefulWidget {
  final Widget child;
  final Function(Uint8List?)? onImageCaptured;
  final Duration? screenshotDelay;

  const CustomMarker(
      {Key? key,
      required this.child,
      this.onImageCaptured,
      this.screenshotDelay})
      : super(key: key);

  @override
  _CustomMarkerState createState() => _CustomMarkerState();
}

class _CustomMarkerState extends State<CustomMarker> {
  final GlobalKey key = GlobalKey();
  final Function eq = const ListEquality().equals;
  Uint8List? _lastImage;
  final lock = Lock();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      lock.synchronized(() async {
        await Future.delayed(
            widget.screenshotDelay ?? const Duration(milliseconds: 500));
        final _image = await _capturePng(key);
        if (_lastImage == null || !eq(_lastImage!, _image)) {
          _lastImage = _image;
          widget.onImageCaptured?.call(_image);
        } else {
          widget.onImageCaptured?.call(_lastImage);
        }
      });
    });
    return RepaintBoundary(
      key: key,
      child: widget.child,
    );
  }

  Future<Uint8List?> _capturePng(GlobalKey iconKey) async {
    try {
      final RenderRepaintBoundary? boundary =
          iconKey.currentContext?.findRenderObject() as RenderRepaintBoundary?;
      if (kDebugMode && (boundary?.debugNeedsPaint ?? false)) {
        await Future.delayed(const Duration(milliseconds: 200));
        return _capturePng(iconKey);
      }
      ui.Image? image = await boundary?.toImage(pixelRatio: 3.0);
      ByteData? byteData =
          await image?.toByteData(format: ui.ImageByteFormat.png);
      var pngBytes = byteData?.buffer.asUint8List();
      return pngBytes;
    } catch (e) {
      return null;
    }
  }
}

authors: rahmanrezaee theo-michel


text:
Win11: Executable is not a valid application for this OS Platform

I'm on Windows 11. Running the executable by either clicking on it or running it on the PowerShell command line fails with the error "The specified executable is not a valid application for this OS platform." Any idea why this is happening?

Something is definitely going on, but I don't think it's OS related. Runs just fine with both Win11 AND PS.

I haven't been able to find anything concrete with that error message yet, but I'll still dig. Two items came up so far; the first being "compiled for 64-bit, but running on 32", but that's impossible as there's no 32-bit version of Win11. The second is possibility of the exe getting deleted by your antivirus, which is highly plausible considering the recent issues with the app getting flagged.

Maybe your download failed and got an empty file. Check the file size and compared it with the size on the release page.

authors: FaeronGaming Zxilly suntree123

repo: IceDynamix/reliquary-archiver


text:
Where can I find icinga-php-library v0.11.0?

Hello Icinga Community,
I want to add the certificate monitoring (x509) module to my Icinga 2 installation.
The official Icinga website says that Icinga PHP Library (>= 0.11.0) is required.
On my Icinga 2 installation I have the ipl v0.10.1 installed. But where can I find the ipl v0.11.0 or above?
On github it says that ipl v.0.10.1 is the latest version.
For me that makes no sense.
Can anyone help me out?
Thanks a lot and have a nice day.
Best regards.

Hallo @zusa777,
The master branch of the X509 module is requiring an IPL version, which is not yet released, but will soon be. See https://github.com/Icinga/icingaweb2-module-x509/issues/139#issuecomment-1324826550 to workaround this issue temporarily. Have a nice weekend!

Hello @yhabteab
Thanks for your fast reply. Do you more or less know when ipl v0.11.0 is out?
Have also a nice weekend!

It will be out this week.

authors: nilmerg yhabteab zusa777

repo: Icinga/icinga-php-library


text:
Question about handling cancel requests in cordova login dialog

Hi,
I have a question:
I work on a cordova project where we have a cancel button displayed in the login dialog. When the user clicks this button the login dialog should be closed. To handle this click we should be able to react to the "loadstart" of the window as this click changes the url with a hash. At the moment your implementation does not allow any access to the window object. It would be nice to have access to the window object directly or that we could add a callback when the "_loadStartCallback" event is called within the CordovaPopupWindow class of your component.
Thanks
Björn

👍

I'm happy to discuss a design around helping you solve this problem.

Something like the UserManagerEvents for the two events (loadstart and exit) would be nice. Then I could register to the corresponding event and handle the response. The only issue I see with this approach is, that I will we access the event and the instance of the CordovaPopupWindow as need to close the window (call _success, _cleanup or _error method).

I know this issue has lingered here for a while, but I did looked into it and given the async nature of how the popup works it's really hard to keep a handle to the instance and then provide a global way (on the UserManager) to call back in and close the current one. Given that there doesn't seem to be a huge push for this, I'll close the issue. Sorry.

authors: bjoernbur brockallen pankratios

repo: IdentityModel/oidc-client-js


text:
Signout issue

I have 2 application, one angularJS and another angular 2. If i logout from angularjs application it is not triggering addUserSignedOut() event in second application, instead it is trying silent renew. but it works the other way(from 2nd app to 1st app).
/*

from app 1
*/
service.mgr.signoutRedirect({ id_token_hint: idToken }).then(function () {
$timeout(function () {
console.log('testing to see if fired...1');
}, 5000);
}).catch(function (err) {
console.log("error in signout: " + err);
});

/*

from app 2
*/

return this.mgr.signoutRedirect({ id_token_hint: user.id_token }).then(resp => {
//  console.log('signed out', resp);
setTimeout(5000, () => {
//    console.log('testing to see if fired...');
});
}).catch(function (err) {
//  console.log(err);
});
Is this correct? Or do i need to add any changes?

You will have to debug. It's hard for me to tell from here.

I got the issue, looks like events are adding before login. Started working when moved the code after login.

Hi @kvysh I am facing same issue. I have two applications of angular 5 , one is loaded in other as iframe, sign in works, sign out event also works when i log out of second application i.e iframe, but when i logout of first application i.e parent, addUserSignout doesn't works.

This could be with event misplacement in your parent application, please check the events properly.

authors: Sonik20 brockallen kvysh


text:
IdentityServer3.Integration.AspNet restore failed?

I tryed to bind the project Asp.NET 5 into my VS studio but i get a Package restore failed for my IdentityServer because of :
"IdentityServer3.Integration.AspNet": "1.0.0-rc1"
the restore fails

ok i resolved this issue by changeing
before :
c:\users\Username\ .dnx\packages\Owin\1.0\Owin.1.0.nupkg.sha512
after:
c:\users\Username\ .dnx\packages\Owin\1.0.0\Owin.1.0.0.nupkg.sha512
my OWIN package name was 1.0 and not 1.0.0, strage


text:
"Error from RemoteAuthentication: Correlation failed.." only when accessing with google Chrome

The Correlation error occurs when after the redirect to /signin-oidc of our MvcClient.
We tried Microsoft Edgde, Firefox and Chrome. For now only Chrome seems to cause the error.
The Mvc clients log shows:
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]       Request starting HTTP/1.1 POST http://mvcclient/signin-oidc application/x-www-form-urlencoded 1579 warn: Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectMiddleware[15]       '.AspNetCore.Correlation.oidc.ADblIkZ7gYxFkMUY59txNnITmXP2MmdyHK0gNSqHqAg' cookie not found. info: Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectMiddleware[4]       Error from RemoteAuthentication: Correlation failed.. fail: Microsoft.AspNetCore.Server.Kestrel[13]       Connection id "0HL5I6OK2VVQF": An unhandled exception was thrown by the application. System.AggregateException: Unhandled remote failure. ---> System.Exception: Correlation failed.    --- Einde van intern uitzonderingsstackpad ---    bij Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.d__6.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bij Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.<HandleRequestAsync>d__5.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.<HandleRequestAsync>d__15.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
bij Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
bij Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.<Invoke>d__4.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__8.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext() --- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---    bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    bij System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)    bij Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame1.d__2.MoveNext()
---> (Interne uitzondering #0) System.Exception: Correlation failed.<---`
Can anyone tell me what might be causing this?

This really sounds more like a question for Microsoft, since it's their library.

@jhermsen: The correlation depends on a cookie that is set by the OIDC middleware. Perhaps the cookie is not getting set (or is expiring) before the redirect occurs.

Just FYI if anyone else has this issue. For me I found that it was caused by running fiddler while doing development.  The URLs used in the browser when using fiddler look as such https://localhost.fiddler:port/
This allows your chrome traffic especially to get out of the localhost sandbox so fiddler can intercept it for inspection.  When it leaves fiddler it looks like https://localhost:port to the receiving service.  So the callback goes to localhost instead of localhost.fiddler.  This mismatch caused the issue. I'm assuming with the cookie.  We've also seen issues with this in regards to CORS.
We stopped using the localhost.fiddler hostname for this development to avoid the problem.  I wish sandboxing wasn't an issue so we could just use localhost again for everything and avoid this problem.

Fyi for future people who get this error. I caused this issue by changing the default cookie policy settings.
For Google OAuth I was getting "Correlation Failed". For Twitter I was getting "invalid cookie state".
		app.UseCookiePolicy(new CookiePolicyOptions()
		{
			HttpOnly = HttpOnlyPolicy.Always,
			Secure = CookieSecurePolicy.Always,
			MinimumSameSitePolicy = SameSiteMode.Strict
		});

Based on https://github.com/aspnet/Security/issues/1231 it sounds like me changing SameSite to Strict prevented the browser from sending the .xsrf & __TwitterState cookies when redirecting back from the google/twitter social login page.
Taking the UseCookiePolicy code section out of my Startup.cs fixes the issue. I believe I could also change Strict to Lax as an alternate fix.

authors: brockallen gilm0079 jhermsen openidauthority speige


text:
IdentityServer 4 1.5.2 HttpsContext.Identity not set in IE11 when using HttpContext.Authentication.SignInAsync() extension method

This is a very weird case only affect IE11 and Edge from what i have seen so far.
2 servers with an Identity Server 1.5.2 using AspNet Identity 3. They servers have no connection with each other. As long as only 1 server is opened at a time there are no issues signing in.

use IE 11.
1.Open server 1 in Tab 1, login page shows.
open server 2 in Tab 2, login page shows.
Go to Tab 1 and login. Error page is shown.
Go to tab 2 and login, Error page is shown.

Looking in the logs they both fail calling the authorization endpoint after successful authentication.
The error is "User is not authenticated" in the Authorization endpoint, followed by a Token Issuing fails. After a lot of investigation i found that for some reason in IE11 the HttpContext.Identity/User i not set in when using the HttpContext.Authentication.SignInAsync(sub, name, prop) extension method. Doing the same steps in Chrome and Firefox, does not generate the error.
After trying to change schema names and cookie names from default the issue persisted. However i switched from using SignInAsync() extension method to use the native one on the taking a schema and a principle. basically i manually do the same thing done in the extension method. And now it works in all browsers again. So I wonder if there might be some issue with the extension methods?
Maybe this is not an issue in 2.0 using the extension methods. It might not be a normal use case to have to Identity Server instances on different servers for different applications open at the same time in Internet Explorer.

Those extension methods simply use the standard ASP.NET Core methods on AuthenticationManager. Try to repro the same without IdentityServer and if you still see a problem . tell Microsoft.

Any update on the issue? closing for now - feel free to re-open if it needs further discussion.


text:
ASP.NET Identity 3 Support

I was wondering if there are any plans to implement AspNetIdentity for IdentityServer4?? For ASP.Net core 1.0?

We will see. We're not yet sure what the IUserService will look like in IdSvr4.
In essence, though, there it won't be hard for you to do this yourself in IdSvr4 (and it wasn't all that hard in IdSvr3).

yeh, that's cool
Once you do know how the interface might look, then I wouldn't mind getting involved and writing the AspNetIdentity "bridge"

Cool. Thanks! I will leave this open then

Once you think you've finalised the IUserService interface (I understand you've got lots of other things to do) - could you let me know and I will start having a look at it :)

Also interrested in the IUserService interface, since I just found that it didn't exist in IdSvr4 yet :)

Is there a way to work around the limitation of just using InMemoryUser? It is possible to read all the users from a DB into memory. The only problem with that solution is how to handle when user information changes in the DB.
Everywhere it's used it's injected as a List, if it instead was injected as IList then it would've been possible to create an implementation that read from an external source/DB.

@Cybrosys please see #5  and the stackoverflow example to implement IUserService. Please note that IUserService will be replaced with something similar in the next release of Identity Server 4.

Thank you @alzdrak !

@ry8806 Update1 has been released. The two interfaces you're interrested in are:
IProfileService and IResourceOwnerPasswordValidator.

Thanks - do we have a separate Repo for this, like we do in IdentitfyServer3 ??

not before RC2

@ry8806 I've written simple implementations (inspired by the ID3 implementation) of both for AspNetIdenity, but they're tied to *.Identity.EntityFramework, in case you're interested.
AspNetIdentity ProfileService and ResourceOwnerPasswordValidator.zip

@Cybrosys FWIW, it is relatively simple to remove the dependency on Identity.EntityFramework by using UserManager instead of the model class directly to get its properties. This would mean e.g. replacing user.Id with await _userManager.GetUserIdAsync(user)

I think you need to prioritize this issue, because Identity Server is unuseable for many people without ASP.NET Identity support and samples.

I looked into integration IdentityServer4 with Asp.Net Core Identity.
Here is my idea:
https://github.com/tibold/IdentityServer4.Contrib.AspNetIdentity
I have copied some tests from the core project and made them work with AspNet Identity.
Also created a sample project showing how the code is used. It is based on the default Asp.Net Core Web application template in Visual Studio. I tried to implement it with the least amount of changes.
What do you think?

Next week I will investigate on your solution.

I'll also take a look. Thx.

I have made some progress on this. It is not as abstract as IS3 IdentityManager. For instance, Reflection is more limited in .NET Core. I created my solution however so that you can switch between the default InMemoryUser implementation and EF easily. SEE: https://github.com/PivotalAnimal/BlueConcord.IdentityServer.EntityFrameworkCore

The SPA sample in the sample repo has asp.net id3 support.

authors: Cybrosys PivotalAnimal SimonTouchtech alzdrak brockallen leastprivilege ry8806 tibold totht91


text:
ConfigurationDbContext is Disposed

ConfigurationDbContext is disposed before the token is generated. When using IdentityServerTools.
I've tried this both with manually adding the ConfigurationDbContext and with relying on the configuration from the Configuration store
        //I've also tried without this line
        services.AddDbContext<ConfigurationDbContext>(options
            => options.UseSqlServer(connectionString));

                var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
        services.AddIdentityServer()
            .AddDeveloperSigningCredential()
            .AddAspNetIdentity<ApplicationUser>()
            .AddOperationalStore(options =>
            {
                options.ConfigureDbContext = builder =>
                    builder.UseSqlServer(connectionString,
                    s => s.MigrationsAssembly(migrationsAssembly));

                // this enables automatic token cleanup. this is optional.
                options.EnableTokenCleanup = true;
                options.TokenCleanupInterval = 30;
            })
            .AddConfigurationStore(options =>
            {
                options.ConfigureDbContext = builder =>
                    builder.UseSqlServer(connectionString,
                    s => s.MigrationsAssembly(migrationsAssembly));

            });

I'm trying to generate a token to consume identityserver as a client from my api.  Sometimes the ConfigurationDbContext is already disposed, sometimes it throws on the first line sometimes it throws on the last
    private async Task<string> CreatePaymentsTokenAsync()
    {
        // Get client for JWT
        var idpClient = await this._configurationDbContext.Clients.Include(x => x.AllowedScopes)
            .FirstOrDefaultAsync(c => c.ClientId == Config.APIServerClientId);
        // Get scopes to set in JWT
        var scopes = idpClient.AllowedScopes.Select(s => s.Scope).ToArray();
        // Use in-built Identity Server tools to issue JWT
        var token = await _identityServerTools.IssueClientJwtAsync(idpClient.ClientId,
            idpClient.AccessTokenLifetime, scopes, new[] { "MyApi" });
        return token;
    }

I think the error was slightly different when it occurred on the last line,
something about accessing the provider.
Do you know of a way I can access the clients without manually injecting
the database, I feel like there’s something built into identity server but
I could be wrong
On Thu, Dec 6, 2018 at 3:26 AM Dominick Baier notifications@github.com
wrote:

hm - I can't see how that would be related.
As you can see:
https://github.com/IdentityServer/IdentityServer4/blob/master/src/IdentityServerTools.cs#L47-L63
Is not doing any DB related things.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/IdentityServer/IdentityServer4/issues/2871#issuecomment-444788673,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMsMnaoR2ThJKF16gyDkWwxFYK9FadpLks5u2NSugaJpZM4ZFuJn
.

As a side note - you don't need to use a "real client" - this helper will simply create a token based on the values you pass in.

Thanks, that resolves the issue


text:
Code flow & forced to login after app was closed for ~ 1 hour

Hello,
I would like to implement a persistent login with refresh tokens without prompting the login view to the user but i have to login again after the app was closed for like 1 hour +.
Steps to reproduce

login into the app via navigating to a restricted area like dashboard
close the app
open it after 1 hour+
click again on dashboard

issue: the user gets redirected to the identity server and has to login again
expected: user can continue without the login prompt
Do i have to implement the refresh of the accesstoken via refreshtoken by myself when the accesstoken is already expired? or is the identity server doing that by its own? Probably thats the missing part. The refresh is working when im using the app (probably from silent-refresh.html i think). But if i reopen the app after 1 hour and navigating to an restricted area the refresh token should be still valid.
I tested it mainly on a installed pwa on android but it happens on desktop as well.
If someone wants to look at it, its hosted here, its just a template app no real usecase or promotion or something.
https://whitewulf.herokuapp.com/home
Username: testuser@beiop.com
PW: GitHubDemo5&&
The facebook login is working only in dev mode (only for me, because of corona the registration is disabled by facebook).
Testing (currently deployed for demo, before it was both on 3600):

Access Token expiration  on 2 min
Identity Token expiration on 2 min

On inspecting the network i can see that the access and refresh token gets refreshed every min or so. This is working like expected, it seems like when im using the app it works properly.
The problem occurs when im closing the app like for 1 hour and open it again, navigating on a restricted area my app redirects me to the login screen.
If i close my app only for some minutes everything works without prompt the login.
Thats my Config
ClientId = "angular_spa",
                    ClientName = "angular_spa",
                    AccessTokenType = AccessTokenType.Jwt,
                    AccessTokenLifetime = 120,
                    IdentityTokenLifetime = 120,
                    RefreshTokenExpiration = TokenExpiration.Sliding,
                    RefreshTokenUsage = TokenUsage.OneTimeOnly,
                    AbsoluteRefreshTokenLifetime = 0,
                    SlidingRefreshTokenLifetime = 2592000,
                    RequireClientSecret = false,
                    AllowedGrantTypes = GrantTypes.Code,
                    RequirePkce = true,
                    AllowAccessTokensViaBrowser = true,
                    AllowedScopes = new List<string> {
                        IdentityServerConstants.StandardScopes.OpenId,
                        IdentityServerConstants.StandardScopes.Profile,
                        IdentityServerConstants.StandardScopes.OfflineAccess,
                        "spa",
                        "role"},
                    RedirectUris = new List<string>(settings.RedirectUrl),
                    PostLogoutRedirectUris = new List<string>(settings.PostLogoutRedirectUri),
                    AllowedCorsOrigins = new List<string>(settings.AllowedCorsOrigin),
                    RequireConsent = false,
                    EnableLocalLogin = true,
                    AlwaysIncludeUserClaimsInIdToken = true,
                    AllowOfflineAccess = true,
                    AlwaysSendClientClaims = true,
                    UpdateAccessTokenClaimsOnRefresh = true,
                    UserSsoLifetime = 31104000

My Identity registration:
services.AddIdentityServer(options =>
            {
                options.Events.RaiseErrorEvents = true;
                options.Events.RaiseInformationEvents = true;
                options.Events.RaiseFailureEvents = true;
                options.Events.RaiseSuccessEvents = true;
                options.UserInteraction.LoginUrl = "/Account/Login";
                options.UserInteraction.LogoutUrl = "/Account/Logout";
                options.Authentication = new AuthenticationOptions()
                {
                    CookieLifetime = TimeSpan.FromSeconds(31104000),
                    CookieSlidingExpiration = true
                };
                if (appsettings.IssuerUri != string.Empty)
                {
                    options.IssuerUri = appsettings.IssuerUri;

                    if (appsettings.EnablePublicOrigin)
                    {
                        options.PublicOrigin = appsettings.IssuerUri;
                    }
                }
            })
            .AddDeveloperSigningCredential()
            .AddAspNetIdentity<ApplicationUser>()
            .AddProfileService<IdentityWithAdditionalClaimsProfileService>()
            .AddConfigurationStore(options =>
            {
                if (appsettings.AuthDbType == DatabaseTypes.MSSQL)
                {
                    options.ConfigureDbContext = b => b.UseSqlServer(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly));
                }
                if (appsettings.AuthDbType == DatabaseTypes.Postgre)
                {
                    options.ConfigureDbContext = b => b.UseNpgsql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly));
                }
            })
            .AddOperationalStore(options =>
            {
                if (appsettings.AuthDbType == DatabaseTypes.MSSQL)
                {
                    options.ConfigureDbContext = b => b.UseSqlServer(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly));
                }
                if (appsettings.AuthDbType == DatabaseTypes.Postgre)
                {
                    options.ConfigureDbContext = b => b.UseNpgsql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly));
                }
            });

Thats the angular part, not sure if its relevant but just for completion:
import { Injectable } from '@angular/core';
import { UserManager, UserManagerSettings, User } from 'oidc-client';
import { Router } from '@angular/router';
import { UserRoles } from '../../models/UserRoles';
import { environment } from '../../../environments/environment';

@Injectable({
    providedIn: 'root',
})
export class AuthService {
    public manager: UserManager = new UserManager(getClientSettings());
    public user: User = null;

    constructor(private router: Router) {
        this.manager.getUser().then(user => {
            this.user = user;
        });

        this.manager.events.addUserLoaded(x => {
            this.user = x;
        });

        this.manager.events.addAccessTokenExpired(x => {
            this.manager.signinSilent().then(function (user) {
            }).catch(function (e) {
            })
        });
    }

    isLoggedIn(): boolean {
        return this.user != null && !this.user.expired && this.user.profile.role != null;
    }

    isStandardUser() {
        return this.user != null &&
            !this.user.expired &&
            this.user.profile.role != null &&
            this.user.profile.role.some(x => x === UserRoles.Standard);
    }

    isAdministrator() {
        return this.user != null &&
            !this.user.expired &&
            this.user.profile.role != null &&
            this.user.profile.role.some(x => x === UserRoles.Administrator);
    }

    getClaims(): any {
        if (this.user) {
            return this.user.profile;
        } else {
            return { name: 'Guest' }
        }
    }

    getAuthorizationHeaderValue(): string {
        if (this.user) {
            return `${this.user.token_type} ${this.user.access_token}`;
        }
        return '';
    }

    startAuthentication(): Promise<void> {
        return this.manager.signinRedirect();
    }

    completeAuthentication(): Promise<void> {
        return this.manager.signinRedirectCallback().then(user => {
            this.user = user;
        });
    }

    logout(): Promise<any> {
        return this.manager.signoutRedirect();
    }
}

export function getClientSettings(): UserManagerSettings {
    return {
        authority: environment.authority,
        client_id: 'angular_spa',
        redirect_uri: environment.redirect_uri,
        response_type: "code",
        scope: "openid profile spa role offline_access",
        filterProtocolClaims: true,
        loadUserInfo: true,
        automaticSilentRenew: true,
        silent_redirect_uri: environment.silent_redirect_uri
    };
}

import { Injectable } from '@angular/core';
import {
    HttpRequest,
    HttpHandler,
    HttpEvent,
    HttpInterceptor
} from '@angular/common/http';

import { Observable } from 'rxjs';
import { AuthService } from '../services/auth.service';

@Injectable()
export class TokenInterceptor implements HttpInterceptor {
    constructor(
        public authService: AuthService) {
    }

    intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
        if (request.url.indexOf('/token') == -1) {
            request = request.clone({
                setHeaders: {
                    Authorization: this.authService.getAuthorizationHeaderValue(),
                    Platform: 'default',
                    Accept: 'application/json',
                    'Cache-Control': 'no-cache',
                    'Pragma': 'no-cache'
                },
                setParams: {
                    'platform': 'default'
                }
            });
        }

        return next.handle(request);
    }
}

import { Injectable } from '@angular/core';
import { Router, CanActivate, CanLoad, ActivatedRouteSnapshot, Route } from '@angular/router';
import { AuthService } from '../core/services/auth.service';

@Injectable()
export class AuthGuard implements CanActivate, CanLoad {

    constructor(
        private authService: AuthService,
        private router: Router) { }

    canLoad(route: Route): boolean {
        return this.check(route.data.expectedRoles);
    }

    canActivate(route: ActivatedRouteSnapshot): boolean {
        return this.check(route.data.expectedRoles);
    }

    private check(expectedRoles: string[]): boolean {
        if (this.authService.isLoggedIn()) {
            const roles = this.authService.getClaims().role as string[];
            if (roles &&
                expectedRoles &&
                expectedRoles.some(x => roles.some(r => r == x))) {
                return true;
            }
            this.router.navigate(['/not-authorized']);
            return false;
        }
        this.authService.startAuthentication();
        return false;
    }
}

and the silent-refresh.html (i dont need it propably but should be okay with code flow as well right?)
<head>
  <title></title>
</head>
<body>
  <script src="es6-promise.min.js"></script>
  <script src="es6-promise.auto.min.js"></script>
  <script>
    __Zone_enable_cross_context_check = true;
  </script>
  <script src="oidc-client.min.js"></script>
  <script>
    new UserManager().signinSilentCallback()
      .catch((err) => {
        console.log(err);
      });
  </script>
</body>

when this behaviour happens i see following message on the auth service:
"Identity.Application was not authenticated. Failure message: Unprotect ticket failed"

Might be an issue with asp.net core data protection changing keys on production environment.
https://identityserver4.readthedocs.io/en/latest/topics/deployment.html#asp-net-core-data-protection

Might be an issue with asp.net core data protection changing keys on production environment.
https://identityserver4.readthedocs.io/en/latest/topics/deployment.html#asp-net-core-data-protection

Hm yes maybe thsts the issue. I will look at it later today. Not sure what needs to be done for this topic for now.

Might be an issue with asp.net core data protection changing keys on production environment.
https://identityserver4.readthedocs.io/en/latest/topics/deployment.html#asp-net-core-data-protection

i had to implement a store on my keys like a database one right? im trying this right now.

its fixed by adding a storage for keys.
configure:
services.AddDbContext<KeysDbContext>(options => options.UseSqlServer(connectionString));
services.AddDataProtection().PersistKeysToDbContext<KeysDbContext>();

and start migration:
serviceScope.ServiceProvider.GetRequiredService<KeysDbContext>().Database.Migrate();
thanks for the hint with the data protection crazyfx1.
The issue can be closed

Just want to say thanks to @crazyfx1 and @SergejSachs for hints.
A few more links for those who will have similar problem:

Configure ASP.NET Core Data Protection and samples
Key Management for IdentityServer and samples

authors: RichMcLaren SergejSachs crazyfx1


text:
🛑 GeminiAIChatBot is down

In e8056c1, GeminiAIChatBot (https://chat.waithakasam.com) was down:

HTTP code: 530
Response time: 108 ms

Resolved: GeminiAIChatBot is back up in 725d71e after 36 minutes.

repo: IdrisFallout/upptime


text:
[comp: input] add input, textarea and input-group components

[x] I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

需要用户输入表单域内容时。
提供组合型输入框，带搜索的输入框，还可以进行大小选择。

What does the proposed API look like?

ix-input
Props

除以下表格之外还支持原生 input 元素的所有属性。

名称
说明
类型
默认值
全局配置
备注

v-model:value
控件值
string
-
-
-

control
控件控制器
string|AbstractContro
-
-
当存在 control 时, 控件将由 AbstractControl 完全控制，此时 value 会失效

disabled
是否禁用状态
boolean
false
-
-

addonAfter
设置后置标签
string|v-slot:addonAfter
-
-
-

addonBefore
设置前置标签
string|v-slot:addonBefore
-
-
-

suffix
设置后缀图标
string|v-slot:suffix
-
-
-

prefix
设置前缀图标
string|v-slot:prefix
-
-
-

size
设置大小
large|medium|small
medium
✅
-

borderless
是否显示边框
boolean
false
✅
-

Emits

名称
说明
参数类型
备注

suffixClick
后缀图标被点击
(value:string, evt: MouseEvent) => void
-

prefixClick
前缀图标被点击
(value:string, evt: MouseEvent) => void
-

ix-textarea
TextareaProps

除以下表格之外还支持原生 textarea 元素的所有属性。

名称
说明
类型
默认值
全局配置
备注

v-model:value
控件值
string
-
-
-

control
控件控制器
`string
AbstractControl`
-
-

autoRows
是否显示自适应 rows
boolean|{ minRows: number, maxRows: number }
false
✅
-

showCharacterCount
是否展示字符数
boolean
false
✅
-

maxCharacterCount
数字提示显示的最大值
number|string
-
✅
仅用于提示，不做校验控制

computeCharacterCount
自定义计算 characterCount 的函数
(v: string) => number
v => v.length
✅
-

ix-input-group
GroupProps

名称
说明
类型
默认值
全局配置
备注

compact
是否用紧凑模式
boolean
false
-
-

size
设置组内控件大小
large|medium|small
-
-
-

clear 是一个常见需求, 是不是可以考虑加进去, 这个图标的显示通常跟 input 的 hover 相关, 外部实现不是很方便

clear 是一个常见需求, 是不是可以考虑加进去, 这个图标的显示通常跟 input 的 hover 相关, 外部实现不是很方便

部分特殊按钮的回调可以提供一个事件出去, 不然用户需要透传监听所有的按键, 然后还要筛选它 key, 这个比较麻烦

部分特殊按钮的回调可以提供一个事件出去, 不然用户需要透传监听所有的按键, 然后还要筛选它 key, 这个比较麻烦

clear 是一个常见需求, 是不是可以考虑加进去, 这个图标的显示通常跟 input 的 hover 相关, 外部实现不是很方便

hover 的时候 显示 clear 图标是吗？如果用户同时还设置了 suffix 应该是怎么样的一种行为?

clear 是一个常见需求, 是不是可以考虑加进去, 这个图标的显示通常跟 input 的 hover 相关, 外部实现不是很方便

hover 的时候 显示 clear 图标是吗？如果用户同时还设置了 suffix 应该是怎么样的一种行为?

部分特殊按钮的回调可以提供一个事件出去, 不然用户需要透传监听所有的按键, 然后还要筛选它 key, 这个比较麻烦

vue 本身已经对特殊键盘事件提供了回调，我觉得我们就没必要再做一个别名了吧。
参考 https://vue3js.cn/docs/zh/guide/events.html#按键别名

部分特殊按钮的回调可以提供一个事件出去, 不然用户需要透传监听所有的按键, 然后还要筛选它 key, 这个比较麻烦

vue 本身已经对特殊键盘事件提供了回调，我觉得我们就没必要再做一个别名了吧。
参考 https://vue3js.cn/docs/zh/guide/events.html#按键别名

clear 是一个常见需求, 是不是可以考虑加进去, 这个图标的显示通常跟 input 的 hover 相关, 外部实现不是很方便

hover 的时候 显示 clear 图标是吗？如果用户同时还设置了 suffix 应该是怎么样的一种行为?

并排

clear 是一个常见需求, 是不是可以考虑加进去, 这个图标的显示通常跟 input 的 hover 相关, 外部实现不是很方便

hover 的时候 显示 clear 图标是吗？如果用户同时还设置了 suffix 应该是怎么样的一种行为?

并排

group跟form-item功能有一定重叠，建议是不要了
readonly会跟样式挂勾，建议也要
computeCharacterCount这个建议是返回整串字符串
两个事件仅在icon下生效，clear也要加事件事件。插槽就没必要触发事件了

group跟form-item功能有一定重叠，建议是不要了
readonly会跟样式挂勾，建议也要
computeCharacterCount这个建议是返回整串字符串
两个事件仅在icon下生效，clear也要加事件事件。插槽就没必要触发事件了

authors: coolyuantao danranVm zymoplastic

repo: IduxFE/components