-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS stack trace not pointing to correct source file as Android #3821
Comments
It's mentioned here that documentation is based on RN 0.71, we're on 0.69.9. I found below error in logs, which doesn't seem to be expected. It might be due to some changes in internal script maybe, sharing for visibility.
|
Hi @ayush-leap, Please, remove If this was not helpful feel free to comment here and we can reopen the issue. |
hi @krystofwoldrich, although, it still didn't capture the correct stack trace for some reason. I did cleaned build folder & xcode derived data before making a new release build. also updated the release & dist. any other fix you could think of? i'm simply triggering error like below: try {
throw new Error("Buy button error");
} catch (err) {
captureException(err);
} |
I also had following questions:
|
should i try this - #3751 (comment) ? update: i tried removing Updated Bundle React Native code and images phase
export NODE_OPTIONS=--max-old-space-size=8192
export SENTRY_PROPERTIES=sentry-leap-release.properties
export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"
set -e
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
SENTRY_XCODE="../node_modules/@sentry/react-native/scripts/sentry-xcode.sh"
BUNDLE_REACT_NATIVE="/bin/sh $SENTRY_XCODE $REACT_NATIVE_XCODE"
# RN 0.69+
/bin/sh -c "$WITH_ENVIRONMENT \"$BUNDLE_REACT_NATIVE\""
# send runtime JavaScript dependencies in events for React Native apps. you can also set SENTRY_COLLECT_MODULES to be true for the same.
/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh
|
hey @krystofwoldrich, sorry to bump this again but we're still blocked here. possible to suggest a fix or help in finding the root cause? |
fyi, update: learned about what |
Update: we updated our scripts referencing it from #3583 (comment) and it's now working as expected for us. Bundle React Native code and images
export NODE_OPTIONS="--max-old-space-size=8192"
export SENTRY_PROPERTIES=sentry-leap-release.properties
export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map"
set -e
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
/bin/sh -c "$WITH_ENVIRONMENT \"../node_modules/@sentry/cli/bin/sentry-cli react-native xcode $REACT_NATIVE_XCODE\""
# send runtime JavaScript dependencies in events for React Native apps
/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh
Upload Debug Symbols to Sentry
export NODE_OPTIONS=--max-old-space-size=8192
export SENTRY_PROPERTIES=sentry-leap-release.properties
[[ $SENTRY_INCLUDE_NATIVE_SOURCES == "true" ]] && INCLUDE_SOURCES_FLAG="--include-sources" || INCLUDE_SOURCES_FLAG=""
SENTRY_CLI="../node_modules/@sentry/cli/bin/sentry-cli"
$SENTRY_CLI debug-files upload --force-foreground "$INCLUDE_SOURCES_FLAG" "$DWARF_DSYM_FOLDER_PATH" |
closing as we were able to get correct stack traces now. we will try to upgrade to sentry scripts mentioned in manual setup once we upgrade RN since these scripts are based on >v0.71. |
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 5.22.2
react-native
version: 0.69.9Are you using Expo?
Are you using sentry.io or 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
)I have the following issue:
We're trying to upgrade to sentry 4.x to 5.x. I've followed migration guide & manual setup for the same. We're facing an issue with stack traces on iOS. For Android, we're getting exact line where error occurred but on iOS, it shows a weird global file.
Android Stack Trace
iOS Stack Trace
xcode.env
Bundle React Native code and images
Upload Debug Symbols to Sentry
`metro.config.js`
Source Map Artifacts for iOS
Source Map Artifacts for Android
Steps to reproduce:
Actual result:
[Actual result]
Expected result:
The iOS config seems correct as per documentation. Ideally, error on iOS should also point to the correct source on Sentry similar to Android.
The text was updated successfully, but these errors were encountered: