bugsnag / webpack-bugsnag-plugins

Webpack plugins for common BugSnag actions.
MIT License
32 stars 29 forks source link

Error: Conflict (409) - duplicate source map file for file name #15

Open Suraj-Chandola opened 6 years ago

Suraj-Chandola commented 6 years ago

While uploading source map using webpack-bugsnag-plugins, i am getting this error Error: Conflict (409) - duplicate source map file for file name

bengourley commented 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.

snmaynard commented 6 years ago

Is it not true by default?

bengourley commented 6 years ago

The default value in bugsnag-sourcemaps is false and this library doesn't set anything.

Suraj-Chandola commented 6 years ago

@bengourley Thanks

jgentes commented 5 years ago

This caught me, seems like overwrite should be true by default.

buskerone commented 5 years ago

Thanks @bengourley! --overwrite true works fine!

simkessy commented 4 years ago

This should be by default, my jenkins build just stalled over this.

abigailbramble commented 4 years ago

Thanks for your thoughts @simkessy. We will look into changing the default behaviour to overwrite.

michaellarocca90 commented 4 years ago

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.

johnkiely1 commented 4 years ago

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.

rechl commented 4 years ago

@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
mattdyoung commented 4 years ago

@sgotre The self-explaining error message seems a sensible suggestion. I'll re-open this to track making that change to the error message.

Haraldson commented 2 years ago

Any news on

Cga95 commented 2 years ago

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!