react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.23k stars 881 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 5 months ago

raisfeld-ori commented 5 months 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 5 months ago

same with me

DeveloperRyou commented 5 months ago

same with me too

mozart25 commented 5 months 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 5 months 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 5 months 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

ErMapsh commented 3 months 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

Hello, Actually I'm new to expo and i m learning eas. I m facing same issue, how can build eas build for development to solve this issue. Thank you in advance.

vivex commented 1 month ago

+1

ErMapsh commented 1 month ago

+1

ref: https://docs.expo.dev/build/setup/

eas build --platform android|ios

After completing the build, download and install it on your device(phone). run your project, open the installed app on your phone, and scan / login your expo account on the development system in device as per reference to work on the development build

LeoUtas commented 3 weeks ago

I feel it's a bit annoying Expo Go is so convenient for testing out a newly added feature or just checking a small change. However, this inconvenience force me to either turn the google sign in off or put my app to testFlight or using eas build

raisfeld-ori commented 3 weeks ago

I feel it's a bit annoying Expo Go is so convenient for testing out a newly added feature or just checking a small change. However, this inconvenience force me to either turn the google sign in off or put my app to testFlight or using eas build

same, I started running an expo go mode and a normal expo mode in my apps (if possible), but it's kind of a hassle to manage

CavalcanteLeo commented 1 week ago

I'm encountering the same issue on both the simulator and a real device. Unfortunately, using EAS build isn’t an option to resolve this, so I may consider removing this feature

tbachosz commented 5 days ago

Is this still unsolved? It seems ridiculous that such a basic feature prevents you from seamless development.