Skip to content
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

Java error stack should contains only javascript stack #1514

Closed
vhristov5555 opened this issue Oct 14, 2019 · 0 comments
Closed

Java error stack should contains only javascript stack #1514

vhristov5555 opened this issue Oct 14, 2019 · 0 comments
Milestone

Comments

@vhristov5555
Copy link

vhristov5555 commented Oct 14, 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • Android Runtime: Next(6.2.0-2019-10-12-153225-01)
  1. Create js new project
  2. Add java exception in main-view-model.js:
try {
    var file = java.io.File.createTempFile("prefix");
} catch (error) {
    console.log("### CAUGHT STACK:", error.stack);
}

Actual: Stack will contain java information:

JS: ### CAUGHT STACK: Error: java.lang.Exception: Failed resolving method createTempFile on class java.io.File
JS:     com.tns.Runtime.resolveMethodOverload(Runtime.java:1245)
JS:     com.tns.Runtime.callJSMethodNative(Native Method)
JS:     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
JS:     com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1160)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1138)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1134)
JS:     com.tns.gen.java.lang.Object_vendor_17370_32_ClickListenerImpl.onClick(Object_vendor_17370_32_ClickListenerImpl.java:18)
JS:     android.view.View.performClick(View.java:5198)
JS:     android.view.View$PerformClick.run(View.java:21147)
JS:     android.os.Handler.handleCallback(Handler.java:739)
JS:     android.os.Handler.dispatchMessage(Handler.java:95)
JS:     android.os.Looper.loop(Looper.java:148)
JS:     android.app.ActivityThread.main(ActivityThread.java:5417)
JS:     java.lang.reflect.Method.invoke(Native Method)
JS:     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
JS:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
JS:     at Observable.viewModel.onTap (file:///app/main-view-model.js:19:0)
JS:     at Button.push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify (file:///node_modules/tns-core-modules/data/observable/observable.js:107:0)
JS:     at Button.push.../node_modules/tns-core-modules/data/observable/observable.js.Observable._emit (file:///node_modules/tns-core-modules/data/observable/observable.js:127:0)
JS:     at Object.ClickListenerImpl.onClick (file:///node_modules/tns-core-modules/ui/button/button.js:29:0)

Expected: Stack should contains only javascript information

@vhristov5555 vhristov5555 changed the title Java error stack contains should contains only javascript stack Java error stack should contains only javascript stack Oct 17, 2019
@vtrifonov vtrifonov added this to the 6.2.0 milestone Oct 23, 2019
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

2 participants