Open Suraj-Chandola opened 6 years ago
Hi @Suraj-Chandola – by default the source map upload API does not allow duplicates to be uploaded. If you want to be able to replace an already uploaded source map for the same app version / url, set the overwrite
option in plugin to be true
. e.g
new BugsnagSourceMapUploaderPlugin({
apiKey: 'YOUR_API_KEY',
appVersion: '1.2.3',
overwrite: true
})
Hope this helps. If it doesn't, let me know. Otherwise you can write in to support@bugsnag.com.
Is it not true by default?
The default value in bugsnag-sourcemaps is false
and this library doesn't set anything.
@bengourley Thanks
This caught me, seems like overwrite should be true
by default.
Thanks @bengourley! --overwrite true
works fine!
This should be by default, my jenkins build just stalled over this.
Thanks for your thoughts @simkessy. We will look into changing the default behaviour to overwrite.
I think I would like to bump this feature request. Using a gitops approach our "postSync" job handles the bugsnag source map uploads, we sync whenever there is a config change to our k8 resources in git so we end up uploading a lot for the same version number.
Can definitely just update it in code at the plugin level but just wanted to share my experience.
Hi @michaellarocca90,
Thanks. We've decided to leave the default as false
for consistency with our other tools. Setting the overwrite flag as true
when required is the recommended approach and we will be updating our documentation shortly to better clarify this behaviour.
@johnkiely1 It would be great to have a self-explaining error message. Could have saved some hours here :)
currently:
10:37:45 AM: [BugsnagSourceMapUploaderPlugin] uploading sourcemap for "https://example.com/1.4dc3d740546da926e43a.js"
10:37:45 AM: An unhandled exception occurred: HTTP status 409 received from upload API
Preferred
10:37:45 AM: [BugsnagSourceMapUploaderPlugin] uploading sourcemap for "https://example.com/1.4dc3d740546da926e43a.js"
10:37:45 AM: [BugsnagSourceMapUploaderPlugin] Error uploading sourcemap: This sourcemap has previously been uploaded. Use the option { overwrite: true} to enable overwriting of existing sourcemaps
@sgotre The self-explaining error message seems a sensible suggestion. I'll re-open this to track making that change to the error message.
Any news on
true
Hi @Haraldson, this is still in our backlog. Other priorities have meant we have been unable to get around to this yet. We will post here once we have any updates on this!
While uploading source map using webpack-bugsnag-plugins, i am getting this error Error: Conflict (409) - duplicate source map file for file name