Skip to content
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

Is there a guide on how to generate/upload sourcemaps when running eas build? #376

Closed
wilmxre opened this issue Oct 24, 2023 · 4 comments
Closed

Comments

@wilmxre
Copy link

wilmxre commented Oct 24, 2023

As i mentioned in the title, i am curious if there is a well-documented and battle-tested guide on this, because i think people can get confused. The expo documentation although is very detailed, i didn't find a good solution for eas build.

Currently what works for me is creating a new build with eas build then running eas update to generate the dist folder for the bundles. But then it gets kinda messy, especially for the developer who is accustomed to the expo ecosystem, you have to rename the bundle files (especially if you are using hermes), then run a long sentry-cli command to upload the sourcemaps to that given release and even then sometimes it will not work.

I don't think this is very intuitive, so i am curious if there is or will be some updates on this in the future, maybe better documentation or a simplified process to generate the sourcemaps and assign it to your build.

I want to mention that i am grateful for the expo team, it made the development in react native tremendously easier, i just wanted to get some information on this.

@kliakhovskii-brex
Copy link

kliakhovskii-brex commented Nov 6, 2023

Would second it, we recently switched from expo publish to eas updates, and while the doc has descriptions on renaming the files and scripts, it took us ~3-4 iterations to implement properly. Comparing it to DX of postPublish hook as it used to be, it feels like a step back.

I assume this is more on eas update side of things at this moment If it'll support similar workflow to postPublish hook, then there shouldn't be any burden on engineers to deal with this.

It's tracked in here I suppose

@paule89123
Copy link

paule89123 commented Dec 3, 2023

Sourcemaps aren't even uploading for me when running expo publish. Anyone else have this issue? The end of my expo publish says:

Running postPublish hook: sentry-expo/upload-sourcemaps
...
Error uploading sourcemaps to Sentry: spawn ...

My app.json is setup correctly:

{
  "expo": {
    // ...other stuff
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "[redacted]",
            "project": "[redacted]"
          }
        }
      ]
    }
  }
}

and I've configured SENTRY_AUTH_TOKEN in Eas Secrets. I can't see what I'm missing.

@krystofwoldrich
Copy link
Contributor

Hello everyone,
@sentry/react-native now supports Expo out of the box!

Guide on how to set up source maps: https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo/

Update to https://github.com/getsentry/sentry-react-native/releases/tag/5.16.0 or newer to get all the new features.

Migration guides available:

@wilmxre
Copy link
Author

wilmxre commented Jan 29, 2024

thanks @krystofwoldrich for the sentry team that made this possible!

@wilmxre wilmxre closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants