-
-
Notifications
You must be signed in to change notification settings - Fork 353
Description
OS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
SDK:
-
@sentry/react-native
(>= 1.0.0) -
react-native-sentry
(<= 0.43.2)
SDK version: 1.4.5
react-native
version: 0.59.10
Are you using Expo?
- Yes
- No
Are you using sentry.io or on-premise?
- sentry.io (SaaS)
- on-premise
If you are using sentry.io, please post a link to your issue so we can take a look:
none
Configuration:
(@sentry/react-native
)
Sentry.init({
dsn: 'https://...@sentry.io/...'
// no other options
});
I have following issue:
After running react-native link @sentry/react-native
and cd ios && pod install
, Podfile.lock has this content:
PODS:
- React (0.11.0):
- React/Core (= 0.11.0)
- React/Core (0.11.0)
- RNSentry (1.4.5):
- React
- Sentry (~> 5.1.4)
- Sentry (5.1.4):
- Sentry/Core (= 5.1.4)
- Sentry/Core (5.1.4)
Which is problematic since React 0.11.0 is too old to be supported. This creates a build error which is explained in #895 .
Steps to reproduce:
- react-native init AwesomeProject --version 0.59.10
- npm install @sentry/react-native --save
- cd ios && pod init
- cd .. && react-native link @sentry/react-native
- cd ios && pod install
- react-native run-ios
Actual result:
info /Users/.../.../.../rn_testing/AwesomeProject/node_modules/@sentry/react-native/ios/RNSentry.m:64:38: error: too many arguments to block call, expected 1, have 3
info reject(@"SentryReactNative", error.localizedDescription, error);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
info /Users/.../.../.../rn_testing/AwesomeProject/node_modules/@sentry/react-native/ios/RNSentry.m:143:38: error: too many arguments to block call, expected 1, have 3
reject(@"SentryReactNative", @"Cannot serialize event", nil);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
info 2 errors generated.
And at the same time, metro gives this error:
UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision: Duplicate module name: react-native Paths: /Users/.../.../.../.../ios/Pods/React/package.json collides with /Users/.../.../.../.../node_modules/react-native/package.json
Expected result:
The app should work on Simulator.
What I have tried:
I wrote comments in #895 but since its a closed issue I am going to copy-paste here as well.
I changed RNSentry.podspec in @sentry/react-native to look for specifically my installed version of React. i.e:
s.dependency 'React'
to s.dependency 'React', '0.59.10'
. When I do this the Podfile.lock sees React and React related dependencies as 0.59.10. This approach successfully builds but fails when I try to run because of duplicate resources. i.e:
Class RCTWebSocketModule is implemented in both /Users/.../Library/Developer/CoreSimulator/Devices/90D0534D-6CED-42AC-9B6E-218E2B603ABC/data/Containers/Bundle/Application/290ADA55-F4BB-4D47-86DD-D4352C218625/APPNAME/Frameworks/React.framework/React (0x102c44a30) and /Users/.../Library/Developer/CoreSimulator/Devices/90D0534D-6CED-42AC-9B6E-218E2B603ABC/data/Containers/Bundle/Application/290ADA55-F4BB-4D47-86DD-D4352C218625/APPNAME/APP (0x1025daab8). One of the two will be used. Which one is undefined.
I also tried some of the old versions of @sentry/react-native.