React native source not found for app:///main.jsbundle

It turned out --dist was the missing piece of the puzzle. Thanks for helping out!

I did not use sentry-cli react-native xcode because I didn’t feel the documentation was satisfying enough.

Hey.
I’d like to hook into this discussion as we are having the same issue

Source code was not found for app:///main.jsbundle.map
{
“url”: “app:///main.jsbundle.map”
}

We are talking about a React native app, that is built for both Android and iOS, but we can’t get the sourcemap binding to work for the JS part and get the above error.
I though it maybe was due to the fact we are hosting our our own Sentry server, but I recently set the project up with the hosted solution on sentry.io, basically following all the steps from the new setup-wizard, but still this issue persists.

Any suggestions what the problem could be? Thanks!

Hey, you have to make sure that the release / dist of your submitted events are exactly the same as the releases you create with sentry-cli.
Are you using your own build process or did you change how sentry-cli is invoked?

Yeah, they are.

Meanwhile I was able to get it to work via the sentry.io hosted solution. On my locally hosted server I have the following file listing for the latest release:

+----------------------------+--------------+-------------------+--------+
| Name                       | Distribution | Source Map        | Size   |
+----------------------------+--------------+-------------------+--------+
| ~/index.android.bundle     | 1048680      |                   | 2.64MB |
| ~/index.android.bundle.map | 1048680      |                   | 9.50MB |
| ~/main.jsbundle            | 167          | main.jsbundle.map | 2.65MB |
| ~/main.jsbundle.map        | 167          |                   | 9.48MB |
+----------------------------+--------------+-------------------+--------+

The main.jsbundle and main.jsbundle.map are connected correctly it seems - uploaded through the Xcode script.
The index.android.bundle and .map I upload manually through sentry-cli, but it seems that there the source code to sourcemap connection cannot be made.

For the iOS part I now get the following issue on my local server:

Source code was not found for app:///main.jsbundle
{
“url”: “app:///main.jsbundle”
}

fuck me! I’m crazy by this fucking problem

@uninow-sts Is your on-premise deployment using Kubernetes Helm chart by any chance?

Having the same problem but only on Android. Sourcemaps work fine on iOS.
It seems to be related to the distribution. On iOS, the distribution is the build number but on Android it seems to always be “1”.

@SeMeKh We do run on-premise using a slightly modified helm chart based on stable/sentry.