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

Simplenote users not able to log in with WordPress.com account on Mac, Windows, Linux #1229

Closed
msilbers opened this issue Mar 12, 2019 · 27 comments · Fixed by #1627
Closed
Assignees
Labels
bug Something isn't working [feature] login Anything relating to login. [priority] high Fix/feature is needed ASAP
Milestone

Comments

@msilbers
Copy link

msilbers commented Mar 12, 2019

Two reports so far for Linux (reproducible on Mac and Windows as well)
Ubuntu 18.10 with 4.18 kernel. Simplenote 1.5.0
Linux Mint and Manjaro. Both are the latest LTS version

I can reproduce this on the Electron Mac version as well, and there is a report for Windows, so it's all 3 Electron apps.

Steps to reproduce

  1. Try to sign in via WordPress.com on Linux Simplenote app
  2. Sign in, click Auth

What happened

Linux: "the authorization gets stuck when after clicking "Authorize" button"
Linux: "It goes berserk and issues thousands of requests to auth"
Mac Electron: for me, nothing happens at all

Simplenote version

1.5.0 (is not an issue in 1.4.1)

WORKAROUND:

You can still log into the Simplenote app with your account details, using your email address and password used to originally sign up.

@gellenburg
Copy link

Having the same issue on the Windows 10 / Microsoft Store app version as well. This isn't limited to Linux. Can login just fine from Android. App is stuck on:

Howdy! Simplenote would like to connect to all of your WordPress.com sites.

@liviopv
Copy link

liviopv commented Mar 13, 2019

I've been asking users to remove Simplenote from WordPress.com connected apps in https://wordpress.com/me/security/connected-applications to see if clearing that allows them to login. I believe I answered questions from the 2 Linux users Melissa talked about and another one with login issues in Windows.

Waiting on the user feedback.

@gellenburg
Copy link

gellenburg commented Mar 13, 2019 via email

@msilbers
Copy link
Author

Still unable to login.

@gellenburg for now, are you able to log in with the email address and password originally used to set up your Simplenote account?

@msilbers msilbers added the bug Something isn't working label Mar 14, 2019
@liviopv
Copy link

liviopv commented Mar 14, 2019

#1875140-zen also was not able to login.

@liviopv
Copy link

liviopv commented Mar 14, 2019

I've been able to reproduce it on a Mac as well. It get stuck on:

Screenshot
Screenshot: https://cld.wthms.co/xNEU2Y

@gellenburg
Copy link

gellenburg commented Mar 14, 2019 via email

@msilbers
Copy link
Author

How? By typing in my email and password.

@gellenburg Yes, exactly. If you are having any trouble with that, you can contact support here and we can help you out: https://simplenote.com/contact-us/

@msilbers msilbers changed the title Linux users not able to log in with WordPress.com account Simplenote users not able to log in with WordPress.com account on Mac, Windows, Linux Mar 14, 2019
@gellenburg
Copy link

gellenburg commented Mar 14, 2019

How? By typing in my email and password.

@gellenburg Yes, exactly. If you are having any trouble with that, you can contact support here and we can help you out: https://simplenote.com/contact-us/

I'm confused, what is Support going to be able to help me with when the Electron version of SimpleNote is hanging when I attempt to login with my WordPress account, yet I am able to login with my WordPress Account with the web version of SimpleNote just fine?

Edit: I mis-understood your original question. YES I can login with an Email and password with the Electron version just fine.

@edequalsawesome
Copy link

Bug also reported in #1907138-zen

@pauljacobson
Copy link

I have a further report of this on Windows 10 in 1970162-zen. Here's the user's report:

I use Windows 10 and my internet connection is 500/500 fiber, not proxy or VPN.

I have installed the latest windows version of SimpleNote and do the following:

  1. Start the app

  2. At the login I click “Log in with WordPress.com”

  3. In the Authorize Simplenote window I click “Approve”

  4. The button turns to “Authorizing…” and then nothing happens. See attached screenshot.

The authorization and login worked fine on my Mac and my Android phone.

I've recommended that the user sign in with an email address and password as a workaround.

@mriyazuddin
Copy link

I have a user on Ubuntu 18.04 with snap, Debian package or AppImage and can't login with their WordPress.com account. When they click on Approve button it is stuck on Authorizing...

ZD-1980519

I have advised the user to clear browser cookies and try. Also asked to try logging in with their email address instead of username.

@msilbers
Copy link
Author

msilbers commented May 6, 2019

Issue reported again for Windows app in #2006605-zen
Advised them to log in with email address associated with account instead

@mgalbritton
Copy link

Reported again for windows app in #2017672-zen. Advised to log in with email address instead.

@tarunvijwani
Copy link

Reported again for Ubuntu app in #2016677-zen

@ItsJonQ
Copy link

ItsJonQ commented May 17, 2019

Noticing this as well for https://github.com/Automattic/simplenote-electron/releases/tag/v1.5.0
Mac OS Mojave 10.14.4

@bummytime bummytime added the [feature] login Anything relating to login. label May 21, 2019
@bummytime bummytime added this to the Future milestone May 21, 2019
@bummytime bummytime added the [priority] high Fix/feature is needed ASAP label May 21, 2019
@NGRhodes
Copy link

NGRhodes commented Jun 7, 2019

Affecting me too.
Ubuntu 18.04, Simplenote 1.50

@gemmagarner
Copy link

Another report on Twitter. Windows 10 and Linux (elementary OS 5.0)

@arturogiunta
Copy link

Same Issue. Windows 10 (downloaded exe and store app) Simplenote 1.5.0

@zdenys
Copy link

zdenys commented Jul 24, 2019

Another report in 2202705-zen on Windows: I'm trying to log in to the Windows version using a Wordpress.com account, but I get stuck when I press OK.

@Robertght
Copy link

Another report in #2274510-zen

@iSteveyang
Copy link

When i use simplenote without login with wordprees the cpu level is normal
图片
When i stuck on the cpu level is so weird
图片

@githubdh
Copy link

githubdh commented Sep 7, 2019

Is there an eta for a fix?

@codebykat codebykat self-assigned this Oct 2, 2019
@dmsnell
Copy link
Contributor

dmsnell commented Oct 2, 2019

@codebykat after some auditing I stumbled upon some oddities.

Also see original PR in #764

for one, we request the OAuth token with request_type=code but it looks like we are testing for the redirect URL to be the response from request_type=token. the user, token, and state parameters would come from this.

since we ask for response_type=code the API call responds with simplenote://auth?code=SOMECODE. that SOMECODE is supposed to then be used with a new POST call to https://public-api.wordpress.com/oauth2/token which then finally gives us our expected token inside the response as a JSON payload. But we're not turning around and making that second request so the authentication never goes through.

on the other hand, if we simply request request_type=token we get a response back with set-cookie HTTP headers containing the access token, not a redirect. I think that the token response is meant to set the cookie and have that be that. there aren't complicated redirect procedures involved. the token response type provides a time-limited access token, defaulting to two weeks.


it seems to me like we're probably just confused in this code. the web version and Electron versions should use different mechanisms (web should have auto-expiring token probably, and Electron can store the code) but we're getting lost in the imperative code and interplay with the BrowserWindow.

a few thoughts:

  • the Electron docs are vague but we can create a new session for the BrowserWindow to start fresh with no cookies. this might help us also track things that are happening in the window vs. in the main app as it uses the default session for the application if none is provided
  • we might be spinning in a loop because in our registerHttpProtocol( 'simplenote', … ) call we aren't doing anything with the request. I think we are allowing the existing request to continue along as-is which brings it right back to our registered handler. we should cancel the request and grab the code from the URL there in that handler.
  • did our OAuth process change? no, but the token request isn't providing a redirect! why not?

more manual testing. I used the "Persist Logs" function in the browser network tab and waited until I was ready to hit "Approve" on the "Hello!" screen. This one does the final redirect, and I found something.

When the redirect_uri is https://simplenote.com the response to the request is a 302 -> expected redirect URL with parameters but when it's simplenote://auth the request returns a 200 with nothing but a cookie.

I'm suspicious that we might have an issue on the server when dealing with that protocol link. On the other hand, the test OAuth client you created uses Native when I think it should be Web. I created a clone of yours with this switch though and it didn't seem to matter.

At the heart of this issue is the 200 OK instead of the 302 FOUND response. If we find out why this its happening we'll probably discover why it's failing in this issue.


To summarize:

  • we need to talk about request_type=token vs request_type=code. I don't understand how this ever worked the way it does unless something changed in the OAuth server. There are tradeoffs to each approach: request_type=token is more secure but expires every two weeks; request_type=code is "permanent" but requires a second API call to get the real token.
  • something may be broken about redirect_uri=simplenote://auth because it's providing a 200 instead of a 302
  • nothing forces us to use the simplenote:// link since we can intercept all the redirects and do as we please. if we use https://simplenote.com then the redirect comes back right, though the app is still hunting for searchParams when I believe it should be looking for url.hash. I ran into this over three years ago and used the url.hash back then too, not the search parameters
  • I should have gone to sleep hours ago

@codebykat codebykat removed their assignment Oct 3, 2019
@dmsnell dmsnell self-assigned this Oct 4, 2019
@vietstone-ng
Copy link

I see this error now. I'm using the Windows desktop app, trying to signing in with Wordpress account. I stuck on this screen.
Authorize Simplenote - Google Chrome 6_19_2020 12_01_38 PM

@codebykat codebykat modified the milestones: Future, 1.10 Dec 23, 2020
@ElrikSettee
Copy link

hello from more than 2 years later and it still happens with electron on Mac Mojave. GRRR

@codebykat
Copy link
Member

Hi @ElrikSettee, this is a quite old bug that was fixed in version 1.10, in 2019. If you are currently having trouble logging in can you please open a new issue so we can help track down the problem? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working [feature] login Anything relating to login. [priority] high Fix/feature is needed ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.