We're using an on premise install (8.14.1) and I'm trying to setup react-native-sentry I've configured according to the docs and everything seems to build and run fine, but no errors actually show up. I'm testing from the Simulator and manually throwing an error from the root component on mount.
Can you please add logLevel: SentryLog.Debug as an option and check the output.
Sentry.config("DSN", {
logLevel: SentryLog.Debug
}).install();
A clue!
Sentry - Debug:: status = 403
Sentry - Debug:: response = Optional({"error":"Missing required attribute in authentication header: sentry_secret"})
Sentry - Debug:: Queued requests: 1
Did you make sure you copied the DSN from the documentation?
https://docs.sentry.io/clients/react-native/#client-configuration
Looks like you are missing the secret part.
Ah, it wasn't clear that the DSN format changed. The key:secret format isn't actually mentioned anywhere in the docs.
Seems to have fixed that error, but still not seeing errors reported.
Using Sentry.nativeCrash():
INFO : KSCrash.m (339): -[KSCrash sendAllReportsWithCompletion:]: Sending 0 crash reports
Using Sentry.captureMessage(errorMessage, { extra }):
Argument 1 (int) of RNSentry. must not be null
Argument 1 (<null>) of RNSentry. could not be processed. Aborting method call.
Using throw new Error('Test'): nothing happens.
Hello guys,
I'm currently doing the same as @nicinabox , and having the same result so far.
Only captureMessagedoes send an error to Sentry, but nativeCrash or a simple throw do nothing.
EDIT: I tested with an iOS app built in production settings through Hockey App, and a throw is indeed catched by Sentry
Please make sure you also added the code to you AppDelegate.m
https://docs.sentry.io/clients/react-native/#client-configuration
Also note that nativeCrash will only work if the app is not attached to the debugger in Xcode.
I did add the code in the AppDelegate.m of my project !
But it does not anyhow send the crashes in my simulator...
However it works on my production apps.
+1
Nothing is reported on the sentry dashboard with debug/release build.
Can you guys please send me your sentry url via email at [email protected]
I need to check something on your account, we had an issue with an earlier version of sentry-cli where this could happen.
I am not seeing any issues reporting when my development build iOS app crashes.
Can you confirm that this is because it ignores them by default for development builds and only reports them for release builds? If that isn't the case, I might be getting this bug too.
Nothing being reported on iOS here
Can you guys please add a bit more context ...
Like which version are you using?
Swift (+version) or ObjC?
It should definitely report something in DEBUG so it should work.
The latest version of our iOS client sentry-swift (2.1.11) fixed a bug in swift 3
@matt-oakes Can you try sending a normal message like this:
Sentry.captureMessage("TEST message");
It depends on the error if it will be sent, it will definitely be sent in release, in DEBUG not every error will be sent e.g.: if you see a redbox the error will not be sent.
@HazAT I think the issue I'm seeing is unrelated then. I think it's just because it's running in debug mode and is showing a red box. Maybe the documentation just needs to be a little clearer on this.
Thanks for the help!
Hey, please upgrade to the latest release 0.11.0.
We switched our internal ios client so hopefully, this issue should be resolved now.
@HazAT We are also not getting any errors reported but only in release mode. Works fine in Debug. Latest version as of now. Please reopen this issue.
@alizain-wal Hey, I've just tested it with a release build, it seems to work fine.
Is it possible for you to enable verbose logging and paste the output here?
Sentry.config("DSN", {
logLevel: SentryLog.Verbose
}).install();
@HazAT Thank you for your response. Verbose log:
objc[67501]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x118f39cc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x118d506f0). One of the two will be used. Which one is undefined.
2017-08-25 11:32:02.432 <ProjectName>[67501:783151] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2017-08-25 11:32:02.453 <ProjectName>[67501:783151] Falling back to loading access token from NSUserDefaults because of simulator bug
2017-08-25 11:32:02.453 <ProjectName>[67501:783151] Falling back to storing access token in NSUserDefaults because of simulator bug
2017-08-25 11:32:02.454 <ProjectName>[67501:783151] Falling back to loading access token from NSUserDefaults because of simulator bug
2017-08-25 11:32:02.455 <ProjectName>[67501:783151] Falling back to storing access token in NSUserDefaults because of simulator bug
2017-08-25 11:32:02.455 <ProjectName>[67501:783151] Falling back to loading access token from NSUserDefaults because of simulator bug
2017-08-25 11:32:02.455 <ProjectName>[67501:783151] Falling back to storing access token in NSUserDefaults because of simulator bug
2017-08-25 11:32:02.580517+0500 <ProjectName>[67501:783151] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-08-25 11:32:02.581578+0500 <ProjectName>[67501:783151] [MC] Reading from private effective user settings.
2017-08-25 11:32:02.961 <ProjectName>[67501:783218] Sentry Started -- Version: 3.6.0
************************ Crash Handler Notice ************************
* App is running in a debugger. Masking out unsafe monitors. *
* This means that most crashes WILL NOT BE RECORDED while debugging! *
**********************************************************************
INFO : KSCrash.m (339): -[KSCrash sendAllReportsWithCompletion:]: Sending 0 crash reports
2017-08-25 11:32:03.031 <ProjectName>[67501:783256] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x60000027ea40>
2017-08-25 11:32:03.060 <ProjectName>[67501:783256] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:03.063 <ProjectName>[67501:783256] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642723.063349-0-BD32596E-FB8B-4AE8-81DE-E5504DD56891.json
2017-08-25 11:32:03.072 <ProjectName>[67501:783256] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x600000461e40>
2017-08-25 11:32:03.074 <ProjectName>[67501:783256] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:03.075 <ProjectName>[67501:783256] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642723.075421-1-4962AEB1-435E-4479-91EE-5EF71562D3FC.json
2017-08-25 11:32:03.082 <ProjectName>[67501:783256] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x600000266240>
2017-08-25 11:32:03.084 <ProjectName>[67501:783256] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:03.085 <ProjectName>[67501:783256] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642723.085012-2-F7BF2195-A3AF-48C5-B234-01E0009FB955.json
2017-08-25 11:32:03.088 <ProjectName>[67501:783256] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x600000465180>
2017-08-25 11:32:03.090 <ProjectName>[67501:783256] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:03.091 <ProjectName>[67501:783256] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642723.091415-3-D6DF4269-A4CF-4DA0-B552-B1EF12BB632F.json
2017-08-25 11:32:03.095 <ProjectName>[67501:783256] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x600000463c00>
2017-08-25 11:32:03.097 <ProjectName>[67501:783256] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:03.097 <ProjectName>[67501:783256] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642723.097694-4-C96F597E-BE27-4CE7-90FE-AD4E1EA8EB4D.json
2017-08-25 11:32:14.262 <ProjectName>[67501:783256] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x608000470380>
2017-08-25 11:32:14.264 <ProjectName>[67501:783256] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:14.265 <ProjectName>[67501:783256] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642734.265582-5-1E9F8CE0-1985-4C77-967F-9764E9ABDF08.json
2017-08-25 11:32:14.284 <ProjectName>[67501:783219] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x60000027f200>
2017-08-25 11:32:14.286 <ProjectName>[67501:783219] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:14.286 <ProjectName>[67501:783219] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642734.286886-6-FFBADA6D-1727-4DA2-9019-4EE5D30CE4C9.json
2017-08-25 11:32:14.440 <ProjectName>[67501:783450] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x600000461940>
2017-08-25 11:32:14.442 <ProjectName>[67501:783450] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:14.443 <ProjectName>[67501:783450] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642734.443242-7-8A9383D5-DC21-45FF-B158-DBA356FAB54A.json
2017-08-25 11:32:14.542 <ProjectName>[67501:783275] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x600000471500>
2017-08-25 11:32:14.544 <ProjectName>[67501:783275] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:14.544 <ProjectName>[67501:783275] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642734.544869-8-830D1AC9-FD3D-4A5D-A6F3-33D4234C0AFC.json
2017-08-25 11:32:14.618 <ProjectName>[67501:783450] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x6000006765c0>
2017-08-25 11:32:14.621 <ProjectName>[67501:783450] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:32:14.621 <ProjectName>[67501:783450] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642734.621496-9-21DA576F-A980-4835-93B4-EC2750E79269.json
2017-08-25 11:34:34.453 <ProjectName>[67501:783219] Sentry - Debug:: Add breadcrumb: <SentryBreadcrumb: 0x608000663d40>
2017-08-25 11:34:34.455 <ProjectName>[67501:783219] Sentry - Debug:: Dropped first breadcrumb due limit
2017-08-25 11:34:34.456 <ProjectName>[67501:783219] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/breadcrumbs/1503642874.455987-10-D759500B-1474-4123-9CEF-DF1C24DD8BCD.json
2017-08-25 11:34:34.466 <ProjectName>[67501:783219] Sentry - Verbose:: Sending JSON -------------------------------
2017-08-25 11:34:34.467 <ProjectName>[67501:783219] Sentry - Verbose:: {
"extra" : {
"session:duration" : 151496
},
"exception" : {
"values" : [
{
"value" : "Can't find variable: error_statement",
"thread_id" : 99,
"stacktrace" : {
"frames" : [
{
"colno" : 810,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "value",
"lineno" : 53,
"platform" : "javascript"
},
{
"colno" : 106,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "?",
"lineno" : 53,
"platform" : "javascript"
},
{
"colno" : 838,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "?",
"lineno" : 53,
"platform" : "javascript"
},
{
"colno" : 2603,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "value",
"lineno" : 53,
"platform" : "javascript"
},
{
"colno" : 1021,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "receiveTouches",
"lineno" : 118,
"platform" : "javascript"
},
{
"colno" : 647,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "_receiveRootNodeIDEvent",
"lineno" : 118,
"platform" : "javascript"
},
{
"colno" : 596,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "perform",
"lineno" : 135,
"platform" : "javascript"
},
{
"colno" : 675,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "?",
"lineno" : 118,
"platform" : "javascript"
},
{
"colno" : 143,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "handleTopLevel",
"lineno" : 125,
"platform" : "javascript"
},
{
"colno" : 88,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "s",
"lineno" : 125,
"platform" : "javascript"
},
{
"colno" : 1300,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "processEventQueue",
"lineno" : 119,
"platform" : "javascript"
},
{
"colno" : 80,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "i",
"lineno" : 124,
"platform" : "javascript"
},
{
"colno" : 151,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "v",
"lineno" : 119,
"platform" : "javascript"
},
{
"colno" : 584,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "i",
"lineno" : 121,
"platform" : "javascript"
},
{
"colno" : 389,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "o",
"lineno" : 121,
"platform" : "javascript"
},
{
"colno" : 59,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "l",
"lineno" : 122,
"platform" : "javascript"
},
{
"colno" : 4698,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "touchableHandleResponderRelease",
"lineno" : 167,
"platform" : "javascript"
},
{
"colno" : 7213,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "_receiveSignal",
"lineno" : 167,
"platform" : "javascript"
},
{
"colno" : 8426,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "_performSideEffectsForTransition",
"lineno" : 167,
"platform" : "javascript"
},
{
"colno" : 1161,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "touchableHandlePress",
"lineno" : 174,
"platform" : "javascript"
},
{
"colno" : 2978,
"filename" : "app:\/\/\/main.jsbundle",
"function" : "value",
"lineno" : 631,
"platform" : "javascript"
}
]
},
"type" : "ReferenceError"
}
]
},
"timestamp" : "2017-08-25T06:34:34Z",
"release" : "com.<OrgName>.<ProjectName>-1.0",
"dist" : "1",
"tags" : {
},
"breadcrumbs" : [
{
"data" : {
"url" : "https:\/\/<ServerURL>.co\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:50Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:50Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:50Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:50Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:50Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:52Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:52Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:52Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:52Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:53Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:53Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:53Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:53Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-24T10:23:53Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:54Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:54Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:54Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:54Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-24T10:23:55Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:21:18Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:21:18Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:21:18Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:21:18Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:21:18Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:21:19Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:21:19Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:21:19Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:21:19Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:21:19Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:26:01Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:26:01Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:26:01Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:26:01Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:26:01Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:26:09Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:26:09Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:26:10Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:26:10Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:26:11Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:32:03Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:32:03Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:32:03Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:32:03Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : null
},
"timestamp" : "2017-08-25T06:32:03Z",
"level" : "fatal",
"type" : "http",
"category" : "fetch"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/features?path=ny\/new-york",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:32:14Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/events\/recommendations?visibility_locale=mobile_app&details=preview",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:32:14Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=week",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:32:14Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&timing=today",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:32:14Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"data" : {
"url" : "https:\/\/<ServerURL>\/api\/search?type=event&city=2&trending=true",
"method" : "GET",
"status_code" : 200
},
"timestamp" : "2017-08-25T06:32:14Z",
"level" : "fatal",
"type" : "http",
"category" : "xhr"
},
{
"message" : "ReferenceError: Can't find variable: error_statement",
"timestamp" : "2017-08-25T06:34:34Z",
"level" : "error",
"category" : "sentry"
}
],
"level" : "fatal",
"platform" : "cocoa",
"sdk" : {
"name" : "sentry-react-native",
"version" : "0.20.0",
"integrations" : [
"sentry-cocoa"
]
},
"contexts" : {
"os" : {
"build" : "16D32",
"rooted" : false,
"kernel_version" : "Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3\/RELEASE_X86_64",
"name" : "iOS",
"version" : "10.3.1"
},
"app" : {
"app_id" : "C3405AE0-B625-3796-81B9-358778E65D9C",
"app_version" : "1.0",
"app_identifier" : "com.<OrgName>.<ProjectName>",
"app_start_time" : "2017-08-25T06:32:02Z",
"device_app_hash" : "fad28b36112d97b4da69cb57799eba2e64639ac9",
"app_build" : "1",
"build_type" : "simulator",
"app_name" : "<ProjectName>"
},
"device" : {
"simulator" : true,
"model_id" : "simulator",
"arch" : "x86",
"free_memory" : 1035567104,
"family" : "iOS",
"model" : "iPhone7,2",
"memory_size" : 8589934592,
"storage_size" : 126804688896,
"boot_time" : "2017-08-24T04:24:41Z",
"timezone" : "GMT+5",
"usable_memory" : 5928062976
}
},
"logger" : "javascript",
"event_id" : "a163eada468c49b083b3bc5d228a4665",
"user" : {
"email" : "(null)",
"username" : "(null)"
}
}
2017-08-25 11:34:34.474 <ProjectName>[67501:783219] Sentry - Verbose:: --------------------------------------------
2017-08-25 11:34:34.478 <ProjectName>[67501:783219] Sentry - Debug:: Writing to file: /Users/alizain/Library/Developer/CoreSimulator/Devices/42F3311A-1DF9-479E-82CF-33D959E51A17/data/Containers/Data/Application/D7357E9A-5BF2-4A01-AF37-305808F71EE2/Library/Caches/io.sentry/events/1503642874.478527-11-C10A223A-6F09-4FB6-80A9-8EC490E24652.json
2017-08-25 11:34:34.481 [error][tid:com.facebook.react.JavaScript] Can't find variable: error_statement
2017-08-25 11:34:34.483 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Can't find variable: error_statement
2017-08-25 11:34:34.505 <ProjectName>[67501:783219] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Can't find variable: error_statement', reason: 'Unhandled JS Exception: Can't find variable: error_statement, stack:
value@631:2978
touchableHandlePress@174:1161
_performSideEffectsForTransition@167:8426
_receiveSignal@167:7213
touchableHandleResponderRelease@167:4698
l@122:59
o@121:389
i@121:584
v@119:151
i@124:80
processEventQueue@119:1300
s@125:88
handleTopLevel@125:143
<unknown>@118:675
perform@135:596
_receiveRootNodeIDEvent@118:647
receiveTouches@118:1021
value@53:2603
<unknown>@53:838
<unknown>@53:106
value@53:810
'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f1feb0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010e0bf141 objc_exception_throw + 48
2 CoreFoundation 0x000000010f267625 +[NSException raise:format:] + 197
3 <ProjectName> 0x000000010d0dfcf4 RCTFatal + 393
4 <ProjectName> 0x000000010d0d8ed8 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 507
5 CoreFoundation 0x000000010f186c6c __invoking___ + 140
6 CoreFoundation 0x000000010f186b40 -[NSInvocation invoke] + 320
7 CoreFoundation 0x000000010f19e956 -[NSInvocation invokeWithTarget:] + 54
8 <ProjectName> 0x000000010d0dcd2f -[RCTModuleMethod invokeWithBridge:module:arguments:] + 551
9 <ProjectName> 0x000000010d104f1d -[RCTBatchedBridge callNativeModule:method:params:] + 229
10 <ProjectName> 0x000000010d2384c0 __36-[RNSentry swizzleCallNativeModule:]_block_invoke_2 + 1027
11 <ProjectName> 0x000000010d1047bb __33-[RCTBatchedBridge handleBuffer:]_block_invoke.359 + 509
12 libdispatch.dylib 0x000000011394a4a6 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x000000011397305c _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000011395194f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x0000000113952669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x0000000113952b32 _dispatch_queue_override_invoke + 654
17 libdispatch.dylib 0x0000000113954ec4 _dispatch_root_queue_drain + 634
18 libdispatch.dylib 0x0000000113954bef _dispatch_worker_thread3 + 123
19 libsystem_pthread.dylib 0x0000000113cfe712 _pthread_wqthread + 1299
20 libsystem_pthread.dylib 0x0000000113cfe1ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Here is my code for index.ios.js
import { Sentry, SentryLog } from 'react-native-sentry';
Sentry.config('https://[email protected]/139360', {
logLevel: SentryLog.Verbose
}).install();
and in some component in RN app:
onPress={() => {
throw new Error('This is test error for Sentry');
}}
This is working in IOS simulator but it's not working in test app that I archived and deployed for testing purposes. However, sending messages to sentry is working on both:
Sentry.captureMessage('This is test message from Sentry IOS SDK!');
Where can I find log in order to check what is wrong if my app is running on an actual device?
Thanks in advance.
Nikola
Hey @nik0lica @alizain-wal
I've just release 0.21.0 which fixed the problem, please upgrade!
@nik0lica @alizain-wal 0.21.1
Tried both versions with no success for the device :(.
I did try Sentry.captureMessage('Test message from Sentry'); which is working fine from the device.
@nicinabox @nik0lica Are you installing it with CocoaPods?
@HazAT I suppose that you are refering to me.
I installed all version with npm and react-native unlink/link react-native-sentry.
I noticed that now debugging symbols are being uploaded automatically in latest version while archiving project in xcode if that matters. Before, in V0.21.0 and lesser that wasn't the case.
@nik0lica Yes sry, I meant you.
I've just released 0.21.2 all the tests are running, I've tested it locally on a simulator and on a device.
Consider deleting your node_modules folder and reinstall react-native-sentry.
Also, make sure you make a clean build in Xcode, it could be that something is cached.
@HazAT Hi, I tried it with a new version, removed node_modules, in xcode->project->clean, installed sentry via npm with a rest of modules, unlink/link sentry (sentry.properties are created earlier) and it worked for the first time I tried, both, simulator and device builds. However, as we have two "branches" on sentry.io, one for dev and other for production crash reporting etc..I wanted to switch from production to a dev branch (by branch I mean my-company/my-awesome-project-dev-branch) also I reinstall everything, unlink/link sentry and now both branches are not working for device builds. Messages from sentry are working in any case.

You can see here, the first in a log is message (Sentry.captureMessage()) and other is intentional error made by me in order to test sentry. It is from the IOS simulator.
@HazAT One more question related to this. Do I need to go through whole deleting node_modules, reinstalling sentry etc. process if I want to change from dev to production or I just need to comment and uncomment related lines like I did here in these files?:


Token stays the same as token is used to authorize SDK with sentry.io no matter what project I am running, right?
Thanks in advance for support! :)
@HazAT For Android builds sentry is working great every time, in emulator and the device.
@HazAT hello, thank you for the effort and work on this library.
I have a similar issue as the guys above:
captureMessage gets registeredreact-native log-android) when I place the logLevel verbose configuration.import { Sentry, SentryLog } from 'react-native-sentry';
Sentry.config('https://aaa:[email protected]/ccc', {
logLevel: SentryLog.Verbose,
}).install();
Best regards!
@samuelchvez Is it only on Android?
Please make sure your MainApplication.java looks something like this:
...
import io.sentry.RNSentryPackage;
...
public class MainApplication extends Application implements ReactApplication {
....
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNSentryPackage(MainApplication.this)
);
}
...
@HazAT yes, it looks exactly like that. I have not tested it on iOS.
Thanks for your help
"react-native": "0.51.0",
"react-native-sentry": "^0.34.1",
Working on troubleshooting this. iOS crashes don't seem to be getting reported. When I test Sentry.nativeCrash() does not report anything but
Sentry.captureMessage("TEST message");
Sentry.nativeCrash();
reports the message and the crash.
@CoreyAR
There is a fix on the way for this.
https://github.com/getsentry/react-native-sentry/pull/371
@HazAT please add full manual instruction for iOS & Android it will be useful ;)
For everyone who has the same issue that on Android crashes/JS errors war not reported:
It works when I disable the native integration for Android
Sentry.config('URL', {
deactivateStacktraceMerging: true,
logLevel: SentryLog.Verbose,
// currently sentry is not reporting errors on android using the native module
disableNativeIntegration: Platform.OS === 'android',
}).install();
Is there reason why android's native integration doesn't work and when this will be fixed?
@HazAT
Have the same issue and don't see report after Sentry.nativeCrash() from iOS. App is not attached to debugger.
react-native-sentry 0.39
My config:
{
deactivateStacktraceMerging: false,
logLevel: __DEV__ ? SentryLog.Debug : SentryLog.None,
// currently sentry is not reporting errors on android using the native module
disableNativeIntegration: platform === 'android',
handlePromiseRejection: true,
}
@antonsivogrivov set disableNativeIntegration:true for every platform fixed my issue. @jjoe64 Can you explain why disableNativeIntegration:true is working? What is the cons of setting disableNativeIntegration:true.
Has this been resolved? I can't send any logs except for Sentry.captureMesage()
Changing the logLevel: Verbose or Debug also doesn't seem to log anything on my console.
I'm using:
"react-native": "0.57.8",
"react-native-sentry": "^0.42.0"
Same here. As workaround I override the global error handler to include the Sentry log.
// Error handler setup
let originalHandler = ErrorUtils.getGlobalHandler();
ErrorUtils.setGlobalHandler((error, isFatal) => {
Sentry.captureException(error);
originalHandler(error, isFatal);
});
Most helpful comment
+1
Nothing is reported on the sentry dashboard with debug/release build.