Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Suraj-Chandola opened this issue Aug 20, 2018 · 14 comments
Open
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature

Comments

@Suraj-Chandola
Copy link

Suraj-Chandola commented Aug 20, 2018

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

@Suraj-Chandola Suraj-Chandola changed the title Error: Conflict (409) - duplicate source map file for ${ filename} Error: Conflict (409) - duplicate source map file for file name Aug 20, 2018
@bengourley
Copy link
Contributor

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 [email protected].

@snmaynard
Copy link

Is it not true by default?

@bengourley
Copy link
Contributor

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

@Suraj-Chandola
Copy link
Author

@bengourley Thanks

@jgentes
Copy link

jgentes commented Dec 3, 2018

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

@buskerone
Copy link

Thanks @bengourley! --overwrite true works fine!

@simkessy
Copy link

simkessy commented May 4, 2020

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

@abigailbramble
Copy link

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

@abigailbramble abigailbramble added backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels May 11, 2020
@michaellarocca90
Copy link

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
Copy link
Member

johnkiely1 commented Sep 21, 2020

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 johnkiely1 added wontfix This is not something we plan to implement and removed backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels Sep 23, 2020
@rechl
Copy link

rechl commented Sep 23, 2020

@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
Copy link
Contributor

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

@mattdyoung mattdyoung added backlog We hope to fix this feature/bug in the future feature request Request for a new feature and removed wontfix This is not something we plan to implement labels Sep 24, 2020
@mattdyoung mattdyoung reopened this Sep 24, 2020
@Haraldson
Copy link

Any news on

  • defaulting to true
  • an option to not have this error halt an entire build?

@Cga95
Copy link

Cga95 commented Aug 9, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests