When trying to use Google sign-in through Firebase Authentication in Flutter, I am getting an error:
flutter com.google.android.gms.common.api.apiexception: 7
I did not find any solution for this problem anywhere. What does this mean?
When trying to use Google sign-in through Firebase Authentication in Flutter, I am getting an error:
flutter com.google.android.gms.common.api.apiexception: 7
I did not find any solution for this problem anywhere. What does this mean?
This error occurs when you are not connect to the internet. Check your connection and try again.
Terrible error messaging here by Google, so good question!
From the Java docs for ApiException, it says that the exception has a method getStatusCode, which returns:
Status code resulting from the operation. The value is one of the constants in
CommonStatusCodesor specific to the API in use.
They mention that getMessage() will return "a summary of the cause" so assuming that they're just echoing back the status code and using that as a summary, 7 maps to NETWORK_ERROR from CommonStatusCodes:
public static final int NETWORK_ERRORA network error occurred. Retrying should resolve the problem.
Constant Value: 7
In my case my phone date and time was wrong once i make it correct Google sign in working perfectly.