ReallySmallSoftware / cordova-plugin-firebase-crashlytics

Google Firebase Crashlytics Cordova plugin
Other
32 stars 80 forks source link

call of crash() shutdown the VM and generate a FATAL EXCEPTION: main #48

Open jocafi opened 3 years ago

jocafi commented 3 years ago

Hi ReallySmallSoftware !!!

Steps to Reproduce the Problem

I am using Ionic 5 + Capacitor.

I just put two buttons: one to log random values and the other to execute the command crash():

  testCrash() {
    log.debug('test Crash called ...');
    this.crashlyticsService.log('Forcing a CRASH !');
    this.crashlyticsService.crash();
  }

The method above generates the output below and exits the App:

I/Capacitor/Console: File: http://localhost/main-es2015.js - Line 1642 - Msg: Logging using Crashlytics ...
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: FirebaseCrashlytics, action: log, actionArgs: ["Logging error: 128.40662929749215 - 487f-e77d-31d-9edc"]
D/FBCrashlyticsPlugin: log
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: FirebaseCrashlytics, action: logPriority, actionArgs: [5,"dashboard","This should not happened: 4309-6dda-ad9-05f1"]
D/FBCrashlyticsPlugin: logPriority
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: FirebaseCrashlytics, action: logException, actionArgs: [{}]
D/FBCrashlyticsPlugin: logException
D/InputMethodManager: HSIFW - flag : 0
I/ViewRootImpl@b5d398a[MainActivity]: ViewPostIme pointer 0
I/ViewRootImpl@b5d398a[MainActivity]: ViewPostIme pointer 1
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: FirebaseCrashlytics, action: log, actionArgs: ["Forcing a CRASH !"]
D/FBCrashlyticsPlugin: log
I/Capacitor/Console: File: http://localhost/main-es2015.js - Line 1637 - Msg: test Crash called ...
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: FirebaseCrashlytics, action: crash, actionArgs: []
D/FBCrashlyticsPlugin: crash
D/AndroidRuntime: Shutting down VM

    --------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.test.test2, PID: 30041
    java.lang.RuntimeException
        at uk.co.reallysmall.cordova.plugin.firebase.crashlytics.CrashHandler$1.run(CrashHandler.java:16)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.app.ActivityThread.main(ActivityThread.java:8419)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
V/FA: Connecting to remote service
V/FA: Recording user engagement, ms: 74456
sparecode-llp commented 3 years ago

I am also getting a same error while logging non fatal error. Below is the error which I am getting:

I/Capacitor/Console: File: http://localhost/main-es2015.5b849d54026277acb8a8.js - Line 1 - Msg: Whole Data: [object Object] V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: FirebaseCrashlytics, action: logException, actionArgs: [{"headers":{"normalizedNames":{},"lazyUpdate":null},"status":404,"statusText":"NOT FOUND","url":"https:\/\/b.fitsy.fit\/api\/organization\/assignuser\/10","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https:\/\/b.fitsy.fit\/api\/organization\/assignuser\/10: 404 NOT FOUND","error":"<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 3.2 Final\/\/EN\">\n404 Not Found<\/title>\n<h1>Not Found<\/h1>\n<p>Phone number not matched with signed in users<\/p>\n"}] D/FBCrashlyticsPlugin: logException</p> <p>I am using this plugin via capacitor as mentioned in ionic docs.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>