简体   繁体   English

无法在Play控制台和Firebase中生成崩溃报告

[英]crash report not generated in play console and firebase

My app is crashing but crash report not generating in Firebase for some cases. 我的应用崩溃了,但是在某些情况下无法在Firebase中生成崩溃报告。 I added manual crash in app, whenever click that manual crash button that is generating error but some crashes are not generated. 我在应用程序中添加了手动崩溃,只要单击该手动崩溃按钮会生成错误,但不会生成某些崩溃。 Same thing happened in Play Console ANR&Crashes also. Play控制台ANR和崩溃也发生了同样的事情。 I can't track these issues. 我无法追踪这些问题。 This has happened in OPPO Lollipop and Samsung Galaxy devices. OPPO LollipopSamsung Galaxy设备中发生了这种情况。

The crashes take some time to show up in Firebase console like some hours even. 崩溃需要一些时间才能显示在Firebase控制台中,甚至需要几个小时。 In Play Console, they may take upto a day or more to show sometime. 在Play控制台中,有时可能需要一天甚至更长的时间才能显示出来。

Some points : 一些要点

  1. Make sure you've not disabled reporting in Manifest. 确保您尚未在清单中禁用报告。
  2. Make sure that you are not handling the Exceptions to ignore them. 确保您没有处理异常以忽略它们。
  3. Check if you've imported the latest dependencies from Firebase documentation. 检查您是否已从Firebase文档中导入了最新的依赖项。

Not sure if this is the right scenario here, but if by any chance you are setting DefaultUncaughtExceptionHandler , then you must pass the exception to the UncaughtExceptionHandler back. 不知道这是否是正确的情况,但是如果您有机会设置DefaultUncaughtExceptionHandler ,那么您必须将异常传递回UncaughtExceptionHandler

final Thread.UncaughtExceptionHandler defHandler = Thread.getDefaultUncaughtExceptionHandler();
        Thread.setDefaultUncaughtExceptionHandler((t, ex) -> {
            try {
                CrashReportHandler.handleCrash(ex);
            } finally {
                // Pass the exception to the default handler here
                defHandler.uncaughtException(t, ex);
            }
        });
Yash Krishan Verma **code was developed in react native**

apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
        entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = true
def enableProguardInReleaseBuilds = false
android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    defaultConfig {
        applicationId "com.example.project"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        missingDimensionStrategy "RNN.reactNativeVersion", "reactNative58"
        versionCode 55
        versionName "1.0.13"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }
     splits {
        abi {
            enable enableSeparateBuildPerCPUArchitecture
            reset()
            universalApk true  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    buildTypes {
        debug{
            debuggable true
        }

        release {
            debuggable false
        }
    }
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) + defaultConfig.versionCode
            }
        }
    }
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
    buildToolsVersion '28.0.3'
}
configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-annotations:28.0.0'
    }
}

repositories {
    flatDir {
        dirs 'libs'
        dirs project(':intripperLibrary').file('libs')
    }
}

dependencies {
    implementation project(':react-native-fast-image')
    implementation project(':react-native-sms-retriever')
    implementation project(':react-native-config')
    implementation project(':react-native-reanimated')
    implementation project(':react-native-android-fullscreen-webview-video')
    implementation project(':react-native-image-crop-picker')
    implementation project(':react-native-orientation')
    implementation project(':react-native-oauth')
    implementation project(':react-native-google-signin')
    implementation project(':react-native-fbsdk')
    implementation project(':react-native-geolocation-service')
    implementation(project(':react-native-geolocation-service')) {
        exclude group: 'com.google.android.gms', module: 'play-services-location'
    }
    implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
        transitive = true
    }
    implementation 'com.google.android.gms:play-services-location:+'
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation project(':react-native-device-info')
    implementation project(':react-native-android-wifi')
    implementation project(':react-native-splash-screen')
    implementation project(':react-native-firebase')
    implementation project(':react-native-gesture-handler')
    implementation project(':intripperLibrary')
    implementation project(':react-native-camera')
    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:+"
    implementation "com.google.android.gms:play-services-maps:+"
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.google.firebase:firebase-core:+'
    implementation "com.google.firebase:firebase-messaging:+"
    implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'com.google.android.material:material:1.0.0-beta01'
    implementation 'com.facebook.fresco:webpsupport:1.10.0'
    implementation 'com.facebook.fresco:fresco:1.10.0'
    implementation 'com.facebook.fresco:animated-gif:1.10.0'
    implementation 'androidx.legacy:legacy-support-core-utils:1.0.0-beta01'
    implementation 'androidx.annotation:annotation:1.0.0-beta01'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'com.parse:parse-android:1.13.1'
    implementation 'com.google.maps.android:android-maps-utils:0.5+'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
    implementation 'com.google.firebase:firebase-analytics'
    implementation project(':react-native-razorpay')
    implementation project(path: ':crashreporter')
}
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: "com.android.application"
apply plugin: "io.fabric"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM