-
-
Notifications
You must be signed in to change notification settings - Fork 876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on iOS when clicking the sign in button with Expo #1231
Comments
I observed the same behaviour in my expo app and solved it by providing the iosUrlScheme option to the config plugin. You can read more here. |
@htcdang I already have this in my "plugins": [
....,
"@react-native-google-signin/google-signin",
{
"iosUrlScheme": "com.googleusercontent.apps.xxxxxxxxx"
}
], |
Hello and thanks for reporting, I was unable to reproduce this on my test project so without a runnable reproduction, I won't be able to assist further. As for the config plugin Finally, in the provided snippet
the I'm going to close this but feel free to provide a runnable repro so I can debug this. |
@vonovak Your analysis of the stack trace helped me find the issue! I opened the project in Xcode and in the Info > Url Schemes section there was an empty url scheme for some reason, removing that fixed the crash. With some trial and error I found that this section I had added to my app.json was causing the empty url schemes: {
"expo": {
"ios": {
...,
"infoPlist": {
"CFBundleURLTypes": [
{
"CFBundleURLSchemes": "com.googleusercontent.apps.xxxxxxxxxxxxx"
}
]
}
}
}
} Per [this documentation|https://docs.expo.dev/versions/latest/config/app/#infoplist] on the expo website, but probably I did something wrong. I think I had added this because I had googled some stuff about needing the url bundles in the info.plist and thought that would do it.. evidently not. Anyways just putting this here in case some other unfortunate soul happens to stumble into the same set of circumstances. Thanks for your help! |
I am still facing the same issue! The app is getting crashed on iOS. On Android it is working fine. My app is managed by expo so I cannot use xcode. I am not using the sponsored version. app.json
GoogleLogin.js
I am unable to get any userInfo, instead the app crashes. Unable to get any logs! I am using:
Thanks in advance for any suggestion/help. |
Is anyone able to solve this yet? I have followed the above steps and still have the same issue of app crashing on clicking 'Google Signin'. The crash occurs when executing Googlesignin.Singin(). Using iOS dev build. |
I don't know what got it working but I finally did manage to get it working on iOS. I am using Expo managed workflow and I do run it with EAS build to do prebuild step.
|
@erickreutz Thank you very much. It works! |
The app crashes on iOS when clicking the SignIn button, it works on Android.
I've made sure to configure the reverse client id in the url schemes.
I've managed to get the following error from XCode when I reproduce the crash:
(nomad is the name of my app btw)
Reproducing the issue
GoogleSignInButton.tsx
App.tsx
Expected Behavior
Sign in proceeds as expected, console log gets printed.
Actual Behavior
The entire app crashes with a
SIGABRT
signal for versions > 8.x.x, and the exception above for version == 8.x.x.Environment
I've tried the following versions of
@react-native-google-signin/google-signin
:CocoaPods could not find compatible versions for pod "ExpoAdapterGoogleSignIn"
)Emulator iOS version is
iOS 17.0
, i'm running it on an M2 Mac if that matters.React Native version is
0.72.6
Expo version is
49.0.15
Podfile is auto-generated by expo, but I've configured it to add this line based on various stack overflow/github issues trying to debug the crash:
The text was updated successfully, but these errors were encountered: