Code Monkey home page Code Monkey logo

sentry-react-native's Introduction

Sentry

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions

Sentry SDK for React Native

Build & Test npm version npm dm npm dt Discord Chat Runs with Expo

Requirements

  • react-native >= 0.65.0

Features

  • Automatic JS Error Tracking (using @sentry/browser)
  • Automatic Native Crash Error Tracking (using sentry-cocoa & sentry-android under the hood)
  • Offline storage of events
  • On Device symbolication for JS (in Debug)
  • Autolinking
  • Events with enriched device data
  • RAM bundle support
  • Hermes support
  • Expo support
  • RN New Architecture support

Installation and Usage

To install the package and setup your project:

npx @sentry/wizard -s -i reactNative

How to use it:

import * as Sentry from "@sentry/react-native";

Sentry.init({
  dsn: "__DSN__",

  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for performance monitoring.
  // We recommend adjusting this value in production
  tracesSampleRate: 1.0,
});

Sentry.setTag("myTag", "tag-value");
Sentry.setExtra("myExtra", "extra-value");
Sentry.addBreadcrumb({ message: "test" });

Sentry.captureMessage("Hello Sentry!");

Upgrade

If you are coming from react-native-sentry which was our SDK < 1.0 you should follow the upgrade guide and then follow the install steps.

Blog posts

Introducing Mobile Screenshots and Suspect Commits.

Tips for Optimizing React Native Application Performance - Part 2: Using Sentry SDK for Performance Monitoring.

Tips for Optimizing React Native Application Performance: Part 1.

Tracking Stability in a Bluetooth Low Energy-Based React-Native App.

Mobile Vitals - Four Metrics Every Mobile Developer Should Care About.

Performance Monitoring Support for React Native.

Resources

  • Documentation
  • Discussions
  • Discord Chat
  • Stack Overflow
  • Code of Conduct
  • Twitter Follow

sentry-react-native's People

Contributors

abhiprasad avatar alloy avatar benhowes avatar brentvatne avatar bretthoerner avatar bruno-garcia avatar brustolin avatar cruzach avatar dependabot-preview[bot] avatar dependabot[bot] avatar getsentry-bot avatar github-actions[bot] avatar hazat avatar jan-auer avatar jennmueng avatar kahest avatar krystofwoldrich avatar liamjones avatar lobsterkatie avatar lucas-zimerman avatar marandaneto avatar mateioprea avatar mitsuhiko avatar ovr avatar philipphofmann avatar quinlanj avatar rafauke avatar snyk-bot avatar tonyo avatar vaind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentry-react-native's Issues

Redux / Extra Support

First off, great work to put this together. Thanks.

I have two questions, is the "extra" key supported as an option in "captureMessage"? I have tried several times to send additional data, with no luck.

Also is there anything in the roadmap about adding support for Redux? There are several integrations with vanilla raven-js that automatically report the current redux state upon an error (https://github.com/ngokevin/redux-raven-middleware, https://www.npmjs.com/package/raven-for-redux).

Thanks!

throwOnImmutableMutation being hit when trying to send a message

Happening on iOS. Running react-native 0.42.3 and react-native-sentry 0.8.3

My index.os.js looks like this:

import { AppRegistry } from 'react-native';
import App from './App';

import {
  Sentry,
  SentrySeverity,
  SentryLog
} from 'react-native-sentry';

Sentry.config("[MY DSN HERE]", {
  // deactivateStacktraceMerging: true,
  logLevel: SentryLog.Debug
}).install();

AppRegistry.registerComponent('governedapp', () => App);

In my code, I'm attempting to send a message with:

      Sentry.captureMessage("My message", {
        level: SentrySeverity.Error
      });

but I'm getting this crash:
glass_and_iphone_7_ _ios_10_3__14e269_
(I blurred out the key value since I think it's specific to the firebase integration I'm running)

It looks like this is happening when trying to prepare a list of breadcrumbs to send with my message. Seems like a non-release build specific error as well.

`image not found` even with `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` set to `YES`

I'm trying to get react-native-sentry installed and I can't get past the "image not found" issue even though I've enabled ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in the build settings and did a clean build. Any ideas?

I'm not sure what extra info would be useful for you to see but happy to upload anything that might help. I haven't added the uploading of debug symbols step yet since I'm just trying to get it working on the simulator.

Exception:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: [...]/Build/Products/Debug-iphonesimulator/Sentry.framework/Sentry
  Reason: image not found

Sentry.clearContext() blocks

Logout saga (I am using redux-saga):

export function * logout() {
  API.setHeader('X-Token', '');
  yield call(AsyncStorage.removeItem, 'currentUser');
  Sentry.clearContext();
  alert('test clear');
}

The alert('test clear') never gets executed, remove the Sentry.clearContext(); then it pops up an alert.

OS: iOS & Android
RN version: 0.44
react-native-sentry version: 0.8.1

No errors reported

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.

React Native CLI build error: KSCrash

Ran into an error building react-native-sentry using the react-native cli.

On running react-native run-ios the build error is

KSCrash which seems to be a dependency of sentry cannot be dynamic loaded as a library.

Can anyone point me in the right direction.

image

Error referenced when building w/ xcode
image

bundle script fails trying to copy Sentry.framework

This sentry client seems to work well enough in my development/debug environment, but every time I create an iOS release build for the App Store, the "Bundle React Native code and images" script fails with this error:

    /bin/sh -c \"/Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp\ staging/IntermediateBuildFilesPath/KarmaWorkerApp.build/Release-iphoneos/KarmaWorkerApp.build/Script-00DD1BFF1BD5951E006B06BC.sh\"
+ mkdir -p /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp staging/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks
+ cp -r /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp staging/BuildProductsPath/Release-iphoneos/Sentry.framework /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp staging/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks
cp: staging/BuildProductsPath/Release-iphoneos/Sentry.framework: No such file or directory
error: Could not parse Info.plist file
  caused by: missing field `CFBundleName`
Uploading symbols

0.8.0 throws exception if setUserContext called without email, userID, or username

This may be working as intended, but its definitely new as of 0.8.0. Whenever I call setUserContext, I now have to pass an object that contains members for email, userId, and username, otherwise I get a native exception like this:

05-10 14:44:16.952 9632-21806/com.karmacasting E/unknown:React: Exception in native call
                                                                com.facebook.react.bridge.NoSuchKeyException: couldn't find key email in dynamic object
                                                                    at com.facebook.react.bridge.ReadableNativeMap.getString(Native Method)
                                                                    at io.sentry.RNSentryModule.setUser(RNSentryModule.java:93)
                                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                                    at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:368)
                                                                    at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:138)
                                                                    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
                                                                    at android.os.Handler.handleCallback(Handler.java:739)
                                                                    at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
                                                                    at android.os.Looper.loop(Looper.java:148)
                                                                    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:208)
                                                                    at java.lang.Thread.run(Thread.java:818)

I used to be able to call Sentry.setUserContext({}) to clear the context, but now I have to call:

      Sentry.setUserContext({
        email: null,
        userID: null,
        username: null
      })

Not a big deal, but just saying.

0.1 Release

  • Integrate native client
  • Tracking js errors
  • Tracking native crashes
  • Tracking js stacktrace also on native crashes
  • Extras
  • Tags
  • User
  • Easy setup process getsentry/sentry-cli#22
  • Upload of source maps and symbolication (Debug)
  • Upload of source maps and symbolication (Release)
  • Breadcrumbs

Invalid Code Signing Entitlements on upload to App Store

I'm getting the following error when submitting our app to App Store.

[13:40:26]: [Transporter Error Output]: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/KSCrash.framework/KSCrash' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
[13:40:26]: [Transporter Error Output]: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/Sentry.framework/Sentry' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
[13:40:26]: Transporter transfer failed.
[13:40:26]:
[13:40:26]: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/KSCrash.framework/KSCrash' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/Sentry.framework/Sentry' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
[13:40:26]: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/KSCrash.framework/KSCrash' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/Sentry.framework/Sentry' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
Return status of iTunes Transporter was 1: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/KSCrash.framework/KSCrash' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifie\nERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'DQ40000PR5.com.parktechnology.tapp' for key 'application-identifier' in 'Payload/tapp-app.app/Frameworks/Sentry.framework/Sentry' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."

I'm wondering if this is due to how the libraries get linked in with bundle-frameworks. I'm using manual code signing rather than Xcode automatic.

Strangely, DQ40000PR5 is our team ID and com.parktechnology.tapp is our App ID. So the error message doesn't make much sense!

EXC_BAD_ACCESS in RNSentry.m (inside KSCrash)

Hello! I'm trying to integrate this package into my react native app. I'm getting the following error reported to my Sentry instead of a Javascript exception.

EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x16debf0a8.
Originated at or in a subcall of -[RNSentry handleSoftJSExceptionWithMessage:stack:exceptionId:]
  File "RNSentry.m", line 239, in -[RNSentry handleSoftJSExceptionWithMessage:stack:exceptionId:]
  File "RCTExceptionsManager.m", line 42, in -[RCTExceptionsManager reportSoftException:stack:exceptionId:]
  File "RCTModuleMethod.m", line 507, in -[RCTModuleMethod invokeWithBridge:module:arguments:]
  File "RCTBatchedBridge.m", line 1055, in -[RCTBatchedBridge callNativeModule:method:params:]
  File "RNSentry.m", line 100, in __47-[RNSentry activateStacktraceMerging:rejecter:]_block_invoke_2
...
(100 additional frame(s) were not displayed)

When I recreate this crash with the Xcode debugger attached, it looks like this:

image

Full stack trace here

Looks like this is a crash deep in KSCrash. I'm using the version of KSCrash that's bundled with this project.

Breadcrumbs

Missing this great feature from the RN implementation. JS client has it and it's really good for tracking down bugs. Thx!

CocoaPods support

Hey guys,

Awesome release! Just a question, any plans on supporting CocoaPods?

(ios) Sentry.setUserContext: userId needs to be string

Hey guys,

calling
Sentry.setUserContext({userId: 123}),
will raise below exception while this doesnt:
Sentry.setUserContext({userId: "123"}),

Moreover, setting (other) object props to a null value will raise similarly, eg:
Sentry.setUserContext({userId: "123", email: null}),

Maybe this is intended behavior & I just didnt see the related docs for it?

Using
react-native: 0.42.3
react-native-sentry: 0.7.0

2017-05-09 12:16:47.813[51915:999569] *** Terminating app due to uncaught exception 'RCTFatalException: Exception '-[__NSCFNumber length]: unrecognized selector sent to instance 0xb000000000000385' was thrown while invoking setUser on target RNSentry with params (
        {
        userID = 56;
    }
)', reason: 'Exception '-[__NSCFNumber length]: unrecognized selector sent to instance 0...'

Edit: typo

Gradle 25.0 Support

Newer gradle versions no longer support our build. Need to figure out why this is but effectively we are no longer finding an asset directory on the process task.

Replaces getsentry/sentry-cli#56

Breadcrumb data not captured on iOS

We're using 0.6.0 on both Android and iOS. We often pass additional information to captureBreadcrumb using the "data" option, but that information only appears on Android, never on iOS.

deepFreezeAndThrowOnMutationInDev when used with react native

I'm throwing a custom error in my render method. And I got this error: Uncaught Error: You attempted to set the key url with the value "http://localhost:9090/graphql" on an object that is meant to be immutable and has been frozen.

Full stack trace here:

Uncaught Error: You attempted to set the key url with the value "http://localhost:9090/graphql" on an object that is meant to be immutable and has been frozen.
at throwOnImmutableMutation (deepFreezeAndThrowOnMutationInDev.js:64)
at Raven._trimBreadcrumbs (raven.js:1395)
at Raven._trimPacket (raven.js:1369)
at Raven._sendProcessedPayload (raven.js:1592)
at Raven._send (raven.js:1569)
at Raven._processException (raven.js:1343)
at Raven._handleStackInfo (raven.js:1249)
at Raven.captureException (raven.js:381)
at raven-plugin.js:128
at Object.reportFatalError (error-guard.js:44)
at MessageQueue.__guard (MessageQueue.js:220)
at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:100)
at addEventListener (RNDebuggerWorker.js:1)

at raven.js:1391, I log something like
if (!crumb.hasOwnProperty('data') || !isObject(crumb.data)) continue; data = crumb.data; console.log(data);
the printed data is { method: "POST", url: "http://localhost:9090", status_code: null }

Sentry.framework/Sentry Reason: image not found

I have already set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES as the docs say (on both Target and Project), but I still have the error:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: .../Sentry.framework/Sentry
  Reason: image not found
(lldb) 

I have also cleaned the project, relinked the lib using react-native link and added use_frameworks! to Podfile.

captureMessage works but real crashes don't get sent

I've set this up as described (with bitcode turned on).

I can successfully send a message to sentry using captureMessage, but real JS crashes don't get sent neither does artificial native crashes Sentry.nativeCrash(). This is all using debug builds on IOS running in the simulator.

Any idea what I should look at? I've followed the guide properly afaik and turning on debug as below doesn't yield anything useful.

Sentry.config(SENTRY_DSN,{
logLevel: SentryLog.Debug
}).install();

Thanks

error parsing Info.plist

When I create an iOS release build for the App Store, I get the following error. This does not occur when creating a debug build. Any idea why?

    export YACC=yacc
    export arch=arm64
    export variant=normal
    /bin/sh -c /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/IntermediateBuildFilesPath/KarmaWorkerApp.build/Release-iphoneos/KarmaWorkerApp.build/Script-00DD1BFF1BD5951E006B06BC.sh

+ mkdir -p /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks
+ cp -r /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/Sentry.framework /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks
+ cp -r /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/KSCrash.framework /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks
+ /usr/bin/xcrun codesign --force --sign 4F3B0DAD18EC58E0DD2EF8445440F81604102D62 --preserve-metadata=identifier,entitlement /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks/Sentry.framework
+ /usr/bin/xcrun codesign --force --sign 4F3B0DAD18EC58E0DD2EF8445440F81604102D62 --preserve-metadata=identifier,entitlement /Users/jpaas/Library/Developer/Xcode/DerivedData/KarmaWorkerApp-fzyhjpzymgxcamfonbwkmeeaygdp/Build/Intermediates/ArchiveIntermediates/KarmaWorkerApp-staging-release/BuildProductsPath/Release-iphoneos/KarmaWorkerApp.app/Frameworks/KSCrash.framework
error: Could not parse Info.plist file
  caused by: missing field `CFBundleName`
Uploading symbols
Continue upload in background.
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure

Logs In Release Mode

Hi guys!

I was just wondering if you were printing out some logs in Release mode without knowing. We have just had someone who came up with this stuff (below) in our App, which is live on the App Store.

{"timestamp":,"type":"http","category":"fetch","data":{"method":"GET","url":"","status_code":200}}
{"timestamp":,"type":"http","category":"xhr","data":{"method":"GET","url":"","status_code":200}}
{"timestamp":,"type":"http","category":"fetch","data":{"method":"POST","url":"","status_code":422}}
{"timestamp":,"type":"http","category":"xhr","data":{"method":"POST","url":"","status_code":422}}]},"event_id":""}

From this conversation (getsentry/sentry#2632), this seems to be a stacktrace from raven-js; but I have no idea where it comes from and how to read it.

react-native link asks for DSN, but doesn't seem to do anything with it

Every time I run react-native link react-native-sentry, it asks for my DSN and I have a number of questions/concerns with this:

  1. I believe we are supposed to have different sentry projects for iOS vs Android. So which one is it asking for?
  2. Some hints would be good, like whether it wants the public or private one and where to find it.
  3. In the end, as far as I can tell, I can enter anything I like and it never gets used. Thankfully.

So is it a bug that it asks at all?

Immutable object mutation

"react-native-sentry": "^0.9.0"

Hi
I am receiving errors in my app that I believe Sentry wants to catch - which is good. However, this seems te generate an error itself. Any thoughts if this is in the Sentry plugin or somewhere else?

image

Does not support all Raven methods.

We were trying to migrate to the native plugin here at @adahealth and it was looking quite good.
We are however missing the full feature set that raven-js provided, e.g. Raven.lastException() and most importantly Raven.lastEventId().

dyld error because bundle frameworks silently fails

So this one was an interesting one!

Spent days working out why it wasn't bundling the frameworks into the app, and have just found out why. If there is a space in the app name, it resolves wrongly when codesigning the frameworks.

If bundle is done with this command:

../node_modules/react-native-sentry/bin/bundle-frameworks
../node_modules/sentry-cli-binary/bin/sentry-cli react-native-xcode ../node_modules/react-native/packager/react-native-xcode.sh
../node_modules/sentry-cli-binary/bin/sentry-cli upload-dsym

And my app name is Test Project.app

Then the codesign fails, because it tries to sign .../DerivedData/.../Test/ rather than ../DerivedData/.../Test\ Project/

I get the following output, but doesn't fail the build:

/Users/blam/Library/Developer/Xcode/DerivedData/TestProject/Build/Products/Release-iphoneos/Test: bundle format unrecognized, invalid, or unsuitable

Changing the name to TestProject works fine!

Just putting this here as reference for others, might do some digging over the weekend to find a fix!

/blam

debug symbols for libswiftcore missing

Using 0.8.1 and sentry-cli 1.9.0, if I create an iOS build and trigger a native crash using Sentry.nativeCrash, the event is captured and I see a fairly reasonable stack trace. However the event in sentry.io shows this error:

An optional debug symbol file was missing. Collapse
{
  "image_arch": "arm64",
  "image_uuid": "900e59d2-1c9f-3a43-9d3a-e552a289103f",
  "message": "None",
  "image_path": "/private/var/containers/Bundle/Application/A015C776-5F98-49DC-812C-5591B95058C8/KarmaWorkerApp.app/Frameworks/libswiftCore.dylib"
}

Should the iOS build be uploading another dsym?

Adding this causes code signing errors

After adding this I can no longer build my project. Xcode throws an error that looks like this:

Xcode build error

Removing react-native-sentry from my project fixes builds.

Been tearing my hair out for 3 hours now on this as I didn't cleanly add Sentry the first time. Tried clicking around to figure out what would be causing it. Nothing I tried (setting code signing identity or code signing RNSentry.h on copy) has fixed it.

Remove global dependency

The docs require sentry-cli be installed globally, but it would seem to be much preferable to make the cli a local dep and change the build script to:

../node_modules/.bin/sentry-cli react-native-xcode ../node_modules/react-native/packager/react-native-xcode.sh
../node_modules/.bin/sentry-cli upload-dsym

Any issues with this approach?

Can't install on Windows 10

I can't install the last version of Sentry (0.8) on Windows. I got the following error. It doesn't want to execute the following commands :

[email protected] preinstall D:\...\node_modules\.staging\sentry-cli-binary-49cd104f ./bin/install-sentry-cli

Can't upload extra data 0.9.1 on android

I've tried Sentry.setDataCallback and setting the data in the data.extra and data.user.extra. This solution worked with the older version and works with this version on iOS. Neither of the following work.

Sentry.setDataCallback((data) => { const newData = { ...data, extra: {field:true} } return newData })

Sentry.setDataCallback((data) => { const newData = { ...data, user: {...user, field: true} } return newData })

Execution failed for task ':app:bundleReleaseJsAndAssetsSentryUpload'.

When building an Android release with react-native-sentry version 0.8.4, I'm getting the following error when the build is trying to upload the sourcemap assets to Sentry:

error: An organization slug is required (provide with --org)

How can I provide the script with the necessary org information?

How does sentry native compare to crashlytics?

We are currently using raven-js for capturing js strack traces and crashlytics for native. This is sort of working ok for us. Before making the switch, I was wondering how sentry native compares with something like crashlytics.

#import <React/RNSentry.h> file not found

Hello,

I am trying to add the native crash handler to the project. Are you guys sure this is the right import? I have tried to add the path to the Library in Header Search Paths, but I can't get it working.

Execution failed for task ':app:bundleReleaseJsAndAssetsSentryUpload'.

react-native 0.43.4
react-native-sentry 0.8.5
Android assembleRelease

I get this error:
Processing react-native sourcemaps for Sentry upload.

Analyzing 2 sources
Rewriting sources
Adding source map references
error: http error: generic error (403)
:app:bundleReleaseJsAndAssets FAILED
:app:bundleReleaseJsAndAssets (Thread[main,5,main]) completed. Took 48.784 secs.

Works fine with debug version, fails when building for release.

Can't upgrade react-native-sentry to 0.9.0 due to error with sentry-cli-binary

tags and capturing from objc, swift, and js

hi, right now we have an app with objc, swift and js with react native. currently we use sentry-swift, and we have a small wrapper that we can call from all three.
with react-native-sentry, can we still do that? do we need to make the wrapper call to the js part? or can we use Sentry.capture.. from js and [Sentry capture..], etc?

(we get some weird errors on the website when crashes happen and the stack is incomplete. so maybe this library will help with that.)

allow calls to sentry without install

The plain javascript client allowed sentry calls without installing. this was extremely helpful when separating production from development environments, where reporting doesn't make sense. Is it possible to have this same behavior on the react-native client?

Open Repo

We should open this up so people can start playing with it.

iOS: No visible @interface for 'SentryClient'

Hi guys,
After adding the plugin to my app, I receive this error at build:

node_modules/react-native-sentry/ios/RNSentry.m:239:28: No visible @interface for 'SentryClient' declares the selector 'reportReactNativeCrashWithError:stacktrace:terminateProgram:'
node_modules/react-native-sentry/ios/RNSentry.m:249:32: No visible @interface for 'SentryClient' declares the selector 'reportReactNativeCrashWithError:stacktrace:terminateProgram:'

I'm building with target 9.3 and had issues with the Signing for Framework (which is now solved).

Do you have a solution ?

Thanks !

Stacktrace merging doesn't work with cxx bridge

If stacktrace merging is enabled with RN new cxx bridge it causes the app to crash because it tries to swizzle the RCTBatchedBridge class that doesn't exists anymore. RN 0.45 will ship with the cxx bridge as the default and will hit RC soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.