React Native | App Crash because of "react-native-google-signin"

react-native app crashes on launch android
react-native app keeps stopping
react native crash reporting
react native error logging
react-native-exception-handler
react-native app crash on android 10
react-native force close
react native error handling

React Native | react-native-google-signin

After i install react-native-google-sigin with

npm i react-native-google-signin

It suddenly crash ( force close ) right when the app start, I have already did all the steps that is told on the github documentation yet when i run my App it crash instantly, without giving any error in the log. ( neither android-log nor adb logcat *:S ReactNative:V ReactNativeJS:V does )

Here are my codes:

build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
        googlePlayServicesAuthVersion = "16.0.1" // <--- use this version or newer
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.4.1")
        classpath 'com.android.tools.build:gradle:3.1.2' // <--- use this version or newer
        classpath 'com.google.gms:google-services:4.1.0' // <--- use this version or newer
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
    }
}

settings.gradle

rootProject.name = 'App'
include ':react-native-reanimated'
project(':react-native-reanimated').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-reanimated/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':react-native-google-signin', ':app'
project(':react-native-google-signin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-signin/android')
include ':app'

app/build.gradle

dependencies {
    implementation project(':react-native-reanimated')
    implementation project(':react-native-gesture-handler')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation(project(":react-native-google-signin"))
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation(project(':react-native-maps')){
            exclude group: 'com.google.android.gms', module: 'play-services-base'
            exclude group: 'com.google.android.gms', module: 'play-services-maps'
        }
        implementation 'com.google.android.gms:play-services-base:10.0.1'
        implementation 'com.google.android.gms:play-services-maps:10.0.1'

    if (enableHermes) {
      def hermesPath = "../../node_modules/hermesvm/android/";
      debugImplementation files(hermesPath + "hermes-debug.aar")
      releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
      implementation jscFlavor
    }
}

apply plugin: 'com.google.gms.google-services' // <--- this should be the last line

Can someone help me with this error? because when i uninstall react-native-google-signin with

npm uninstall react-native-google-signin

it works just fine

In app/build.gradle set implementation(project(":@react-native-community_google-signin")) instead

 implementation(project(":react-native-google-signin"))

React native 0.59.x crashes on Android without any error message , react-native-bot added the Platform: Android label on Apr 2, 2019 App Crash on Android OS 6 Samsung Galaxy S7 SM-G930FD (JSC Crash) 64 bit I can't use Hermes or v8 cause there is a lib (realm in this case) that only  React Native debugging is a process of searching for bugs written in React Native apps with the aim to fix them. Redux, in my opinion, the most suggested debug instrument, particularly, while coding in your React Native. But we should not forget about such tools for debugging like React Devtools and Chrome . DevTools.

Release APK crash immediately on launch, Release APK crash immediately on launch - React Native ( Version 0.58.4) #​23352. Closed App crashes on launch, logcat throws this error: Thread.run(​Thread.java:818) E/AndroidRuntime(18795): Caused by: java.lang. Let's get started with setting up App Center React Native SDK in your app to use App Center Analytics and App Center Crashes. 1. Prerequisites. Before you begin, please make sure that the following prerequisites are met: You are using a React Native project that runs React Native 0.34 or later.

Since you have Hermes enabled it means you have RN 0.60+

Just use the community version:

"@react-native-community/google-signin": "^3.0.3"

RN 0.60+ has autolinking so you don't need these lines:

// settings.gradle
include ':react-native-google-signin', ':app'
project(':react-native-google-signin').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/google-signin/android')


// MainApplication.java
new RNGoogleSigninPackage()

I think you should try to use this autolinking for the other libraries too (you might have to use their latest versions)

If still not working you can get more info here

https://github.com/react-native-community/react-native-google-signin/blob/master/docs/android-guide.md

(Pay attention that step 4 should not be done unless manual linking is used and double check steps 1-3)

React Native Android release build crash on device, If you tried to generate android release APK by following guide provided in official site of facebook react native, and found your app is crashing  I have two different ReactNative-Projects: a) a project from januar 2016 b) a complete new react-native project from now (march 20th 2016) Within the new project the cli tool of react-native con

Catching crashes at launch time on Android React Native apps , Crashes landing on master, developers frustrated because the app don't launch after rebasing changes from master, or even worse, users  Because React Native is second on the food chain and reacts to what the Android and iOS platform demand, React Native will always lag behind on the latest and greatest features of both platforms. For example, a while back, Google announced that all apps needed to ship with 64bit version else they will be removed from the Play Store.

App Center Crashes for React Native, App Center Crashes provides you with an API to generate a test crash for easy testing of the SDK. This API can only be used in test/beta apps and  React Native is no exception. We realize that the problems we face as an engineering organization are not unique to us, and accordingly, we want to develop in the open as much as possible, collaborating with others who are facing the same challenges. Today, we’re excited to open-source React Native for iOS and make it available on GitHub

Status of React Native crash reporters in 2019 : reactnative, I am doing my third production React Native app and I have to choose crash reporter again. I use Crashlytics because we use Firebase for a lot of stuff. React Native Youtube iframe. A wrapper of the Youtube IFrame player API build for react native. Works seamlessly on both ios and android platforms Does not rely on the native youtube service on android (prevents unexpected crashes, works on phones without the youtube app)

Comments
  • Hello, Have you tried linking the dependency to your project with react-native-link
  • did you solve this?
  • Please add your package.json info here too. To debug this it will be helpful to know RN version and google-sign-in version.
  • The problem for me was the dependency for react >.59 I used 15.0.0 and that fixed the problem.implementation 'com.google.android.gms:play-services-base:15.0.0' implementation 'com.google.android.gms:play-services-maps:15.0.0'
  • Do you have google-services.json file?