Source code was not found for /main.jsbundle

Hi there!
We are having an issue with artefacts using self-hosted sentry 8.7.0
We user raven-js to track error in a react-native app, and have setup everything accourding to the docs and have the following problem:

Source code was not found for /main.jsbundle { "url": "/main.jsbundle" }

But the artefacts are in place, we tried different namings etc… nothing worked
Here are how the Artefacts look for this release. We tried both with / in the beginning and without.
What could be wrong ?

  • Make sure the release configured in Raven.js matches up with this release/artifact set
  • Make sure the error is triggered after the sourcemap is there

From the message you’ve posted, it looks like you’ve named the artifact correctly.

Thanks for quick reply,
Just not double checked it, release is set correctly and the error happened after source maps are uploaded.
What else could it be ?

Your filenames are incorrect. They need to be prefixed with the full URL or ~. Are you using sentry-cli to upload this? That handles it automatically for you.

I’ve tried sentry-cli & hosted version of sentry.
In case I use the --validate flag, i got an error that source map is not valid

sentry-cli releases -o inkitt-fe -p hermione files \
  2.2.14 upload-sourcemaps \
./sentry --ext = jsbundle,map --validate
Running with sourcemap validation
  ~/main.jsbundle.map
Error: failed to process: bad json in line 1, column 398: InvalidType(Bool)

without validation they are uploaded and recognized by sentry, and in general look much better:

but is there a way to get see the source of that files inside sentry as well ?

but is there a way to get see the source of that files inside sentry as well ?

So, most JS bundlers allow you to inline your sources content into your source map, so that you don’t have to upload a bajillion files. AFAIK, the React Native bundler doesn’t yet let you do this.

I need to open an issue on the project.

Has this been resolved? Currently facing same issue. Uploaded all sourcemaps to artifacts with this command:
sentry-cli releases -o COMPANY -p MYPROJECT files 1.0 upload-sourcemaps --url-prefix /main.jsbundle ./sourcemaps/sourcemap.ios.map

am I doing it wrong?

If you pass --rewrite to the sentry-cli upload-sourcemaps tool it will automatically inline sourcecode.