Reputation: 10713
I've build my Ionic project with:
ionic build --prod --source-map
Then I've uploaded the sourcemaps with:
npx sentry-cli releases files my-app-1.1.0 upload-sourcemaps ../sentry-source-code-1.1.0 --url-prefix 'http://localhost'
(the sentry-source-code-1.1.0 folder contains the .map and .js files)
Issues show up on Sentry.io but I got this error:
Which seems to make sense, but unfortunately Ionic / Capacitor apps are always loaded from localhost
since it is a Webview container.
These files do exist in Sentry's release artifacts as well:
Uploading without --url-prefix 'http://localhost
did not change anything
How can I tell sentry to lookup the localhost
files and sourcemaps in the artifacts?
Upvotes: 6
Views: 1436
Reputation: 376
Prefix has to include a ~/
which is protocol matcher. Ditch http://
from the prefix and use ~/localhost
instead.
Upvotes: 0
Reputation: 6408
My guess is that it happens because you pass --url-prefix localhost
.
Try removing it.
Upvotes: 0