-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovery does not work in Safari, and Chrome incognito mode #106
Comments
HI @cybercent I just tired https://port.onflow.org on Safari (which is using Discovery) and it works. Can you provide a little more context? Is there a certain wallet or feature that isn't working for you? Can you also tell us what version of FCL you're having this issue with? Thanks. |
We are using "@onflow/fcl": "^1.2.0". The FCL discovery is used inside a react useEffect as explained in the docs. The network call to fetch the json containing the available wallets is not made by FCL on chrome incognito. In chrome (non-incognito) the network call is made 100% of the time. In Safari the call is sometimes made but most of the time not. Reloading the page does not trigger a network call to fetch the available wallets. Edit:
|
Hi @cybercent , helpful info thanks! Yeah, Flow Port is using the UI version of Discovery and sounds like you're using the API version (UI vs API). I have been able to reproduce this issue using NextJS. I'm guessing that's what you're using? Seems to be related to server side rendered applications. I have a fix for it. We'll get a patch release out soon. |
Looks like page loaded before event listeners are added in Safari. Seems to be an issue with SSRs. Addresses: onflow/fcl-discovery#106
@chasefleming we are not using SSR. But you might be on to something, if I throttle the connection on Safari to cause the page to load slower I sometimes get the network call. |
* Update authn.js Looks like page loaded before event listeners are added in Safari. Seems to be an issue with SSRs. Addresses: onflow/fcl-discovery#106 * Add changeset Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
@cybercent I just put a fix in and published an FCL release to |
@chasefleming we tested It's not clear if the discovery service is meant to return: A. Only the list of wallets defined here: B. The list defined in |
@cybercent glad to hear that worked for you! It depends on your dapp's configuration. Can you post your FCL config (as well as browser) and what you're hoping to see returned? Also, let me know if the browser has any extensions installed. |
@chasefleming our FCL config is the following: config({
We are hoping to see the wallets defined in: https://github.com/onflow/fcl-discovery/blob/master/data/services.json except Ledger and Dapper (which require another config variables) + other wallets the user has installed and are not in services.json which can be for example NuFi or any other wallet. |
Thanks @isiban . Mind also posting the payload being sent over the network at the And also, can you tell me the response you're getting? |
@chasefleming find bellow the payload and the response I'm getting:
|
@isiban forgot to mention that when using the alpha you should point to the preview url generated on this PR: #92 There are a bunch of changes made for the alpha on that branch. When that PR is merged you can switch back to the regular url for Discovery. Still keep the same paths. Just change the origin. |
@chasefleming thanks for the mention 👍🏾 I have a last question about the service provider icon why is it given with a relative path and not an absolute one? |
* Update authn.js Looks like page loaded before event listeners are added in Safari. Seems to be an issue with SSRs. Addresses: onflow/fcl-discovery#106 * Add changeset Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
No description provided.
The text was updated successfully, but these errors were encountered: