Thanks, Charlie. Yeah, I figured there’s something going on but there’s clearly something wrong with my setup. From what I can see, I’ve followed all the steps in the Expo documentation. I was going to open an issue in the GitHub repository with all the following information but I see that you seem to handle things there as well so I’ll continue here.
Right now, new releases are automatically created in Sentry for me and they follow the {version_number} ({build_number})
pattern, e.g. I just created version 0.0.35
with build number 76
and in Sentry I see a release called 0.0.35 (76)
.
Example:
For all builds since 46, releases have had no artifacts. If I look what happened in the code for build 47, I started using import * as Sentry from '@sentry/react-native'
instead of import { Native as Sentry } from 'sentry-expo'
, which I’ve since learned was wrong. I’ve reverted now that but I still no longer get source maps uploaded. Is there a manual step outside of building an archive and uploading to App Store Connect?
I’ve seen people talk about explicitly setting dist
and release
in their Sentry config? Is this required? If so, I can’t find it in the documentation as mandatory.
Just to be clear, so we don’t keep going around in circles, this is my setup and workflow. Please let me know if it looks like I’m missing something.
Configuration
App.tsx
import { Native as Sentry } from 'sentry-expo'
Sentry.init(sentryConfig)
// Sentry.captureException(error)
sentry.ts
import { Platform } from 'react-native'
import { Native as Sentry } from 'sentry-expo'
const SENTRY_DSN_IOS = 'xxx'
const SENTRY_DSN_ANDROID = 'xxx'
export const sentryConfig: Sentry.ReactNativeOptions = {
dsn: Platform.OS === 'ios' ? SENTRY_DSN_IOS : SENTRY_DSN_ANDROID,
enableAutoSessionTracking: true,
debug: __DEV__ ? true : false,
environment: __DEV__ ? 'development' : 'production',
}
Workflow
- Make changes in code, test locally
- Bump version and/or build number
- See a new release in Sentry with that version/build if testing
- Create a new archive in Xcode
- Upload to App Store Connect
- Note that the release in Sentry that matches the version/build has no artifacts and issues reported show the “Source code was not found” message.
Should I be running some manual publish step here as well?
At the top of the Sentry issue:
Tags in the Sentryissue:
I see that dist
and release
have been added automatically.
Thanks for your time, @charliecruzan. I really appreciate it. I know there’s a lot here but I wanted to give as much context as possible to save any unnecessary back and forth. Thanks! Have a nice day.