Closed yonitou closed 1 year ago
What version of expo-updates
do you have in your project? If it doesn't have the isEmbeddedLaunch
property yet, then that might explain why the logic is failing.
This doesn't match to Updates.updateId
at
Updates.isEmbeddedLaunch
is false
after OTA.
So, how about change https://github.com/expo/sentry-expo/blob/699b6f7150dd0d5a9a3f7d66e3f9cda134af6dc2/src/hooks/upload-sourcemaps.ts#L96 to
distribution: manifest.releaseId || distribution || env.SENTRY_DIST || manifest.version,
On my environment, distribution
was undefined
.
I'm using expo publish
command.
I had similar issue on "react-native": "0.71.4", "sentry-expo": "6.1.1", "@sentry/react-native": "4.13.0",
In bare workflow, we use expo publish
for OTA updates and @ken0x0a solution worked
Thanks a lot!
Edit: Unfortunately it didnt work for Android, iOS works good
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This doesn't seem to be solved, let's not close the issue.
The value set by the script for dist
is based on the current logic that applies to EAS Update. This might be incompatible with earlier defaults to expo publish
, however Classic Updates have sunsetted, and we're not introducing changes to ensure continued compatibility with it.
You can specify dist
manually in your init call, as you've shown above, if you're still using Classic Updates. As this workaround is available, I'm going to consider this issue resolved.
Summary
Hi,
I don't know if this is a bug but I prefer to create an issue :
For almost 2 weeks, after switching my expo app to Hermes I noticed that my source maps didn't work anymore on Sentry.
The error was the following (the source maps are correctly uploaded) :
I started to search why does my distribution flag has changed since I didn't touch it for almost one year :)
Here's my Sentry.init function :
Here's my config from app.config.ts for the auto publish plugin :
I digged into the sentry-expo repository and found this
getDist()
function ?Looks like that expo is automatically taking the Updates.updateId instead of the expo app version as described on the expo documentation : "distribution [...]Expo defaults to using your version from app.json"
After changing my Sentry.init to the code below, everything worked well !
So maybe I missed something from the documentation or maybe the documentation should be updated to clarify that from now on, we need to manually set the
dist
flag from Sentry.init call to the the expo app version to match the one from app.json plugin.I hope everything was clear
Thanks & have a good day
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android, iOS
SDK Version (managed workflow only)
48
Environment
Reproducible demo or steps to reproduce from a blank project