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

Getting 'Invaid Refresh Token' while logging into ProtonMail account in MacOS #125

Closed
fmunim opened this issue Apr 1, 2019 · 7 comments
Closed
Labels

Comments

@fmunim
Copy link

fmunim commented Apr 1, 2019

Hello, I am getting this error while logging into my accounts in ElectronMail
I am using the latest version 3.1.0 in MacOS 10.14.4 Mojave

Here's the error's screenshot:
https://imgur.com/wLt7f6N

Nothing of too major but it does bug me.

Thanks!

@fmunim fmunim changed the title Getting 'Invaid Refresh Token' while logging in MacOS Getting 'Invaid Refresh Token' while logging into ProtonMail account in MacOS Apr 1, 2019
@vladimiry
Copy link
Owner

I've tried locating the hardcoded error message in the webclient's sources but it's not there. So the error message is not static but seems to be coming from the server as a custom error.

At this stage, it's hard to guess what is happening but we can try narrowing down the scope first:

  • Does the error occur if you use Chrome/Chromium browser?
  • Does the error occur on every login? Can you try for like 3-5 times in a row? So we know that issue is either persistent or sporadical.
  • Does the error occur if you use https://beta.protonmail.com [online / live]domain entry point (the most recent app release comes with prepackaged WebClient@3.15.22 but the live version is 3.15.23)?
    online.
  • Is the second/mail password used?
  • If you have more than one account does the error occur for all of them?
  • Was such error occurring when you were using previous app versions (if you did use previous versions)?
  • Can you also click logout being signed in (the app then should relogin you again automatically) and see if the error occurs? So we test both cases which are login on starting the app and relogin after manual logout without restarting the app.
  • Is the local store option enabled for the account (local messages database that enables offline access and full-text search features)? If so does the error occur if the option is disabled?
    local
  • Is there anything in the log file (file is located in the settings folder)? You can send the log file privately if you prefer not to attaching it here (see author of package.json file).

Nothing of too major but it does bug me.

Does it mean that the app/protonmail functionality is not affected, means you got signed into the account despite the shown error?

@fmunim
Copy link
Author

fmunim commented Apr 2, 2019

  • No.
  • Yes.
  • Same happens there also
  • No
  • Yup
  • Started occurring 2 releases before this 3.1.0 release
  • Same thing
  • Nope/Yea still occurs on without or not
  • Here's my log file: https://www72.zippyshare.com/v/SXSC7eXA/file.html
    There's this another same error (behaves in the same way):
    https://imgur.com/ba6RUQr
    The functionality is same as always -- got logged in regardless, and it works without any problem

@vladimiry
Copy link
Owner

  • Does the Failed to resolve some DOM elements from the list [mailboxPassword, submit] within "20000" milliseconds error always occur after the original Invaid Refresh Token error with about 20 seconds dealy or sometimes you get only one of them?
  • Can you make sure one more time that the second/mail password value is empty for all the accounts you get the original error for? See the respective input on the form:
    mail-password

I originally asked about a second/mail password because I had a guess that error occurs during the respective API call and I still think the same.

You responded that you don't use a second/mail password for your accounts:

  • If you don't have a second/mail filled for your accounts in the app but the app still tries to submit it then that would be a not yet reproducible bug.
  • If you have a second/mail value filled in the app but it's not enabled for protonmail account then the app should not try to submit it. This is actually reproducible. If I fill in the app a second/mail password value for the account that doesn't have such password enabled on the protonmail side then the app still tries to submit it. Though I get only the Failed to resolve some DOM elements error but not the original one. This is not a critical error but I'm going to handle it anyway.

@fmunim
Copy link
Author

fmunim commented Apr 2, 2019

  • Sometimes I get it at the same time, some times there's some delay or there's only one of them -- differs
  • I got this filled, same as my login password (I think this was the cause since removing this mailbox password yielded no more of those errors)

I think the app was trying to submit the second password but since it didn't exist it throws out an error, it's the exact thing you guessed.

Thanks :)

@vladimiry
Copy link
Owner

vladimiry commented Apr 3, 2019

I got this filled, same as my login password (I think this was the cause since removing this mailbox password yielded no more of those errors)

Ok, so now this is clear.

This is not a critical error but I'm going to handle it anyway.

The pre 3.1.1 build includes a fix of preventing the app from submitting a mail password mistakenly saved in the app but not enabled at the protonmail side. Can you try it (you will need to get back wrongly filled mail password to test the original case)?

@vladimiry vladimiry added the bug label Apr 3, 2019
vladimiry added a commit that referenced this issue Apr 5, 2019
@vladimiry
Copy link
Owner

The provided above build comes with a fix. The fix will be included in the next release. Closing as resolved.

@fmunim
Copy link
Author

fmunim commented Apr 6, 2019

@vladimiry I can confirm the pre-built 3.1.1 fixes this. I have tried it with the password and it didn't show any error 🥂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants