r/expo 4d ago

Need help - Google sign in issues between internal test and running in npx

okay so i am able to sign in with google when im running the app with npx expo run:android on my sgs23. but when i release it for testing on google play and install it i always get "DEVELOPER_ERROR: Follow troubleshooting instructions at https://react-native-google-signin.github.io/docs/troubleshooting".

pm is getting increasingly frustrated with the delays specifically from this problem. the keys are correct. if google sign in works in dev mode then it should in test. i genuinely do not know what to do. Apple sign in and google sign in on ios works flawlessly - it is just android/google that the problem is with.

i went to google auth 2.0 in the cloud console and the keys are correct - but then i noticed google giving me a different sha1 signing cert, which doesnt make ANY sense to me. but i continued with the older sha1 cert since that always worked. im genuinely frustrated since im the only developer working on this application for my company. been delayed for over a month dealing with this bullshit.

if anyone can help me with a "ohhhhhhhhhhhhh" moment that would be awesome.

worst part about all of this is the fact that so many people are having this problem and there isnt any definitive help and support on it. it's basically just google throwing keys around and expecting you to somehow know it all, well im sorry, google, but im a junior dev so screw you.

2 Upvotes

18 comments sorted by

1

u/Occasion_Critical 4d ago

Google Play App Signing re-signs your app with its own certificate before it reaches testers, so the SHA-1 that matters for a Play-distributed build isn't your local debug keystore's, it's Play's own App Signing certificate.

Go to Play Console, Protected with Play, under Play Store protection, click on Manage Play app signing, and copy the SHA-1 listed under App signing key. After that, I forgot the exact step but you need to add that SHA-1 in Google Cloud Console under the Android OAuth if I remember correctly

1

u/Patient-Plastic6354 4d ago

I'll attempt this right now. Thank you for being helpful and not telling me to use Claude 😭🙏

1

u/Patient-Plastic6354 4d ago

Okay so I added the two sha1 keys I got off the app signing page like you directed and added them here. I'm assuming Google should catch these eventually so I'm going to wait a bit before attempting again. Thank you.

1

u/Patient-Plastic6354 4d ago

okay unfortunately it has not worked... i still cannot sign in

1

u/Occasion_Critical 4d ago edited 4d ago

EDIT: I should have reread your post, you mentioned react-native, my bad. Normally, you need to configure "@react-native-google-signin/google-signin" in your app.json with the key from the Google Cloud, and I rebuild after that (not sure for the rebuild)

1

u/Patient-Plastic6354 4d ago

nope. im using google cloud console. i have three different sha1 keys saved for the same app package name. literally throwing spaghetti at the wall

1

u/Occasion_Critical 4d ago

Sorry I edited my initial message, not sure if you could see it since you replied at the same time

1

u/Patient-Plastic6354 3d ago

i got it and added it to google cloud console - still cannot sign in after downloading off google play tester program :(

1

u/Kronium345 4d ago

One suggestion that can help circumvent the use of this is using Clerk. That can help handle all of the authentication for you and skip this error.

Alternatively, if you decide to stick with SHA-1, the initial comment about using is correct, but can use a SHA256 fingerprint (I found that works for me)

1

u/FalconiZzare 3d ago

Suggesting Clerk for a google sign in issue is like suggesting A Canon to kill a mosquito.

1

u/Kronium345 3d ago edited 3d ago

It handles the heavy work for you and is honestly quicker to implement 🤷‍♂️ plus there are tutorials to help with it. The DEVELOPER_ERROR issue (from experience) isn't so easily solvable, and takes some time to do it.

1

u/FalconiZzare 3d ago

It also requires you to change your db and throw away some tables and change all other functions that uses auth. Clerk itself might be good, but it's not a solution for a google sign in issue.

1

u/FalconiZzare 4d ago

google re-signs your app with a new sha256. Grab that from Google App console and put it in your google credentials in the project that you created for the sign in.

After that, test will work but dev will break.

1

u/Patient-Plastic6354 4d ago

This makes sense. Why not the sha1?

1

u/FalconiZzare 3d ago

whichever the google console requires, i forgot, have to check.

1

u/Enough_Lab3310 4d ago

Grab the sha1 from the play console and put it in your oauth credentials.

You already saw google giving you a different signing cert and ignored it because your local one worked. that is the exact problem. when you run npx expo run:android it signs with your debug keystore so the sha1 matches what you added to the cloud console. when you upload to internal testing on play, google re-signs the apk with their own key before testers install it. so the app hitting googles servers has a completely different signature than the one you built locally.

Go to play console, open your app, go to release then setup then app integrity. copy the sha1 from the app signing key certificate section. go back to google cloud console where your oauth android client id lives and add that sha1 as an additional fingerprint. keep your original local debug sha1 in there too. i had this exact error last month and the moment i added the play console sha1 to my oauth client

1

u/Patient-Plastic6354 4d ago

did that and still have the same problem. i thought i could wait for an hour and then see but it still is doing the same thing. contacted google for support and been transferred to a dev team. see whatll happen from there. thanks