react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.19k stars 878 forks source link

EAS Build & RN CLI - Android Signin not working #1132

Closed Stoneski93 closed 1 year ago

Stoneski93 commented 1 year ago

Steps to Reproduce

I have an app build with React Native CLI and use @react-native-google-signin/google-signin to login. When I build an app with EAS (apk), signin not working on Android (device and emulator). When I build app localy everything work. This issue met only on Android - for iOS works good.

I have recreated all OAuth Google keys and try with option with firebase and without and nothing work. I am out of ideas.

eas.json { "cli": { "version": ">= 3.1.1", "appVersionSource": "local" }, "build": { "development": { "distribution": "internal", "android": { "buildType": "apk" }, "ios": { "buildConfiguration": "Debug" }, "channel": "development" }, "production": { "channel": "production" } }, "submit": { "production": { "ios": { "ascAppId": "*" } } } }

app.json { "name": "wimt", "displayName": "wimt", "extra": { "eas": { "projectId": "xxxx-xxxx-xxxx-xxxx" } }, "expo": { "name": "wimt", "displayName": "wimt", "owner": "wimt", "runtimeVersion": "1.0.0", "android": { "versionCode": 4 }, "ios": { "buildNumber": "4" }, "extra": { "eas": { "projectId": "xxxx-xxxx-xxxx-xxxx" } } } }

Expected Behavior

I want to make working apk, aab when I make build via EAS when I build app with React Native CLI without expo.

Actual Behavior

Sign in in APK build via EAS not working - Request Authentication Failed error in logs. So I can choose an google account but then got error I mentioned above.

Environment

"react-native": "0.70.4",

"@react-native-google-signin/google-signin": "^8.1.0", "@react-native-google-signin/google-signin": "^9.0.2", trying on both

com.google.gms:google-services:4.3.10

Stoneski93 commented 1 year ago

That was problem with add SHA1 release keystore to android on firebase. Solved.