-
-
Notifications
You must be signed in to change notification settings - Fork 343
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, Xcode] Automatic source map upload is not working in RN 0.75.x #4074
Comments
Hi @LydGol90, have you included https://docs.sentry.io/platforms/react-native/manual-setup/metro/#use-sentry-metro-serializer This will ensure the Metro Bundler is generating the Debug IDs. |
Hi @krystofwoldrich, thank you for your reply. Yes sorry, I should have included that in my original message, I have added that as per the docs. |
Hi, Please upgrade to the latest SDK, this issue was caused by a bug in Sentry CLI which caused background uploads to fail. As a workaround you can also force foreground uploads as described in. |
@krystofwoldrich Thanks for your reply. I have upgraded to 5.32.0, however I am still seeing the same issue. I have Hermes enabled, is there any additional configuration I am missing? If helpful, under the "Source Maps" section under settings for my project I am just never seeing any artifacts uploaded, under the "Debug Files" section I am. Thanks |
Hey, we also have a similar/same issue, using sentry/react-native@5.32.0 and react-native@0.75.2.
I can also see that We updated from react-native@0.73.8 and sentry/react-native@5.22.2 last week, and it was working at that time. |
@skogby Thanks for your help, my issues also started after an RN upgrade - perhaps the sourcemaps are not being generated correctly in RN 0.75. |
@krystofwoldrich I think this is still an issue: |
@skogby we are seeing the exact same issue in our build with RN 0.75.3
We are running version Tried the workaround: But with the same results, no source maps... |
@skogby did you ever resolve the issue? This is still a problem for us. |
@krystofwoldrich Would it be possible to reopen this issue to investigate the above? Seems that the latest SDK is not working with RN 0.75.X specifically. Many thanks |
@christianbach I used yarn patch to patch react-native dependency and changed the packages/react-native/scripts/react-native-xcode.sh script so it is exactly as it is on master branch right now, and then it started working. |
I think it should be reopened |
I opened a new issue, as the Sentry crew probably don't look into closed issues. #4120 |
@skogby Great and thanks for the clarification! |
Hello, everyone, thank you for all the messages and excuse the long waiting time. I returned from my time off and looking into this right now. |
The automatic upload of source maps during Xcode builds to Sentry uses the The The removal of But Sentry CLI also requires To fix the automatic upload in 0.75 please add the following to your set -e
+export BUNDLE_COMMAND="bundle"
WITH_ENVIRONMENT="$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
REACT_NATIVE_XCODE="$REACT_NATIVE_PATH/scripts/react-native-xcode.sh"
/bin/sh -c "$WITH_ENVIRONMENT \"/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode.sh $REACT_NATIVE_XCODE\"" |
The In the upcoming RN 0.75.4 the iOS auto upload will work out of the box. |
@krystofwoldrich great! 0.75.4 is now released https://github.com/facebook/react-native/releases/tag/v0.75.4 |
Tested, It's working |
Great! I will try it out today as well with latest RN release :) |
Thank you everyone, with the https://github.com/facebook/react-native/releases/tag/v0.75.4 out we close this issue. |
Hi @krystofwoldrich, yes all good here now on latest RN out of the box. Thanks so much! |
Important
To fix the automatic upload in 0.75 please add the following to your
Bundle React Native code and image
Build Phase:set -e +export BUNDLE_COMMAND="bundle" WITH_ENVIRONMENT="$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh" REACT_NATIVE_XCODE="$REACT_NATIVE_PATH/scripts/react-native-xcode.sh" /bin/sh -c "$WITH_ENVIRONMENT \"/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode.sh >$REACT_NATIVE_XCODE\""
For more detail see #4074 (comment)
Description
Hi there,
I am having trouble with ios source maps.
I followed the manual set up here:
https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/
I added SOURCEMAP_FILE as RN docs imply that is required to enable sourcemaps at all for ios
https://reactnative.dev/docs/debugging-release-builds#enabling-source-maps
This is my "Bundle React Native code and images" script:
I have a sentry.properties file at the correct location.
I also added the script for "Upload Debug Symbols to Sentry"
This is what I see in Sentry for a JS crash:


Are there additional steps that I am missing? I see there is more documentation around Hermes and around using the fastlane plugin but I'm not clear if those are additional steps or alternative steps.
react-native info:
FYI I followed the android instructions from the same docs and that is all working fine.
Many thanks for any help!
The text was updated successfully, but these errors were encountered: