-
Notifications
You must be signed in to change notification settings - Fork 82
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
postPublish not running in sdk 47 causing the source maps to not upload #306
Comments
Think this is related. I'm on sdk 46 (using It seems like its the android postPublish hook that is causing it. So it also might be related to #292 |
For OTA updates you need to upload the bundle and the source maps manually. https://docs.expo.dev/guides/using-sentry/#uploading-sourcemaps-for-updates Maybe this repo (managed workflow) can also help with finding the bug. |
are we expected to do stuff like this to hack it to work? import inquirer from 'inquirer';
import { createRequire } from 'module';
import { execa } from 'execa';
import fs from 'fs';
const require = createRequire(import.meta.url); // song and dance
const {BASE_DOMAIN, RELEASE_CHANNEL} = require('./constants/config.json');
inquirer.prompt([{
name: 'confirm',
message: 'Are you sure you want to deploy to this config? \n' +
`BASE_DOMAIN: ${BASE_DOMAIN}\n` +
`RELEASE_CHANNEL: ${RELEASE_CHANNEL}`,
type: 'confirm',
}]).then(async answers => {
if (!answers.confirm) return console.log('Cancelled! Bye!');
await execa('watchman', ['watch-del ./']);
await execa('watchman', ['watch-project ./']);
const eas = await execa('eas', ['update', '--auto', '--branch', RELEASE_CHANNEL]);
console.log(eas.stdout);
const iosUpdateId = eas.stdout.split('\n').find(s => s.startsWith('iOS update ID')).split(' ').pop();
const bundles = fs.readdirSync('dist/bundles');
const iosBundle = bundles.find(s => s.startsWith('ios-') && s.endsWith('.js'));
const iosMap = bundles.find(s => s.startsWith('ios-') && s.endsWith('.map'));
fs.renameSync(`dist/bundles/${iosBundle}`, 'dist/bundles/main.jsbundle');
const sentry = await execa('node_modules/@sentry/cli/bin/sentry-cli', [
'releases',
'--org', 'hotspot-app',
'files', `com.hux.hotspot@staging`,
'upload-sourcemaps',
'--dist', iosUpdateId,
'--rewrite',
`dist/bundles/main.jsbundle`, `dist/bundles/${iosMap}`,
], {
env: {
'SENTRY_PROJECT': 'hotspot',
},
});
console.log(sentry);
}); |
Based on the docs I believe you are right @jamesloper if you want to automatize the process. Disclaimer, I maintain the |
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 issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem. |
Summary
I followed the guide to install
sentry-expo
which resulted in sentry-expo 5.0.0 being installed. I already fixed this myself by updating manually to"sentry-expo": "6.0.0"
If I run
eas update
an OTA is published successfully and the client receives the update however the source maps are missing from sentry. To debug, I add aconsole.log('HERE123')
to upload-sourcemaps.js I noticed that HERE123 does not show when runningeas update
.I have postPublish and plugins declared in app.json
the result? postPublish script is not being called!
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!bare
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
47
Environment
Reproducible demo or steps to reproduce from a blank project
https://docs.expo.dev/guides/using-sentry/
The text was updated successfully, but these errors were encountered: