stacks-archive / blockstack-browser

The Blockstack Browser
Mozilla Public License 2.0
1.12k stars 199 forks source link

Blockstack Authentication failing #1970

Open ryanarndtcm opened 5 years ago

ryanarndtcm commented 5 years ago

A report of a blockstack auth hanging so no login possible across apps. Ticket came in at 113ET, Tuesday November 12.

I'm unable to login into any blockstack apps. Once I enter all the steps and create a password or enter my password for the specific apps it just hangs on authentication. I'm using Firefox latest version on Linux with default settings. I have a few privacy plugins activated including uBlock origin, Privacy Badger, HTTPS everywhere, and decentraleyes. I tested it on two computers running the same version of Firefox and Linux and both can't login. I tried the Falkon browser as well but can't login either.

zone117x commented 5 years ago

Can the user provide console logs?

Also, is this using the native linux Blockstack Browser app, or using browser.blockstack.org?

stackatron commented 5 years ago

Sounds like @friedger is also having this issue? Big questions here are:

@hstove something you may need to jump on.

ryanarndtcm commented 5 years ago

I will contact them with this ticket eo they can add more information.

On Wed., Nov. 13, 2019, 12:08 p.m. Matthew Little, notifications@github.com wrote:

Can the user provide console logs?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/blockstack/blockstack-browser/issues/1970?email_source=notifications&email_token=AMOV57PSWU3377AN35UDPQTQTQRATA5CNFSM4JMKFMUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED6U4GQ#issuecomment-553471514, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOV57P56YMRMTSHUGJRCCLQTQRATANCNFSM4JMKFMUA .

friedger commented 5 years ago

I see this also on Android with Firefox and Brave browsers. Helloblockstack.com works, oi-timesheet.com not.

Ryan Arndt notifications@github.com schrieb am Mi., 13. Nov. 2019, 17:20:

I will contact them with this ticket eo they can add more information.

On Wed., Nov. 13, 2019, 12:08 p.m. Matthew Little, < notifications@github.com> wrote:

Can the user provide console logs?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/blockstack/blockstack-browser/issues/1970?email_source=notifications&email_token=AMOV57PSWU3377AN35UDPQTQTQRATA5CNFSM4JMKFMUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED6U4GQ#issuecomment-553471514 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMOV57P56YMRMTSHUGJRCCLQTQRATANCNFSM4JMKFMUA

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/blockstack/blockstack-browser/issues/1970?email_source=notifications&email_token=AALBYWO5EGJ2XOE7VZ56BV3QTQSLBA5CNFSM4JMKFMUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED6WC2Q#issuecomment-553476458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBYWPD55KZQVH7WKWKSSTQTQSLBANCNFSM4JMKFMUA .

diwakergupta commented 5 years ago

@timstackblock can you attempt a repro?

ghost commented 5 years ago

Can the user provide console logs?

Also, is this using the native linux Blockstack Browser app, or using browser.blockstack.org?

I'm using browser.blockstack.org, not the native app. I didn't know there was a native Linux app so I'll try that as well.

ghost commented 5 years ago

How do I get you my console logs? Not sure how to do that.

friedger commented 5 years ago

Native app didn't work for me neither. Console is empty for me.

drhedberg notifications@github.com schrieb am Mi., 13. Nov. 2019, 18:47:

How do I get you my console logs? Not sure how to do that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/blockstack/blockstack-browser/issues/1970?email_source=notifications&email_token=AALBYWJUHHCXOAAM2EDXJFLQTQ4T3A5CNFSM4JMKFMUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED7BH6Q#issuecomment-553522170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBYWO7UFCWY3OBU56U5U3QTQ4T3ANCNFSM4JMKFMUA .

nieldlr commented 5 years ago

I can't authenticate any apps as well with the latest native app release on Mac. Here's my console.log showing errors with the JS.

vendors.1f48e577386bd45e5818.chunk.js:172 TypeError: Cannot read property 'apiUrl' of undefined
    at G.render (SignUpPage.de7493d5c54977fdf4ab.chunk.js:1)
    at ji (vendors.1f48e577386bd45e5818.chunk.js:172)
    at Ni (vendors.1f48e577386bd45e5818.chunk.js:172)
    at Si (vendors.1f48e577386bd45e5818.chunk.js:172)
    at Wa (vendors.1f48e577386bd45e5818.chunk.js:172)
    at $a (vendors.1f48e577386bd45e5818.chunk.js:172)
    at jc (vendors.1f48e577386bd45e5818.chunk.js:172)
    at xc (vendors.1f48e577386bd45e5818.chunk.js:172)
    at wc (vendors.1f48e577386bd45e5818.chunk.js:172)
    at Ja (vendors.1f48e577386bd45e5818.chunk.js:172)
fa @ vendors.1f48e577386bd45e5818.chunk.js:172
sign-up:1 Error while trying to use the following icon from the Manifest: http://localhost:8888/static/images/app-blockstack.png (Download error or resource isn't a valid image)
browser-api.blockstack.org/event:1 Failed to load resource: the server responded with a status of 400 ()
main.34212eef27fb6b102770.chunk.js:1 Uncaught (in promise) Error: Server responded with status code 400
    at main.34212eef27fb6b102770.chunk.js:1

Apps that use browser.blockstack.org seem to be working. But once the apps request the native app for auth, this hangs on a blank with the logs above.

I also can't access any of the native app pages like Home, IDs etc. They all hang with the same issues.

Let me know if need any more info here.

Edit: Downgrading to v0.36.1 also giving the same errors. Edit #2: I cloned the latest code on master & ran it in dev mode and authentication worked smoothly. So something must be happening with the official builds/releases?

dantrevino commented 5 years ago

Brave and Firefox on Linux both work with Graphite Docs, Webby, NoteRiot via the browser (not tested with local install).

Brave and Firefox on Linux both cannot log in to oi-timesheet.com via the browser (local install not tested).

ghost commented 5 years ago

Here is the output for BlockSurvey when trying to login into the app from the actual apps website:

ERROR Error: "Uncaught (in promise): LoginFailedError: Failed to login: Authenticating with protocol > 1.1.0 requires transit key, and none found. code: login_failed param: n/a r@https://blocksurvey.org/main.558b48caeccbab46805a.js:1:864547 @https://blocksurvey.org/main.558b48caeccbab46805a.js:1:866060 /i3U/t.handlePendingSignIn/<@https://blocksurvey.org/main.558b48caeccbab46805a.js:1:35749 l@https://blocksurvey.org/main.558b48caeccbab46805a.js:1:31754 0TWp/</</</c</e.prototype.invoke@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:7117 onInvoke@https://blocksurvey.org/main.558b48caeccbab46805a.js:1:531203 0TWp/</</</c</e.prototype.invoke@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:7057 0TWp/</</</i</t.prototype.run@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:2320 I/<@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:13779 0TWp/</</</c</e.prototype.invokeTask@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:7801 onInvokeTask@https://blocksurvey.org/main.558b48caeccbab46805a.js:1:531115 0TWp/</</</c</e.prototype.invokeTask@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:7722 0TWp/</</</i</t.prototype.runTask@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:2983 g@https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1:10068 " P https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 P https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 I https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 invokeTask https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 onInvokeTask https://blocksurvey.org/main.558b48caeccbab46805a.js:1 invokeTask https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 runTask https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 g https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 main.558b48caeccbab46805a.js:1:519352 Jd https://blocksurvey.org/main.558b48caeccbab46805a.js:1 handleError https://blocksurvey.org/main.558b48caeccbab46805a.js:1 next https://blocksurvey.org/main.558b48caeccbab46805a.js:1 o https://blocksurvey.org/main.558b48caeccbab46805a.js:1 __tryOrUnsub https://blocksurvey.org/main.558b48caeccbab46805a.js:1 next https://blocksurvey.org/main.558b48caeccbab46805a.js:1 _next https://blocksurvey.org/main.558b48caeccbab46805a.js:1 next https://blocksurvey.org/main.558b48caeccbab46805a.js:1 next https://blocksurvey.org/main.558b48caeccbab46805a.js:1 emit https://blocksurvey.org/main.558b48caeccbab46805a.js:1 onHandleError https://blocksurvey.org/main.558b48caeccbab46805a.js:1 invoke https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 run https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 runOutsideAngular https://blocksurvey.org/main.558b48caeccbab46805a.js:1 onHandleError https://blocksurvey.org/main.558b48caeccbab46805a.js:1 handleError https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 runGuarded https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 e https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 microtaskDrainDone https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1 g https://blocksurvey.org/polyfills.5ce8a61014f898f0ad58.js:1

zone117x commented 5 years ago

@friedger oi-timesheet.com has a bug in it's auth code https://github.com/friedger/time-calc/issues/18

@drhedberg Based on your logs, it looks like your web browser's localStorage may not be persisting data. Perhaps caused by a privacy extension?

friedger commented 5 years ago

This issue is also related to https://github.com/blockstack/app-mining/issues/172 and https://github.com/blockstack/blockstack-browser/issues/1892#issuecomment-552079442

@zone117x Thanks for the issue on oi-timesheet. The bug for the blockstack browser is that it does not handle unknown scopes correctly.

ghost commented 5 years ago

@drhedberg Based on your logs, it looks like your web browser's localStorage may not be persisting data. Perhaps caused by a privacy extension?

I noted the privacy extensions in the original post. How to determine which one it is?

ryanarndtcm commented 5 years ago

@zone117x is there anything else that @drhedberg can provide to help diagnose the problem?

zone117x commented 5 years ago

@drhedberg I doubt the cause would be from default installations of the uBlock Origin or HTTPS Everywhere extensions, as I use those and am familiar with their behavior. However, I have no idea about the other extensions.

I'd recommend testing with them disabled and see what works. Would probably take a few minutes but pretty straightforward process.

This also assumes that your Firefox installation is typical, and does not have some non-default flags configured that would cause this behavior.

ghost commented 5 years ago

@zone117x Disabled uBlock origin, https everywhere, cookie autodelete, privacy badger, and decentralyze but still having the same issue. No extensions are active so it appears these are unrelated.

I'm using Firefox 70.0.1 on Manjaro Linux which is based on Arch. It is the latest version from the repositories.

When I go to https://browser.blockstack.org/ I am able to access all the blockstack apps with all extensions active. It is only when I try to sign in directly from the apps website that it doesn't work. So I am able to access the apps successfully the way my Firefox is configured just not from the apps website.

Here is the error:

Error: Failed to login: Authenticating with protocol > 1.1.0 requires transit key, and none found.

zone117x commented 4 years ago

@drhedberg I installed Manjaro, using the default download from their website: manjaro-xfce-18.1.3-191114-linux53.iso. Firefox 70.0.1 was pre-installed.

I was able to login at browser.blockstack.org. Then directly went to the following apps and was able to login:

I then cleared data and reset Firefox, and installed every extension mentioned:

I was able to re-login at browser.blockstack.org, then visit each of those same apps and login successfully.

This is not a reproducible bug with Blockstack when using Firefox on Manjaro Linux. Something unique to your system configuration or web browser usage is causing this problem.

@drhedberg:

When I go to https://browser.blockstack.org/ I am able to access all the blockstack apps with all extensions active. It is only when I try to sign in directly from the apps website that it doesn't work. So I am able to access the apps successfully the way my Firefox is configured just not from the apps website.

This doesn't make sense to me. When using Blockstack auth, there is no difference between visiting an app directly vs. visiting an app from a hyperlink on browser.blockstack.org.

Given the context, it sounds like you are using Firefox in a way that aggressively sandboxes an app when "opened directly", and clears its transient auth data when the tab is redirected from the app to auth page. This is the problem I was referring to earlier: Based on your logs, it looks like your web browser's localStorage may not be persisting data.

Can you elaborate on what exactly you are doing in Firefox when you "open an app directly"?

ghost commented 4 years ago

Thank you for the update. As noted in my post, I have always been able to access all the apps from https://browser.blockstack.org/

I am not able to access any of the apps if I go to the apps website first and try to login from the actual apps website.

I have never made any changes to my Firefox browser regarding sandboxing as suggested. It is installed by default and I only added the above extensions without any other configurational changes. I'm not sure how else to explain it so I'll try again.

When I go to https://browser.blockstack.org/ I can access all the apps.

If I go to the website of an app first such as pDrive I follow these steps:

  1. Go to https://pdrive.co/
  2. Click "Sign In".
  3. Click "Continue with Blockstack".
  4. Sign in with existing id.
  5. Copy and paste id.
  6. Click "Sign in"
  7. I'm asked to create a password. (Not sure why this happens with every app that I have already created a password for.
  8. Create password.
  9. What is your email address which I enter.
  10. Go to pDrive.
  11. Select and id so I select my blockstack id.
  12. It just takes me back to https://pdrive.co/ and I'm not signed in.
  13. I check inspect element which reports this error: [INFO] Overriding https://core.blockstack.org with https://core.blockstack.org logger.js:50 Failed to register/update a ServiceWorker for scope ‘https://pdrive.co/’: Storage access is restricted in this context due to user settings or private browsing mode. registerServiceWorker.js:59:5

The above happens with all extensions disabled and Firefox set to defualt settings. I can successfully access pDrive if I go to https://browser.blockstack.org/ first but not if I try to login from the actual apps website.

Since I'm able to access all apps from the blockstack browser but not from app websites there is something wrong with blockstacks authentication method.

zone117x commented 4 years ago

I'm asked to create a password. (Not sure why this happens with every app that I have already created a password for.

Storage access is restricted in this context due to user settings or private browsing mode

Both of these indicate the use of incognito/private browsing windows. These are restrictive sandboxes that prevent local data from being persisted -- this includes auth session data.

Since I'm able to access all apps from the blockstack browser but not from app websites there is something wrong with blockstacks authentication method.

There is no such distinction between "login to app from browser.blockstack.org vs login directly from app website". The browser.blockstack.org site simply lists apps with links to their homepage URLs.

ghost commented 4 years ago

I am not using incognito or private browsing windows. Firefox is set to default settings. This is happening on all three of my Manjaro KDE computers with Firefox set to default settings.

There is no such distinction between "login to app from browser.blockstack.org vs login directly from app website". The browser.blockstack.org site simply lists apps with links to their homepage URLs.

It doesn't appear you understand my explanation above. There is a clear distinction between my ability to access every blockstack app if I go directly through the blockstack browser yet I am unable to access a single app if I try to access it from the app's website.

Let's just close this thread since no one is able to understand the problem.

zone117x commented 4 years ago

The explanation is clear, however, there are no programmatic difference in the authentication process -- whether you visit a website from clicking an app link in the blockstack browser, typing in the app URL manually, clicking a bookmark, or any other way you can end up on the app website.

This indicates some abnormal behavioral difference, and it is not reproducible when using the same environment that has been described. There is likely something unique and not-explained about your system's configuration causing this issue.

Perhaps someone else may have better luck reproducing the problem.

diwakergupta commented 4 years ago

It doesn't appear you understand my explanation above. There is a clear distinction between my ability to access every blockstack app if I go directly through the blockstack browser yet I am unable to access a single app if I try to access it from the app's website.

Let's just close this thread since no one is able to understand the problem.

First, @drhedberg thanks for the report and I understand your frustration.

Second, I think @zone117x has tried to reproduce this issue in good faith and I hope you can appreciate that.

Unfortunately, it's not feasible for us to keep attempting repros indefinitely. I'm going to close this out, but do feel free to re-open if you have any new information that might help us debug or if someone else runs into a similar issue.

ghost commented 4 years ago

Nicholas Sichalov has solved the issue with a very simple fix. All I had to do was click the shield to the left of the browser url box and disable enhanced tracking protection on the blockstack browser and now I can use all apps successfully.

I don't like disabling my tracking protection for privacy reasons but I'll have to assume that blockstack is not tracking me in any way. We should be able to maintain tracking protection but still use blockstack so perhaps this can be adjusted for Firefox users.

shawnyarnes commented 4 years ago

I have same issue with Firefox on a Mac. Disabling the enhanced tracking for the blockstack page as well as the individual apps pages, allows Blockstack and apps to work on the Firefox browser.

image
Porocyonak commented 4 years ago

Happy to see that it solved the issue :)

The problem is that blocking 3rd party cookies makes the Blockstack authentication hang after redirecting back to the original site. To get it working, you could either disable Enhanced Tracking Protection for the Blockstack login page, or change the protection to use a 'lighter' cookie block setting (E.g, blocking social media trackers instead of all 3rd party cookies).

ghost commented 4 years ago

This makes sense. I also have to disable enhanced tracking on the actual apps page as well. Thanks for the fix @Porocyonak !

xplosionmind commented 4 years ago

I have same issue with Firefox on a Mac. Disabling the enhanced tracking for the blockstack page as well as the individual apps pages, allows Blockstack and apps to work on the Firefox browser.

Actually, I had the same problem and it doesn't work for me.