Skip to content

No JS stack on discardedError and unhandledError #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tsonevn opened this issue Apr 23, 2019 · 0 comments
Closed

No JS stack on discardedError and unhandledError #1354

tsonevn opened this issue Apr 23, 2019 · 0 comments
Assignees
Milestone

Comments

@tsonevn
Copy link

tsonevn commented Apr 23, 2019

@farfromrefug commented on Mon Apr 22 2019

If you look at your test app here we are supposed to get the JS error .
But the JS error is not filled correctly (at least on android, need to check ios).
the JS error object as the same value for message and stack:

The application crashed because of an uncaught exception. You can look at "stackTrace" or "nativeException" for more detailed information about the exception.\'

the error.stackTrace however contains something like this:

An uncaught Exception occurred on "main" thread.
 com.tns.NativeScriptException: 
Calling js method onClick failed

TypeError: this.thisShouldCrash is not a function
File: "file:///data/data/org.nativescript.demovuebugsnag/files/app/bundle.js, line: 1044, column: 11

StackTrace: 
   Frame: function:\'crashTest\', file:\'file:///data/data/org.nativescript.demovuebugsnag/files/app/bundle.js\', line: 1044, column: 12
...

We should get the correct error message and stacktrace for the JS error.
The data is here as it all in error.stackTrace.
I could parse the error.stackTrace and create a correct JS error message out of it.
But it would be better for it to be done inside {N}


@farfromrefug commented on Mon Apr 22 2019

After running some tests, this is an Android-only issue. The error si filled correctly on IOS.
Should this issue be opened in the android-runtime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants