react-native-google-signin / google-signin

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

google sign in not working when using an actual mobile: tried two views with the same name RNGoogleSigninButton #1305

Closed raisfeld-ori closed 1 week ago

raisfeld-ori commented 2 weeks ago

so I added google-signin into my project, and so far I only used GoogleSignin.configure() and await GoogleSignin.signIn() and it worked well. but recently I tried to also open my app on an actual phone, and I got an error:

 ERROR  Invariant Violation: Tried to register two views with the same name RNGoogleSigninButton, js engine: hermes
 ERROR  Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","SourceCode","Timing","AppState","BlobModule","WebSocketModule","DevSettings","DevToolsSettingsManager","Networking","Appearance","DevLoadingView","HeadlessJsTaskSupport","DeviceInfo","UIManager","ImageLoader","SoundManager","IntentAndroid","DeviceEventManager","NativeAnimatedModule","I18nManager","FileReaderModule"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","RedBox","BugReporting","LinkingManager","RNCSafeAreaContext","NativeReactNativeFeatureFlagsCxx","RNSModule","RNGoogleSignin"]}, js engine: hermes

this is weird, since this is an (almost) empty react native project, and the only packages that use google in my case are firebase and google-signin, so I don't understand why am I getting this error. it does disappear when I remove the lines GoogleSignin.configure() and await GoogleSignin.signIn(), even If I still have the google-signin package installed.

here is my package.json in case this is a version issue

mozart25 commented 2 weeks ago

same with me

DeveloperRyou commented 2 weeks ago

same with me too

mozart25 commented 2 weeks ago

i found that google login is not working with expo go. Have to build by android or ios. and then google sign in almost working.

DeveloperRyou commented 2 weeks ago

i found that google login is not working with expo go. Have to build by android or ios. and then google sign in almost working.

Thank you it worked!

raisfeld-ori commented 1 week ago

i found that google login is not working with expo go. Have to build by android or ios. and then google sign in almost working.

can confirm, using eas builds solves this issue