Closed BrodaNoel closed 1 year ago
https://github.com/react-native-google-signin/google-signin the problem is related to the new React Native architecture. It's weird that no one has been contributing a solution for 2 years.
@vendeza how sure are you? Do you have any way to confirm that's the reason? It may help to fix the problem.
@vonovak because I'm totally blocked by this issue (in 2 projects!), I'm willing to make some donation for this. How much would it be enough for supporting this? Please attach the link for the "one-time" donation!
@BrodaNoel hello and thanks for reporting. I'm fairly certain this has nothing to do with the new architecture, unless you have it enabled (which you most likely don't have, given that you use expo - I don't think they allow it yet).
I appreciate your interest in donating for the project, all options are listed here π .
However, sponsorships are meant to support maintaining the project, or as a way to say "thanks". The problem you're having appears to be a more complicated one, something that could take several hours to diagnose and fix. If you're interested in getting help from me (as a paid service) please send me an email to hello@react-native-training.eu or DM me at https://twitter.com/vonovak
Thank you π
Expo is using new architecture since SDK 47. So, since 5 months ago.
https://blog.expo.dev/expo-sdk-48-ccb8302e231?source=collection_home---6------1-----------------------
@vonovak what I don't understand is what is the relationship between the New Arch being used in Expo, and this library? If this library is not using the New Arch, there should not be a problem.
Hello again, expo is not using new architecture. It is supported but not enabled by default. So unless you enabled it, it's not enabled.
Yes, this library is not using new architecture and your app neither. It should not be a problem π
I am seeing some kind of pattern now. This is what Sentry shows:
@BrodaNoel not sure how big the sample is (probably small)? But I'm not really seeing much useful info there. It shows that the problem spans from android 6 all the way up π€. That's probably all android versions that your app supports. What do you see?
@BrodaNoel did you ever get this to work? I'm stuck in the same situation for a couple of days now.
My Java is quite poor so pardon me if I'm wrong but looking at this code my interpretation is that if the sign-in function is called multiple times it cancels the previous one.
In my case, please don't ask me how, but this fixed it for me.
@BrodaNoel You can check in your code, maybe you also have re-renders or multiple executions of onContinueWithGoogle
, hence causing the same issue.
@vonovak have you checked that comment? Maybe that's the fix.
@atif089 i don't have that error anymore but because I did A LOT of refactors in my code. Maybe one of those refactors removed some double rendering and fixed it. I am not seeing that error in Sentry anymore (Expo SDK 49)
Steps to Reproduce
Reproducible Demo: In this scenario, due to it's 99% a configuration problem, I won't be able to create a reproducible demo.
Even worst: I have this library implemented in 2 projects, where one of them is working perfectly (using Expo 46), and this one is broken (tried with Expo 46, 47 and 48).
I can't really reproduce this in my app (not even in simulators like BrowserStack), but I've seen that ~50% of the Android users are getting that error (
Error Code 12501: Sign in action cancelled
) and they just can't login.This is the code I have, which is EXACTLY the same I have in another project and it's working perfectly in the other one:
I am using Firebase.
I already went to Google Play > Releases > App Integrity > App Signing, and copied the SHA-1 from
App signing key certificate
AND fromUpload key certificate
. I added both SHA-1 in Firebase > Project Settings > General > Your Apps > Android apps. Both are there.After adding those SHA-1, I downloaded the
google-services.json
file and I added it to the project in the root folder.My
app.json
file look like:And the
google-services.json
file look like this:So, as far as you can see, the SHA-1 are there, and are the same in Google Play, and Firebase, and in the
google-services
file. But the error12501
still there. And as far as I can see, the error12501
means that the app was signed with other key.I have already tried 1000 different changes (even removing all the keys and adding them again), and nothing works. I can't see a difference between the project where it works and this. The only difference is that in the other project it worked since ~1 year ago, and there I'm using
8.0.0
.If I go to see
eas credentials
(forexpo
), I see that the SHA-1 for building isD6:1C:xxxx
, which is the same it's present in Firebase. So... I don't know π€·πΌββοΈExpected Behavior
Error should not be present and the user should be able to create the account/login
Actual Behavior
Throwing an error, catched by the try-catch. Check code.
Environment
0.71.3
9.02
pod install
and cocoapods version (if applicable):Not aplicable. Using Expo 48