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

Sometimes gets stuck in the login screen and doesn't login #326

Closed
rwasef1830 opened this issue Sep 14, 2020 · 10 comments
Closed

Sometimes gets stuck in the login screen and doesn't login #326

rwasef1830 opened this issue Sep 14, 2020 · 10 comments
Labels

Comments

@rwasef1830
Copy link

Hello,
In some cases when connecting / disconnecting VPN on startup, ElectronMail is not able to submit the initial login and gets stuck at the login form and doesn't try anymore. Then I have to open it and manually press the Login button on each account.

There's no log message corresponding to the timestamp when this happens. I will try to capture a log on debug mode when this happens again.

@vladimiry
Copy link
Owner

You could try settings up some "Login delay range (seconds)" value for the account/'s to work around the issue you described (like 5-7 delay range).

Besides, consider trying the persistence session feature. So you fill in the form once, submit it, and then when the app starts next time the login form will be skipped until the session gets nuked for some reason (explicitly, due to expiration, etc).

I will try to capture a log on debug mode when this happens again.

You might want to enable verbose logs mode in the "general" settings block.

@vladimiry
Copy link
Owner

The error message shows the value format, it's a range, like 30-40. So then a random value within that range will be generated.

@rwasef1830
Copy link
Author

You're right, apologies for sleep deprivation mistake. It would be nice if ElectronMail simply added a retrying loop to login in case of login form submission failure instead of silently failing in the background (especially not noticeable if started minimized).

@vladimiry
Copy link
Owner

vladimiry commented Sep 14, 2020

It would be nice if ElectronMail simply added a retrying loop to login in case of login form submission failure instead of silently failing in the background

This is not planned since things might end up in a submitting loop which is a chance to get banned by a service for a period of time. I've already set up a rate-limiting to prevent the auto submitting looping, but it's an extra measure that is not supposed to be triggered. I'd recommend trying the "persistence session" feature.

especially not noticeable if started minimized

You get a yellow dot shown on the tray icon if at least one account has not got the signed-in state.

@rwasef1830
Copy link
Author

rwasef1830 commented Sep 14, 2020

This is not planned since things might end up in a submitting loop which is a chance to get banned by a service for a period of time. I've already set up a rate-limiting to prevent the auto submitting looping, but it's an extra measure that is not supposed to be triggered. I'd recommend trying the "persistence session" feature.

Ok, how about auto submit loop only on network timeout or network error (connection closed or connection reset) or SSL error, and keep the rate limiting in case of HTTP 4xx or 5xx or negative API response. This is a middle ground solution that won't cause service banning. And it can be optional.

@vladimiry
Copy link
Owner

I'm not ready to complicate the code/logic in the described way and supporting it then. Especially given the fact that the majority of users don't face the issue you placed. So the feature request still gets won't fix status from my side.

@rwasef1830
Copy link
Author

Well this issue will be very common for anyone who runs ElectronMail in startup, but doesn't gain internet access by the time ElectronMail runs (eg: needs to connect to VPN to be able to access internet after login).

I would hope that you would reconsider this, especially that almost all apps (desktop sync, mail notifiers...etc.) are robust against intermittent internet connection and can support this scenario. But I guess, the login delay range time maybe a usable workaround.

It is up to you if you want to close this issue or keep it open for a future date. Thanks for reading my request.

@vladimiry
Copy link
Owner

vladimiry commented Sep 14, 2020

Well this issue will be very common for anyone who runs ElectronMail in startup, but doesn't gain internet access by the time ElectronMail runs (eg: needs to connect to VPN to be able to access internet after login).

It's not exactly like this. The app won't start the login forms submitting until it detected that the internet connection is up. Besides, the app checks the online status before any interaction with the protonmail's UI/forms/services. I guess in your case the connection is intermitting. I also often use VPN + proxy and I face no issue you have described. The types of apps you listed normally call the API directly which is easier to retry, etc, but ElectronMail interacts with the protonmail's UI/forms which makes things harder.

Again, I believe that things like persistent session + delay range + yellow dot on tray icon should make your issue less annoying.

The error codes checking and retry is implemented for some cases. Like for example mail messages syncing feature in the case of enabled local store option.

@rwasef1830
Copy link
Author

Yes, you're right, my internet without VPN is very intermittent, and i have to use VPN to make it stable, thanks for the clarification.

@vladimiry
Copy link
Owner

So then I think the delay range should fix things for you. You can also set the increased delay range for different accounts to make them login in a sequence if needed.

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