How to debug nativescript throwing "NativeScript caught signal 11." error?

debug nativescript app in chrome
nativescript sidekick
nativescript run in browser
nativescript terminal
cannot find debug adapter for type'': nativescript
nativescript tutorial
nativescript development environment
nativescript docs

I have created a plugin for nativescript ios which was working fine until recently I updated the pod version. Now, when I run the plugin, I get this error: NativeScript caught signal 11.

I have already double checked the typings and there was no typo or parameter mismatch there.

NativeScript caught signal 11.
Native Stack:
1   0x104c6cf70 sig_handler(int)
2   0x1f46f99dc <redacted>
3   0x104c5e768 NativeScript::ObjCMethodWrapper::postInvocation(NativeScript::FFICall*, JSC::ExecState*, NativeScript::FFICall::Invocation&)
4   0x104bf500c NativeScript::FunctionWrapper::call(JSC::ExecState*)
5   0x1056d7a58 llint_entry
6   0x1056d6eb4 llint_entry
7   0x1056d6eb4 llint_entry
8   0x1056d6eb4 llint_entry
9   0x1056d7318 llint_entry
10  0x1056d6eb4 llint_entry
11  0x1056d7318 llint_entry
12  0x1056d6e4c llint_entry
13  0x1056d6e4c llint_entry
14  0x1056d6eb4 llint_entry
15  0x1056d6eb4 llint_entry
16  0x1056d6e4c llint_entry
17  0x1056d6eb4 llint_entry
18  0x1056cf91c vmEntryToJavaScript
19  0x1054ce84c JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
20  0x104c61238 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::callFunction(JSC::JSValue const&, JSC::ArgList const&, void*)
21  0x104c60d58 NativeScript::ObjCMethodCallback::ffiClosureCallback(void*, void**, void*)
22  0x104c6142c NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
23  0x1056d9794 ffi_closure_SYSV_inner
24  0x1056dc1b4 .Ldo_closure
25  0x2213f1040 <redacted>
26  0x220e9a1c8 <redacted>
27  0x220e9a4e8 <redacted>
28  0x220e99554 <redacted>
29  0x221428304 <redacted>
30  0x22142952c <redacted>
31  0x22140959c <redacted>
JS Stack:
1   initWithConfiguration@[native code]
2   start@file:///app/tns_modules/nativescript-nsjumioplugin/nsjumioplugin.js:22:97
3   onSelectSingleTap@file:///app/app/pages/user/info/identification/identification.component.js:109:33
4   @:34:44
5   callWithDebugContext@file:///app/tns_modules/@angular/core/bundles/core.umd.js:24198:34
6   dispatchEvent@file:///app/tns_modules/@angular/core/bundles/core.umd.js:20577:40
7   @file:///app/tns_modules/nativescript-angular/renderer.js:238:31
8   onInvoke@file:///app/tns_modules/@angular/core/bundles/core.umd.js:17344:43
9   run@file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:138:49
10  zonedCallback@file:///app/tns_modules/nativescript-angular/renderer.js:237:27
11  notify@file:///app/tns_modules/tns-core-modules/data/observable/observable.js:110:31
12  _emit@file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24
13  tap@file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24
14  UIApplicationMai<\M-b\M^@\M-&>

In my case, I have used this command to run the app

tns run ios --bundle --no-hmr --clean --log trace

Error Handling, Learn how to debug NativeScript apps on iOS and Android using Chrome DevTools and Safari AppInspector. Take a look at this NativeScript debugging video for a quick look at what you get. We incorporated Google Chrome developer tools in NativeScript 2.5 and will continue to expand on the feature set with each release. More information about NativeScript debugging can be found in the debugging section of the NativeScript documentation.

This may help you: I've got NativeScript caught signal 11 while using RadSideDrawer. I've tried to use drawerContentSize="drawerSize" instead of correct [drawerContentSize]="drawerSize" (since drawerSize is a getter in my ts file)

So generally I may assume that it may happen if you forget square brackets (sometimes)

Chrome DevTools Debugging, Error thrown when attempting to run build-related operations for iOS Command gradlew.bat failed with exit code 1. tns run android throws Java (javac) error. Start debugging - starts an application with the debugger enabled; Attach/Detach debugger - attach/detach the debugger to a running application; Start an application with the debugger attached. The following command will build, deploy and run the application with the debugger attached: tns debug android

It seems the signal 11 error is a general error that can be caused by many things that others mentioned in comments.

In my case, my IP was blocked by OneSignal's servers.

Troubleshooting, Start an application with the debugger attached. The following command will build, deploy and run the application with the debugger attached: tns debug android. That's all, now you can debug the Java part of the runtime. Just put a break point and hit debug. If you want to debug the c++ part of the runtime, you should point the debug tool to the debug symbols. From Android Studio: Open the "Run" menu -> "Edit Configurations " -> The following screen will open:

Debug, In my case, I have used this command to run the app tns run ios --bundle --no-​hmr --clean --log trace. You go to the debug view (the one on the screenshot), and click the cogwheel icon with the little red exclamation mark (means you don't have a default launch configuration), you will be prompted to choose a debug configuration for Node.js, NativeScript Extension, or another language/extension.

How to debug nativescript throwing "NativeScript caught signal 11 , Possible issues with breakpoint debugging #5000 trying to execute tns debug iOS --debug-brk the debugger cannot attach at all and cli throws: NativeScript debugger was not able to get inspector socket port on device  Verify that the app you want to debug is currently running on the device. Procedure. Launch NativeScript Sidekick and open your app. From the left toolbar, select Devices. Click on the Start Debugger button (bug icon) next to the respective device. Use the newly opened Developer Tools dialog to debug your app.

Possible issues with breakpoint debugging · Issue #5000 , This makes any errors thrown by the app impossible to debug. for example, here are messages thrown by my app in the terminal: JS: ERROR  Debugging typescript-transpiledTo debug your TypeScript plugin based on the sources, and not the transpiled JS, it is enough to edit the respective tsconfig.json to output sources with inlined maps. That will ensure that the TypeScript sources will also show in the Sources pane, and allow you to debug it.

  • Take a look at this thread: It might be something related to nativescript-plugin-firebase, you could try to update it to the latest version.
  • Thank you. Actually in my case the issue was my IP was blocked by OneSignal's servers. I forgot to update this question.