danielgek / nativescript-sentry Goto Github PK
View Code? Open in Web Editor NEWSentry java/cocoa for nativescript
License: Apache License 2.0
Sentry java/cocoa for nativescript
License: Apache License 2.0
According to Sentry docs level is a valid option.
However it's commented out in the SentryOptions and SentryBreadcrumb interfaces.
What is the reason for this?
Thank You.
tns --version
to fetch it)node_modules/tns-core-modules/package.json
file in your project)"tns-android"
and "tns-ios"
properties in the package.json
file of your project)package.json
file of yourScaffold fresh nativescript project and add the plugin. Then run:
tns run ios
App crashed before starting up with this error:
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/Sentry/NSString+SentryNSUIntegerValue.m:22:12: warning: implicit conversion
loses integer precision: 'unsigned long long' to 'NSUInteger' (aka 'unsigned int') [-Wshorten-64-to-32]
return strtoull([self UTF8String], NULL, 0);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
In android show next message
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
I solved with add line in include.gradle compile 'org.slf4j:slf4j-nop:1.7.25'
Is it possible to publish the changes that I see in code
Because in version 1.9.1 I cannot find this changes in compiled js file.
In js compiled code I see only
SentryErrorHandler.prototype.handleError = function (err) { try { __1.Sentry.captureException(err); } catch (e) { console.log('[NativeScript-Sentry - SentryErrorHandler]', e); } throw err; };
This commit will probably solve our problem of crashing application when we use this plugin
Thanks
Did it.
Recent related is from January and is closed.
cannot launch demo
This shows the emulator
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
Error calling module function
Error calling module function
Error calling module function
Error calling module function
Error calling module function
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5876)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: com.tns.NativeScriptException:
Error calling module function
Error calling module function
Error calling module function
Error calling module function
Error calling module function
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "../", relative to: app/tns_modules/nativescript-sentry/angular/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/error.handler.js', line: 4, column: 11
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/app.module.js', line: 4, column: 23
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-sentry/angular/index.js', line: 3, column: 20
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/app/app.module.js', line: 5, column: 17
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/main.js', line: 5, column: 20
Frame: function:'require', file:'', line: 1, column: 266
at com.tns.Runtime.runModule(Native Method)
at com.tns.Runtime.runModule(Runtime.java:624)
at com.tns.Runtime.run(Runtime.java:616)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
... 8 more
This info is from the demo-ng
"tns-android": 5.2.1
and "tns-ios": 5.2.0
"dependencies": {
"@angular/animations": "~7.2.8",
"@angular/common": "~7.2.8",
"@angular/compiler": "~7.2.8",
"@angular/core": "~7.2.8",
"@angular/forms": "~7.2.8",
"@angular/http": "~7.2.8",
"@angular/platform-browser": "~7.2.8",
"@angular/platform-browser-dynamic": "~7.2.8",
"@angular/router": "~7.2.8",
"nativescript-angular": "~7.2.2",
"nativescript-sentry": "file:../src",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.13",
"rxjs": "~6.4.0",
"tns-core-modules": "~5.2.2",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@nativescript/schematics": "~0.5.1",
"nativescript-dev-typescript": "~0.9.0",
"nativescript-dev-webpack": "~0.20.2",
"@angular/compiler-cli": "~7.2.8",
"@ngtools/webpack": "~7.3.5",
"tslint": "~5.14.0"
}
npm i #throw an error
npm ci # same as npm i but optimized to work
tns run android # compiled correctly but throw an error because you left a trailing comma on ./demo-ng/src/package.json on your latest commit
#fix the comma
tns run android # show an error message
Is there a way to support the beforeSend option? I don't want to log things when developing locally... Something like this:
Sentry.init(
{ dsn: "DSN", beforeSend: (event, hint) => {
if (IS_DEBUG) {
console.error(hint.originalException || hint.syntheticException || event);
return null;
}
return event;
}
});
Good job on the last updates, really cool!
Got a bit frustrated on development mode on the other hand as every issue is captured without output on the console..Is there any way to configure the 'sensibility' of the tracker?
Hello,
Thanks for this plugin!
I'm currently trying to add extra context data with Sentry.setContextExtra
, but both native environments try to cast the values to string (extra as NSDictionary<string, string>
for iOS, sentryClient.addExtra(key, extra[key].toString());
for Android). Why? Sentry does support data structures in both native libraries.
It also would be very useful if we could use the option to add extra data to the user.
Both libraries support this:
https://github.com/getsentry/sentry-java/blob/master/sentry/src/main/java/io/sentry/event/UserBuilder.java (setData)
Here is my code:
app.module.ts:
import { SentryModule } from 'nativescript-sentry/angular';
@NgModule({
bootstrap: [
AppComponent
],
imports: [
SentryModule.forRoot({ dsn: 'https://<code>:<code>@sentry.io/<project_id>' })
],
})
export class AppModule {}
GlobalErrorHandler.ts
import { ErrorHandler, Injectable } from '@angular/core';
import { Sentry } from 'nativescript-sentry';
@Injectable()
export class GlobalErrorHandler implements ErrorHandler {
constructor() { }
handleError(error) {
Sentry.captureException(error, { });
throw error;
}
}
When I throw a test error, the app crashes, the code in the global error handler executes, but when I log in to our dashboard in Sentry.io, I do not see any events logged.
Am I missing anything in the setup?
Thanks.
The SentryOptions interface contains a few useful settings:
export interface SentryOptions {
environment?: string;
release?: string;
tags?: {
[id: string]: string;
};
extra?: any;
}
It would be helpful if one could specify theses options in SentryModule.forRoot.
Are there already any plans on integrating this?
When trying to implement this plugin in a NativeScript Angular environment, underlying web-related functions are being called.
Resulting error trace:
CONSOLE LOG file:///app/core/services/ns-app.service.js:42:16: toggling http logs: OFF
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: ns-renderer: _document.attachEvent is not a function. (In '_document.attachEvent('onclick', self._breadcrumbEventHandler('click'))', '_document.attachEvent' is undefined)
CONSOLE WARN file:///app/tns_modules/tns-core-modules/ui/text-view/text-view.js:14:46: Class "UITextViewDelegateImpl" already implements the "UIScrollViewDelegate" protocol.
11:03:21 AM - Compilation complete. Watching for file changes.
Minimum steps to reproduce:
AppModule
SentryModule.forRoot({
dsn: 'https://foo:[email protected]/10'
}),
(we have a valid dsn, just not wanting to share the public one).
On the latest of everything:
All NativeScript components versions information
┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.4.0 │ 3.4.0 │ Up to date │
│ tns-core-modules │ 3.4.0 │ 3.4.0 │ Up to date │
│ tns-android │ 3.4.0 │ 3.4.0 │ Up to date │
│ tns-ios │ 3.4.0 │ 3.4.0 │ Up to date │
└──────────────────┴─────────────────┴────────────────┴─────────────┘
Any ideas?
I got this error message once I tried to build has sentry.
Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Can't resolve all parameters for SentryErrorHandler: (?)
tns --version
to fetch it)node_modules/tns-core-modules/package.json
file in your project)"tns-android"
and "tns-ios"
properties in the package.json
file of your project)package.json
file of yourScaffold fresh nativescript project and add the plugin. Then run:
tns run ios
App crashed before starting up with this error:
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/Sentry/NSString+SentryNSUIntegerValue.m:22:12: warning: implicit conversion
loses integer precision: 'unsigned long long' to 'NSUInteger' (aka 'unsigned int') [-Wshorten-64-to-32]
return strtoull([self UTF8String], NULL, 0);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
When using CaptureException, in Sentry I get something like this instead of a nice stack trace:
{"message":"test","stacktrace":"onLog@file:///app/bundle.js:1398:102 [angular]\n_log@file:///app/vendor.js:88165:38 [angular]\nerror@file:///app/vendor.js:88082:18 [angular]\nerror@file:///app/bundle.js:1306:26 [angular]\ntestError@file:///app/0.js:218:26 [angular]\n\ncallWithDebugContext@file:///app/vendor.js:60013:30 [angular]\ndispatchEvent@file:///app/vendor.js:56392:36 [angular]\nfile:///app/vendor.js:49363:51 [angular]\n__tryOrUnsub@file:///app/vendor.js:92013:20 [angular]\nnext@file:///app/vendor.js:91951:34 [angular]\n_next@file:///app/vendor.js:91895:30 [angular]\nnext@file:///app/vendor.js:91872:23 [angular]\nnext@file:///app/vendor.js:91646:29 [angular]\nemit@file:///app/vendor.js:49335:80 [angular]\nonTap@file:///app/bundle.js:1749:22 [angular]\n\ncallWithDebugContext@file:///app/vendor.js:60013:30 [angular]\ndispatchEvent@file:///app/vendor.js:56392:36 [angular]\nfile:///app/vendor.js:81443:31 [angular]\nonInvoke@file:///app/vendor.js:53135:39 [angular]\nzonedCallback@file:///app/vendor.js:81442:27 [<root>]\nnotify@file:///app/vendor.js:105659:31 [<root>]\n_emit@file:///app/vendor.js:105676:24 [<root>]\ntap@file:///app/vendor.js:115440:24 [<root>]\nUIApplicationMain@[native code] [<root>]\nstart@file:///app/vendor.js:102776:26 [<root>]\nrun@file:///app/vendor.js:102804:10 [<root>]\nbootstrapNativeScriptApp@file:///app/vendor.js:80906:26 [<root>]\nbootstrapApp@file:///app/vendor.js:80824:38 [<root>]\nbootstrapModule@file:///app/vendor.js:80808:26 [<root>]\n./main.ts@file:///app/bundle.js:2569:116 [<root>]\n__webpack_require__@file:///app/bundle.js:76:34 [<root>]\ncheckDeferredModules@file:///app/bundle.js:45:42 [<root>]\nfile:///app/bundle.js:166:38 [<root>]\nanonymous@file:///app/bundle.js:167:12 [<root>]\nevaluate@[native code] [<root>]\nmoduleEvaluation@[native code] [<root>]\npromiseReactionJob@[native code] [<root>]\nrequire@[native code] [<root>]\nanonymous@file:///app/starter.js:2:8 [<root>]\nevaluate@[native code] [<root>]\nmoduleEvaluation@[native code] [<root>]\npromiseReactionJob@[native code] [<root>]","name":"Error"}
Note, in Sentry there are no newlines, this is just one blob of text.
Hi, I get this error when I probe implement sentry plugin.
Please help me what can I do?
My project Nativescript Angular
tns version 3.4.2
I try android genymotion Virtual device
Thnx Miklos
System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation
System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 2607
Since the update to 1.5.0, I've noticed that js issues are well tracked but there is no native issues raised anymore on sentry.
I've got a bunch of issues poppin on play.store but nothing on sentry anymore
NS 5.4.2
Angular
Device Redmi Android 8
If we start the app with no connection then the app loads, but crashes few seconds after (we see the first page). If I enable network then it works fine. Commenting Sentry module and disabling connection app works so I assume the problem is somewhere in Sentry module.
The only error I see is this, not sure if helps?
System.err: com.tns.NativeScriptException:
System.err: Calling js method run failed
System.err:
System.err: [object Object]
System.err: File: "file:///data/data/com.app.name/files/app/vendor.js, line: 107533, column: 24
System.err:
System.err: StackTrace:
System.err: Frame: function:'push.../node_modules/nativescript-angular/zone-js/dist/zone-nativescript.js.Zone.runGuarded', file:'file:///data/data/com.app.name/files/app/vendor.js', line: 107533, column: 25
System.err: Frame: function:'', file:'file:///data/data/com.app.name/files/app/vendor.js', line: 107507, column: 29
System.err: Frame: function:'run', file:'file:///data/data/com.app.name/files/app/vendor.js', line: 141627, column: 13
thanks
### If the demo apps cannot help and there is no issue for your problem, tell us about it does compile, but when run on emulator crashes showing at top `io is not defined` Error is pointing to `sentry.js`, this is corresponding to [this](https://github.com/danielgek/nativescript-sentry/blob/master/src/sentry.android.ts#L12) line on `sentry.android.ts` ### Which platform(s) does your issue occur on? - Android - 9 versions - emulator ### Please, provide the following version numbers that your issue occurs with: - CLI: 5.2.0 - Cross-platform modules: 5.2.2 - Runtime(s): "tns-android": 5.2.1 and "tns-ios": 5.2.0 - Plugin(s): ```js "dependencies": { "@angular/animations": "7.2.0", "@angular/common": "7.2.0", "@angular/compiler": "7.2.0", "@angular/core": "7.2.0", "@angular/forms": "7.2.0", "@angular/http": "7.2.0", "@angular/platform-browser": "7.2.0", "@angular/platform-browser-dynamic": "7.2.0", "@angular/router": "7.2.0", "ajv": "6.9.1", "atob": "2.1.2", "lodash": "4.17.11", "moment": "2.24.0", "nativescript-angular": "7.2.1", "nativescript-localstorage": "2.0.0", "nativescript-permissions": "1.3.6", "nativescript-sentry": "^1.9.1", "nativescript-statusbar": "5.0.0", "nativescript-theme-core": "1.0.4", "nativescript-ui-sidedrawer": "6.0.0", "reflect-metadata": "0.1.12", "rxjs": "6.3.3", "tns-core-modules": "5.2.2", "zone.js": "0.8.26" }, "devDependencies": { "@angular/compiler-cli": "7.2.0", "@nativescript/schematics": "0.5.0", "@ngtools/webpack": "7.2.0", "@types/atob": "2.1.2", "@types/lodash": "4.14.130", "@types/mocha": "5.2.6", "@types/moment": "2.13.0", "nativescript-dev-sass": "^1.7.0", "nativescript-dev-typescript": "0.8.0", "nativescript-dev-webpack": "0.20.0" } ``` ### Please, tell us how to recreate the issue in as much detail as possible. had my project working, installed this plugin following the [config](https://github.com/danielgek/nativescript-sentry#with-angular) section. also installed the plugin for the Android SLF4J Log Error [from here](https://github.com/danielgek/nativescript-sentry#android-slf4j-log-error) added this on appmodule.ts ```js import { SentryModule } from 'nativescript-sentry/angular'; @NgModule({ bootstrap: [ AppComponent ], imports: [ NativeScriptModule, AppRoutingModule, HttpClientModule, NativeScriptFormsModule, NativeScriptUISideDrawerModule, NativeScriptCommonModule, SharedModule, SentryModule.forRoot({dsn: 'https://[email protected]/5'}) ``` now, the app crashes. I didn't even added something to capture exceptions. I'm on linux ubuntu 18.04 android studio (for the emulator) 3.3.1 ### Is there any code involved? is showing this ``` I'm still facing io is not defined on Android w/ Angular Using: "nativescript-angular": "~7.2.1", "nativescript-sentry": "1.9.1" io is not defined ReferenceError: io is not defined at Function.Sentry.init (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/nativescript-sentry/sentry.js:8:9) at new SentryErrorHandler (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/nativescript-sentry/angular/error.handler.js:12:24) at provideSentryServiceOptions (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/nativescript-sentry/angular/app.module.js:31:12) at _callFactory (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:21205:24) at _createProviderInstance (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:21161:30) at initNgModule (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:21091:36) at new NgModuleRef_ (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:21818:13) at createNgModuleRef (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:21807:16) at Object.debugCreateNgModuleRef [as createNgModuleRef] (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:23638:16) at NgModuleFactory_.create (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:24342:29) at file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:17800:47 at ZoneDelegate.invoke (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:388:26) at Object.onInvoke (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/@angular/core/bundles/core.umd.js:17334:37) at ZoneDelegate.invoke (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:387:32) at Zone.run (file:///data/data/org.nativescript.mobilesicdh2/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:138:43) ```
Sentry has deprecated the secret part of the DSN. However this project errors without it
TypeError: Cannot read property 'split' of undefined
A work around is to add an :
after key in the DSN. The new format was previously called the "public DSN" before the secret was removed.
Semi related to #5
It would probably be best to make the secret optional and update the readme example to not use secret. Happy to assist if necessary.
Hi i'm trying to test the plugin but when I add it the compiler throws this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeF0F1DebugAssets'.
> [app/tns_modules/error-stack-parser/dist/error-stack-parser.min.js] /home/lautaro/proyectos/sentry-test/sentry-app/platforms/android/src/main/assets/app/tns_modules/error-stack-parser/dist/error-stack-parser.min.js [app/tns_modules/error-stack-parser/dist/error-stack-parser.min.js] /home/lautaro/proyectos/sentry-test/sentry-app/platforms/android/src/main/assets/app/tns_modules/error-stack-parser/dist/error-stack-parser.min.js.gz: Error: Duplicate resources
Any Idea?
I get this error when building for prod:
ERROR in Error during template compile of 'AppModule'
Function calls are not supported in decorators but 'SentryModule' was called.
However during dev there's no problem.
My code in app.module.ts
import {SentryModule} from 'nativescript-sentry/angular';
@NgModule({
imports: [
SentryModule.forRoot({dsn: 'https://...'}),
],
})
For angular aot requirements, a direct string would work correctly
e.g => SentryModule.forRoot({ dsn: 'abc123' }),
but any const, function, getter
would break the instanciation
e.g => SentryModule.forRoot({ dsn: AppConfig.sentryDSN }),
Would be cool to have something like TranslateModule
for instance where you can provide a factory
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: translateLoaderFactory,
deps: [Http],
},
}),
Hi, I'm trying to add extra data to the caught exception through the extra field of SentryClient
or SentryClient.sharedClient
, but without any success.
Where is the right place to set the extra
property?
SentryClient.sharedClient.extra.setValueForKey(
"username",
"[my username]"
);
I am not able to install sentry cocoa in circleci
using npm install nativescript-sentry
.Below is the stacktrace for the error
/usr/local/bin/git clone https://github.com/getsentry/sentry-cocoa.git /var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180724-756-1wj0oxl --template= --single-branch --depth 1 --branch 3.9.1
Pod install command failed. Error output: Cloning into '/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180724-756-1wj0oxl'...
Note: checking out '9b2971e02f68b7e978e4716eaa4f28f8fc047c23'.You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new-branch-name> Cloning into '/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180724-756-1fxk7t9'... Cloning into '/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180724-756-mlpyf8'... Note: checking out '9ed7b2551a3c64b0ddb7c181f5c31332364dd3b4'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new-branch-name> Cloning into '/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180724-756-13ifhr8'... Note: checking out 'a44d4ad61bb1be7ccf793cc442acb803bbc7da89'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new-branch-name> at Errors.fail (/Users/distiller/dispatchbot-worker/node_modules/nativescript/lib/common/errors.js:125:28) at Errors.failWithoutHelp (/Users/distiller/dispatchbot-worker/node_modules/nativescript/lib/common/errors.js:135:21) at IOSProjectService.<anonymous> (/Users/distiller/dispatchbot-worker/node_modules/nativescript/lib/services/ios-project-service.js:941:34) at Generator.next (<anonymous>) at fulfilled (/Users/distiller/dispatchbot-worker/node_modules/nativescript/lib/services/ios-project-service.js:4:58) at <anonymous> at process._tickCallback (internal/process/next_tick.js:118:7)
Hey @danielgek,
First of all, thanks for your work.
I've just updated to 1.5.0, after sorting out a few issues related to the older version of typescript I have installed on my machine, I've found this error (runtime, Android):
JS: ns-renderer: Cannot read property 'split' of undefined JS: JS: TypeError: Cannot read property 'split' of undefined JS: at Function.Common._init (file:///data/data/MYAPP/files/app/tns_modules/nativescript-sentry/sentry.common.js:25:27) JS: at Function.Sentry.init (file:///data/data/MYAPP/files/app/tns_modules/nativescript-sentry/sentry.js:12:14)
The way I'm trying to initialize it is:
Sentry.init('https://[email protected]/A_NUMBER, {});
sentry-android seems deprecated.
Are there any plans to switch to official sentry-java/sentry-android for Android?
Hi I wan't to use this plugin in my project but when I import { SentryModule } from 'nativescript-sentry'; I have a typescript error. No Module exported. I try var SentryModule = require('nativescript-sentry') but this is error no forRoot function.
Please help what is the problem in typescript version?
Thanx Miklos
I get this error when trying to run the demo app:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.demong/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
System.err: Calling js method onCreate failed
System.err:
System.err: Error: Can't resolve all parameters for SentryErrorHandler: (?).
System.err: File: "file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js, line: 11175, column: 16
System.err:
System.err: StackTrace:
System.err: Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 1298, column: 33
System.err: Frame: function:'syntaxError', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 1098, column: 21
System.err: Frame: function:'CompileMetadataResolver._getDependenciesMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10987, column: 39
System.err: Frame: function:'CompileMetadataResolver._getTypeMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10880, column: 30
System.err: Frame: function:'CompileMetadataResolver._getInjectableTypeMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11102, column: 25
System.err: Frame: function:'CompileMetadataResolver.getProviderMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11111, column: 26
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11049, column: 53
System.err: Frame: function:'CompileMetadataResolver._getProvidersMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11009, column: 23
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10632, column: 76
System.err: Frame: function:'CompileMetadataResolver.getNgModuleMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10623, column: 53
System.err: Frame: function:'JitCompiler._loadModules', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 23932, column: 55
System.err: Frame: function:'JitCompiler._compileModuleAndComponents', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 23913, column: 40
System.err: Frame: function:'JitCompiler.compileModuleAsync', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 23873, column: 41
System.err: Frame: function:'CompilerImpl.compileModuleAsync', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', line: 202, column: 35
System.err: Frame: function:'PlatformRef.bootstrapModule', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 4414, column: 29
System.err: Frame: function:'_bootstrapper', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-angular/platform-common.js', line: 85, column: 35
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-angular/platform-common.js', line: 148, column: 19
System.err: Frame: function:'Observable.notify', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/data/observable/observable.js', line: 110, column: 23
System.err: Frame: function:'notifyLaunch', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 884, column: 17
System.err: Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 817, column: 28
System.err: Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 691, column: 14
System.err: Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
System.err:
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
System.err: Caused by: com.tns.NativeScriptException:
System.err: Calling js method onCreate failed
System.err:
System.err: Error: Can't resolve all parameters for SentryErrorHandler: (?).
System.err: File: "file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js, line: 11175, column: 16
System.err:
System.err: StackTrace:
System.err: Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 1298, column: 33
System.err: Frame: function:'syntaxError', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 1098, column: 21
System.err: Frame: function:'CompileMetadataResolver._getDependenciesMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10987, column: 39
System.err: Frame: function:'CompileMetadataResolver._getTypeMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10880, column: 30
System.err: Frame: function:'CompileMetadataResolver._getInjectableTypeMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11102, column: 25
System.err: Frame: function:'CompileMetadataResolver.getProviderMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11111, column: 26
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11049, column: 53
System.err: Frame: function:'CompileMetadataResolver._getProvidersMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 11009, column: 23
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10632, column: 76
System.err: Frame: function:'CompileMetadataResolver.getNgModuleMetadata', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10623, column: 53
System.err: Frame: function:'JitCompiler._loadModules', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 23932, column: 55
System.err: Frame: function:'JitCompiler._compileModuleAndComponents', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 23913, column: 40
System.err: Frame: function:'JitCompiler.compileModuleAsync', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 23873, column: 41
System.err: Frame: function:'CompilerImpl.compileModuleAsync', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', line: 202, column: 35
System.err: Frame: function:'PlatformRef.bootstrapModule', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 4414, column: 29
System.err: Frame: function:'_bootstrapper', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-angular/platform-common.js', line: 85, column: 35
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/nativescript-angular/platform-common.js', line: 148, column: 19
System.err: Frame: function:'Observable.notify', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/data/observable/observable.js', line: 110, column: 23
System.err: Frame: function:'notifyLaunch', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 884, column: 17
System.err: Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 817, column: 28
System.err: Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 691, column: 14
System.err: Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.demong/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
System.err:
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:983)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:967)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:959)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
System.err: at android.app.Activity.performCreate(Activity.java:7009)
System.err: at android.app.Activity.performCreate(Activity.java:7000)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
System.err: ... 9 more
I tried to install this package but the moment I call Sentry.init()
it throws the following error:
TypeError: Cannot read property 'getPackageManager' of undefined
The code:
Sentry.init("https://<mykey>:@sentry.io/<project>", {
environment: settings.environment,
release: 'v0.0.1',
});
As you can see I already added the current workaround of adding a ':' after they key as said in #15. I also tried to set the 'release' hoping that would solve this issue. But that didn't work either. As far as I can see there aren't any other issues about this problem, also Google didn't help much. And neither did SO. :)
$ tns --version
4.2.4
$ node -v
v10.11.0
$ npm -v
6.4.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.