You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Google Login Failing for Some Users on Flutter App
Description:
For the past month, many users have reported that they cannot log in using Google on the app. Some users are redirected to the Google login page, while others are stuck in a loading state after selecting their Gmail account. However, the issue is not reproducible on my device —I've tested on multiple devices, and Google login works without issues. Despite this, over 1000 users are unable to log in.
Code:
Here’s the relevant code that handles the Google login flow:
dart
Copy code
Future<bool> login() async {
final AuthorizationTokenRequest authorizationTokenRequest;
try {
authorizationTokenRequest = AuthorizationTokenRequest(
GoogleClientID(),
GoogleRedirectUrl(),
issuer: GOOGLE_ISSUER,
scopes: ['openid', 'email', 'profile'],
);
// Requesting the auth token and waiting for the response
final AuthorizationTokenResponse? result =
await _appAuth.authorizeAndExchangeCode(
authorizationTokenRequest,
);
// Taking the obtained result and processing it
return await _handleAuthResult(result);
} on PlatformException catch (e) {
Sentry.captureException(e, stackTrace: StackTrace.current);
// Handle specific platform exceptions
if (e.code == 'CANCELED') {
toast('User canceled the login!');
} else if (e.code == 'NETWORK_ERROR') {
toast('No internet connection!');
} else {
toast('Platform Error: ${e.message}');
}
return false;
} catch (e) {
Sentry.captureException(e, stackTrace: StackTrace.current);
toast('Failed with Error : $e');
return false;
}
}
Steps Taken to Resolve:
Device Testing: Tried on multiple devices including:
Samsung device
iPhone 8
iPhone 12
Android tablet
2 of my friend's Android phones
2 simulators The login works fine on all devices.
Error Capture: The error captured by Sentry is FlutterAppAuthUserCancelledException, indicating that the user canceled the login flow.
Package Update: I’ve updated all dependencies to the latest versions, but the problem persists.
Dependencies:
Here are the dependencies being used:
Problem:
Despite working on my devices and several other devices, over 1000 users are experiencing the issue. This suggests that the problem may be related to specific devices, OS versions, or configurations that I am unable to replicate.
Expected Behavior:
The Google login should work without errors, and users should be able to authenticate and access the app.
Actual Behavior:
Some users are redirected to the Google page or get stuck in a loading loop, leading to a cancellation of the login process. Sentry logs show that the users are cancelling the login flow.
Request for Help:
I’m unable to reproduce the issue, and I need assistance in diagnosing why this issue is occurring for some users but not on my devices. Any insights or suggestions to help resolve this would be appreciated!
The text was updated successfully, but these errors were encountered:
Issue: Google Login Failing for Some Users on Flutter App
Description:
For the past month, many users have reported that they cannot log in using Google on the app. Some users are redirected to the Google login page, while others are stuck in a loading state after selecting their Gmail account. However, the issue is not reproducible on my device —I've tested on multiple devices, and Google login works without issues. Despite this, over 1000 users are unable to log in.
Error Details:
The error sent to Sentry is:
Code:
Here’s the relevant code that handles the Google login flow:
dart
Copy code
Steps Taken to Resolve:
Device Testing: Tried on multiple devices including:
Samsung device
iPhone 8
iPhone 12
Android tablet
2 of my friend's Android phones
2 simulators The login works fine on all devices.
Error Capture: The error captured by Sentry is FlutterAppAuthUserCancelledException, indicating that the user canceled the login flow.
Package Update: I’ve updated all dependencies to the latest versions, but the problem persists.
Dependencies:
Here are the dependencies being used:
Flutter version: 3.24.5 (Stable channel)
Problem:
Despite working on my devices and several other devices, over 1000 users are experiencing the issue. This suggests that the problem may be related to specific devices, OS versions, or configurations that I am unable to replicate.
Expected Behavior:
The Google login should work without errors, and users should be able to authenticate and access the app.
Actual Behavior:
Some users are redirected to the Google page or get stuck in a loading loop, leading to a cancellation of the login process. Sentry logs show that the users are cancelling the login flow.
Request for Help:
I’m unable to reproduce the issue, and I need assistance in diagnosing why this issue is occurring for some users but not on my devices. Any insights or suggestions to help resolve this would be appreciated!
The text was updated successfully, but these errors were encountered: