Open data-sync-user opened 10 months ago
➤ Lesley Norton commented:
Thanks Bianca Hidecuti - does this repro in previous versions or is this new to 2.20?
➤ Bianca Hidecuti commented:
Lesley Norton, we have seen this only in 2.20 as of yesterday (and only on Stage server), but we are not sure if this is related with the build / version of the VPN or if there are some issues with Guardian / FxA as well, since some sign in issues were encountered on web too (see https://mozilla-hub.atlassian.net/browse/FXA-8866 ( https://mozilla-hub.atlassian.net/browse/FXA-8866|smart-link )).
However, besides the red banners, we were able to see a “Sign in failed - No internet connection” modal 2 or 3 times when we were unable to authenticate (this cannot be triggered when being disconnected from the internet). Was this implemented in 2.20? Thanks!
!modal.png|width=372,height=678!
➤ Bianca Hidecuti commented:
We were unable to reproduce this in the last 2 days, using Mozilla VPN 2.20.0 (2.202401041847), across platforms.
If this will be encountered again, we will reopen the ticket.
Marking this verified as fixed.
➤ Raluca Monica Ilban commented:
Reopening the ticket as it is reproducible again using Mozilla VPN build 2.20.0 (2.202401282210).
Unable to connect red banner is displayed when user tries to sign in.
Attaching logs.
[^mozillavpn-2024-1-29.log] [^mozillavpn.log]
➤ Lesley Norton commented:
tl;dr
Some requests to FxA are timing out and the TimeoutError is being handled in two places AuthenticationInAppSession and ErrorHandler. The former leads to the ‘Signin failed’ modal, and the latter triggers the ‘Unable to connect’ red banner.
Details
Notable logs:
9.01.2024 11:44:37.673] (NetworkRequest) Debug: Network request created by TaskAuthenticate [29.01.2024 11:44:52.755] (NetworkRequest) Error: Network request timeout [29.01.2024 11:44:52.755] (AuthenticationInAppSession) Error: Failed to check the account status QNetworkReply::TimeoutError [29.01.2024 11:44:52.756] (ErrorHandler) Debug: Handling error ErrorHandler::DependentConnectionError [29.01.2024 11:44:52.756] (ErrorHandler) Error: Alert: ErrorHandler::ConnectionFailedAlert{quote}Was this implemented in 2.20? Thanks!{quote}
Bianca Hidecuti no, this modal was implemented along with the rest of the in-app auth flow. We show this modal when a request to FXA (https://api.accounts.firefox.com/v1/account/login, specifically) times out. (https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/src/authenticationinapp/authenticationinappsession.cpp#L314 ( https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/src/authenticationinapp/authenticationinappsession.cpp#L314 )). We then assume that the request has timed out because no internet is available, return the user to authentication start, and pop the “Sign-in failed. No internet connection” modal. The request could time out for any number of reasons though so this is lazy handling on our end.
{quote}Unable to connect red banner is displayed when user tries to sign in.{quote}
This happens when a TimeoutError
is caught in the ErrorHandler ( https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/src/errorhandler.cpp#L131-L132 ) , reclassified as that ‘DependentConnectionError’ we see in the logs and triggers the ‘Unable to Connect’ banner. ( https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/nebula/ui/components/MZSystemAlert.qml#L51-L57 )
Next steps
➤ Lesley Norton commented:
(2024-01-31) tl;dr
Some requests to FxA are timing out and the TimeoutError is being handled in two places AuthenticationInAppSession and ErrorHandler. The former leads to the ‘Signin failed’ modal, and the latter triggers the ‘Unable to connect’ red banner.
Details
Notable logs:
9.01.2024 11:44:37.673] (NetworkRequest) Debug: Network request created by TaskAuthenticate [29.01.2024 11:44:52.755] (NetworkRequest) Error: Network request timeout [29.01.2024 11:44:52.755] (AuthenticationInAppSession) Error: Failed to check the account status QNetworkReply::TimeoutError [29.01.2024 11:44:52.756] (ErrorHandler) Debug: Handling error ErrorHandler::DependentConnectionError [29.01.2024 11:44:52.756] (ErrorHandler) Error: Alert: ErrorHandler::ConnectionFailedAlert{quote}Was this implemented in 2.20? Thanks!{quote}
Bianca Hidecuti no, this modal was implemented along with the rest of the in-app auth flow. We show this modal when a request to FXA (https://api.accounts.firefox.com/v1/account/login, specifically) times out. (https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/src/authenticationinapp/authenticationinappsession.cpp#L314 ( https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/src/authenticationinapp/authenticationinappsession.cpp#L314 )). We then assume that the request has timed out because no internet is available, return the user to authentication start, and pop the “Sign-in failed. No internet connection” modal. The request could time out for any number of reasons though so this is lazy handling on our end.
{quote}Unable to connect red banner is displayed when user tries to sign in.{quote}
This happens when a TimeoutError
is caught in the ErrorHandler ( https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/src/errorhandler.cpp#L131-L132 ) , reclassified as that ‘DependentConnectionError’ we see in the logs and triggers the ‘Unable to Connect’ banner. ( https://github.com/mozilla-mobile/mozilla-vpn-client/blob/9d6188addb0014a86aae6fdb84b160f808ad7b1e/nebula/ui/components/MZSystemAlert.qml#L51-L57 )
Next steps
➤ Bianca Hidecuti commented:
Lesley Norton, thanks for the answers!
I have a question about the following:
{quote}We then assume that the request has timed out because no internet is available, return the user to authentication start, and pop the “Sign-in failed. No internet connection” modal.{quote}
If there was no internet available at the time, shouldn't we be able to trigger the modal when disconnecting from the internet? Thanks!
➤ Lesley Norton commented:
{quote}If there was no internet available at the time, shouldn't we be able to trigger the modal when disconnecting from the internet?{quote}
You would certainly think so. Mind attaching logs for this flow with wifi turned off?
➤ Bianca Hidecuti commented:
Lesley Norton, I am attaching logs for the IAA flow while there is no internet connection (I’ve disconnected from the internet while being in the password screen and pressed the “Sign in” button).
[^mozillavpn-2024-2-1.log]
➤ Bianca Hidecuti commented:
We were able to reproduce this today (02/19) while creating a new account within the client using the 2.21 version, on macOS 12.6.6 and on Android 10 - Stage server:
Attaching logs as well.
[^unable to connect 2.21 mozillavpn-2024-2-19_1.log] [^MozillaVPN_Logs_2024-40-19-14-40-07.txt]
➤ Bianca Hidecuti commented:
Lesley Norton, I was also able to see the “No internet connection” modal on Mozilla VPN 2.21 - stage server. Attaching logs.
[^modal mozillavpn-2024-2-19_1.log]
!Снимок экрана 2024-02-19 в 16.00.13.png|width=357,height=670!
Important details:
the banner is sometimes displayed when being redirected to the Email auth screen or after finalizing the authentication / account creation flow;
not reproducing on production;
sign in issues were encountered on web as well: https://mozilla-hub.atlassian.net/browse/FXA-8866 (the ticket is in “Done” status);
Affected VPN versions
Tested platforms:
Prerequisites:
Have Mozilla VPN app installed and open;
Have a Mozilla account;
Be on Stage server;
Steps to reproduce:
Expected result:
Actual result:
Notes:
┆Issue is synchronized with this Jira Bug ┆Reporter: Bianca Hidecuti