I have spent hours trying to get sourcemaps to work with sentry with no luck so far.
I have uploaded main.js and main.js.map using the sentry-cli. I tried both the url-prefixes ~/main.js.map and /main.js.map. However, it still reports errors when processing a new event:
There were 3 errors encountered while processing this event
Source code was not found for /main.js
{
"url": "/main.js"
}
I validated that the sourcemaps are correct by checking the safari debugger on the device, as well as using the line numbers from sentry in the source map. Both worked fine.
The source maps and the error are also located in the right release. I also made sure the source maps were uploaded before the error occurred.
It still seems that the source maps are not found by sentry. I read through all the recent threads here on the forums, as well as all the github issues I could find.
Do you have any suggestions?
Thanks a lot.
EDIT:
I just noticed that when I try to upload it with --url-prefix / and --validate, I get an error:
Running with sourcemap validation
/main.js
Error: failed to process: relative URL without a base
/main.js.map
error: Encountered problems when validating sourcemaps.
But when I don’t include --url-prefix and just use --validate, the upload works:
Running with sourcemap validation
~/main.js
~/main.js.map
All Good!
Not sure if that tells you something…