sentry-react-native: TypeError: options.shouldAddToIgnoreList is not a function
OS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
SDK:
-
@sentry/react-native
(>= 1.0.0) -
react-native-sentry
(<= 0.43.2)
SDK version: 5.19.0
react-native
version: 0.71.13
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:
[Link to issue]
Configuration:
(@sentry/react-native
)
Sentry.init({
dsn: 'https://...@sentry.io/...'
// other options
});
I have the following issue:
[Description]
Steps to reproduce:
- Start to archive process in xcode
- Throwed exception when bundling metro step
Actual result:
error options.shouldAddToIgnoreList is not a function. TypeError: options.shouldAddToIgnoreList is not a function at getSourceMapInfo (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/metro/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js:18:24) at processNextModule (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:30:18) at workLoop (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:40:22) at getSourceMapInfosImpl (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:60:3) at sourceMapGenerator (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:64:3) at sourceMapString (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/metro/src/DeltaBundler/Serializers/sourceMapString.js:16:10) at /Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/@sentry/react-native/dist/js/tools/vendor/metro/utils.js:42:21 at Object.<anonymous> (/Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/@sentry/react-native/dist/js/tools/sentryMetroSerializer.js:53:38) at Generator.next (<anonymous>) at /Users/muratoner/Desktop/Projects.SabanciDx/hrweb/node_modules/tslib/tslib.js:169:75
Expected result:
Take an archive in xcode
About this issue
- Original URL
- State: open
- Created 4 months ago
- Comments: 18 (8 by maintainers)
@NabeelZanabeet Thank you for sharing the steps.
I had a similar issue in a monorepo setup
Fixed by
"nohoist": [ "**/@react-native/**", ]
Hi @sisoalbert, you can use Sentry without modifying the
metro.config.js
, but you will have to ensure release and dist are correctly set for source maps mapping. Debug IDs, which are used by default, won’t be available, because they are generated in the Metro Sentry serializer.https://docs.sentry.io/platforms/react-native/sourcemaps/troubleshooting/optional-release-and-distribution/