Skip to content
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

Failed to open uri while redirectAndSignIn #571

Closed
pshenmic opened this issue Dec 6, 2018 · 7 comments
Closed

Failed to open uri while redirectAndSignIn #571

pshenmic opened this issue Dec 6, 2018 · 7 comments
Assignees
Labels
bug Unwanted or unintended logic causing harm

Comments

@pshenmic
Copy link

pshenmic commented Dec 6, 2018

Hello. I have issue on my environment (Ubuntu 18.04) when blockstackjs library trying to detect protocol and handle redirection. Earlier, I tried to set up local blockstack browser which seems to messed up my environment and led to the error above.

image

Actually, I don't really need local browser feature, I want all my users to authenticate via browser.blockstack.org. I tried to put this url as second argument, but this does not work.

@moxiegirl
Copy link

@pshenmic Thanks for logging this issue. @shreyasthiagaraj or @larrysalibra any suggestions for what to do.

@larrysalibra
Copy link
Contributor

@pshenmic You can use the makeAuthRequest method to generate an the auth request token string and then redirect the user to by appending the string to http://browser.blockstack.org/auth?authRequest= and then redirecting users to the result.

As to how to uninstall the protocol handler on Ubuntu, @kantai should be able to help you out!

@markmhendrickson
Copy link

markmhendrickson commented Jan 7, 2019

I've assigned this to @zone117x since he's actively working on protocol handling and can incorporate Ubuntu into his considerations per @pshenmic's report.

@pshenmic were you able to use the makeAuthRequest method per @larrysalibra's suggestion to direct users to the hosted browser successfully?

@zone117x I've also experienced the same "Failed to open URI" having installed then uninstalled the local browser. Do your protocol handling changes (#591) address this case?

@zone117x
Copy link
Member

zone117x commented Jan 7, 2019

Yes it should fix that situation because it will now always perform an https redirect unless the local browser is actually opened to notify the web app that it's working.

And I believe the iframe method for opening the protocol prevents these type of popups - although that needs testing.

@kantai
Copy link
Collaborator

kantai commented Jan 7, 2019

To remove the Ubuntu protocol handler, you should:

  1. Remove the entry from your mimeapps.list -- edit the file ~/.local/share/applications/mimeapps.list and remove the x-scheme-handler/blockstack entry.
  2. Rename the blockstack protocol handler .desktop file:
mv ~/.local/share/applications/blockstack.desktop ~/.local/share/applications/blockstack.desktop.old 

This will remove any protocol association the OS has with blockstack: URLs.

@moxiegirl moxiegirl added bug Unwanted or unintended logic causing harm production labels Jan 7, 2019
@pshenmic
Copy link
Author

@kantai This instruction did not help me. I don't have anything related to the blockstack in mimeapps.list and blockstack.desktop does not exist in such path.

@larrysalibra But you said it does not work that way on the blockstack forum. https://forum.blockstack.org/t/callback-is-not-fired-with-blockstack-auth/6857/5

@pshenmic
Copy link
Author

The same happened on different environment (Debian), where I havent even installed blockstack browser any time.

Console reports

openUriWithTimeoutHack
[INFO] protocol handler detected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unwanted or unintended logic causing harm
Projects
None yet
Development

No branches or pull requests

6 participants