sentry-react-native
sentry-react-native copied to clipboard
docs: sentry-expo-upload-sourcemaps not found throubleshooting
OS:
- [ ] Windows
- [X] MacOS
- [ ] Linux
Platform:
- [ ] iOS
- [ ] Android
SDK:
- [X]
@sentry/react-native
(>= 1.0.0) - [ ]
react-native-sentry
(<= 0.43.2)
SDK version: 5.19.0
react-native
version: 0.73.4
Are you using Expo?
- [X] Yes
- [ ] No
Are you using sentry.io or on-premise?
- [X] sentry.io (SaaS)
- [ ] on-premise
Configuration:
(@sentry/react-native
)
Sentry.init({
dsn: process.env.SENTRY_DSN,
enableWatchdogTerminationTracking: false,
enableAppHangTracking: false,
tracesSampleRate: 0.2,
integrations: [
new Sentry.ReactNativeTracing({
tracingOrigins: ['localhost', /^\//, /^https:\/\//],
routingInstrumentation,
}),
],
normalizeDepth: 10,
attachScreenshot: true,
});
I have the following issue: I can't seem to be able to use the npx sentry-expo-upload-sourcemaps dist
command to upload the sourcemaps to Sentry.
Steps to reproduce:
- install @sentry/react-native in an empty expo project
- run
npx sentry-expo-upload-sourcemaps dist
Actual result:
➜ npx sentry-expo-upload-sourcemaps dist
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/sentry-expo-upload-sourcemaps - Not found
npm ERR! 404
npm ERR! 404 'sentry-expo-upload-sourcemaps@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Additional error log output:
Expected result:
I should be able to successfully upload sourcemaps to sentry.
Hi @fobos531 can you please clarify - which version of Expo are you using? Also, how did you install @sentry/react-native?
Hi @fobos531 can you please clarify - which version of Expo are you using? Also, how did you install @sentry/react-native?
Expo 50.0.7
I installed @sentry/react-native using their official instructions: https://docs.expo.dev/guides/using-sentry/
@fobos531 thank you for confirming! We're on it
@fobos531 Could you share the exact steps you took and the version of the package manager you used?
I've tried the following, but was not able to reproduce the error:
-
npx create-expo-app StickerSmash
-
cd StickerSmash
-
npx expo install @sentry/react-native
-
npx sentry-expo-upload-sourcemaps dist
Having a similar issue with a mono-repo project.
"@sentry/cli": "^2.28.6",
"@sentry/react-native": "5.19.1",
"expo": "50.0.6",
"react-native": "0.73.4",
Running npx sentry-expo-upload-sourcemaps dist
after an eas update
gives me a 404 not found in registry.
- Using WSL Windows 11
- GitHub actions.
Side note:
I've also tried directly running the sentry-expo-upload-sourcemaps
script, but it fails to find the sentry-cli
binary (failing to find the binary could be an issue related to the mono-repo structure of the project). When I set an environment variable that sets the location of the binary I get a "sourcemaps is not recognizable argument..." error.
Having a similar issue with a mono-repo project.
"@sentry/cli": "^2.28.6", "@sentry/react-native": "5.19.1", "expo": "50.0.6", "react-native": "0.73.4",
Running
npx sentry-expo-upload-sourcemaps dist
after aneas update
gives me a 404 not found in registry.
- Using WSL Windows 11
- GitHub actions.
Side note: I've also tried directly running the
sentry-expo-upload-sourcemaps
script, but it fails to find thesentry-cli
binary (failing to find the binary could be an issue related to the mono-repo structure of the project). When I set an environment variable that sets the location of the binary I get a "sourcemaps is not recognizable argument..." error.
I have a similar setup. I am in a monorepo and my package manager is yarn v4.
Having a similar issue with a mono-repo project.
"@sentry/cli": "^2.28.6", "@sentry/react-native": "5.19.1", "expo": "50.0.6", "react-native": "0.73.4",
Running
npx sentry-expo-upload-sourcemaps dist
after aneas update
gives me a 404 not found in registry.
- Using WSL Windows 11
- GitHub actions.
Side note: I've also tried directly running the
sentry-expo-upload-sourcemaps
script, but it fails to find thesentry-cli
binary (failing to find the binary could be an issue related to the mono-repo structure of the project). When I set an environment variable that sets the location of the binary I get a "sourcemaps is not recognizable argument..." error.I have a similar setup. I am in a monorepo and my package manager is yarn v4.
My repo is being managed by yarn v3.5, could be an issue with path resolutions 🤔.
Thank @erikkodnar and @fobos531, we'll try to reproduce it with yarn v4 and monorepo setup.
I tried https://docs.expo.dev/guides/monorepos/ with Yarn v4 and sadly still can't reproduce the issue.
@erikkodnar @fobos531 Would you be able to share an example project where the command doesn't work?
@erikkodnar
I've also tried directly running the sentry-expo-upload-sourcemaps script, but it fails to find the sentry-cli binary (failing to > find the binary could be an issue related to the mono-repo structure of the project).
Could you share how you invoke the script and what path you set as sentry-cli
binary?
I was running into the same issue, but running:
yarn sentry-expo-upload-sourcemaps dist
works, as the script is part of the @sentry/react-native
package in the node_modules
.
you could also run:
node node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps dist
I was running into the same issue, but running:
yarn sentry-expo-upload-sourcemaps dist
works, as the script is part of the
@sentry/react-native
package in thenode_modules
.you could also run:
node node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps dist
I can confirm that this works for me as well.
@knowbody Yes, that's a valid workaround.
The local bin is not resolved by the package manager. But from the current information, we are not able to determinate why.
Would anyone be able to share a reproducible example that we can debug?
This happens to me on the codebase that has an expo app as part of the monorepo (yarn workspaces), I can try to put together some small repro in the end of the week.
@knowbody Thank you.
Since npx executes commands directly from the npm registry, I think the problem is that the script cannot be found on the npm registry, hence the 404 Error. Can you verify if you can find the script on the registry on your end and we can go from there.
@233devs npx
executes local bins first and then tries to fetch the package from the registry.
sentry-expo-upload-sourcemaps
package doesn't exist. It's a binary that should be registered automatically when installing @sentry/react-native
package.
We should add troubleshooting note to docs and then we can close this issue.
@krystofwoldrich sorry I didn't have time to create a repro. But I think changing the docs would be great and this could be closed