Closed
Description
I do not have real steps to reproduce but on Android, calling firebase().crashlytics().recordError(new Error("foobar"));
raises a
java.lang.NullPointerException
if the functionName
of the StackFrame
is not available. This is a {N} Angular application bzw.
In my case, the relevant parts of the original JS runtime stack trace looks like this, see inline comments for context:
// handleError() is our custom Angular ErrorHandler, therefore it is in bundle.js
handleError(file:///data/data/foo.bar.dev/files/app/bundle.js:1215:27)
at next(file:///data/data/foo.bar.dev/files/app/vendor.js:43721:42)
at SafeSubscriber.__tryOrUnsub(file:///data/data/foo.bar.dev/files/app/vendor.js:158609:16)
at SafeSubscriber.next(file:///data/data/foo.bar.dev/files/app/vendor.js:158547:22)
at Subscriber._next(file:///data/data/foo.bar.dev/files/app/vendor.js:158493:26)
at Subscriber.next(file:///data/data/foo.bar.dev/files/app/vendor.js:158470:18)
at Subject.next(file:///data/data/foo.bar.dev/files/app/vendor.js:158240:25)
at emit(file:///data/data/foo.bar.dev/files/app/vendor.js:40373:15)
// this part of the stack is actually the body of an arrow function
// zone.runOutsideAngular(() => zone.onError.emit(error));
// I guess this is why there is no functionName as it is anonymous
at (file:///data/data/foo.bar.dev/files/app/vendor.js:76877:55)
at invoke(file:///data/data/foo.bar.dev/files/app/vendor.js:179011:26)
at run(file:///data/data/foo.bar.dev/files/app/vendor.js:178773:43)
at runOutsideAngular(file:///data/data/foo.bar.dev/files/app/vendor.js:76751:28)
at onHandleError(file:///data/data/foo.bar.dev/files/app/vendor.js:76877:18)
at handleError(file:///data/data/foo.bar.dev/files/app/vendor.js:179015:37)
This empty function name causes an java.lang.NullPointerException
error here as the methodName
argument of a java.lang.StackTraceElement
may not be null:
Metadata
Metadata
Assignees
Labels
No labels