rollbar-sourcemap-webpack-plugin
rollbar-sourcemap-webpack-plugin copied to clipboard
Failed to upload many source maps
I'm having this error when trying to build our project.
ERROR in RollbarSourceMapPlugin: failed to upload 30.bundle.js.map to Rollbar: read ECONNRESET
We have one shared bundle and many bundles for each page. Other bundles are uploaded and I can see them at Rollbar -> Settings -> Source Maps but randomly one of the files can't be uploaded.
Settings are
new RollbarSourceMapPlugin({
accessToken: '-----------------------------',
version: gitHash,
publicPath: 'https://example'
})
Have you resolved this? We are experiencing the same intermittent issue.
Rollbar occasionally has downtime. We've experiences this a few times and had to resort to setting ignoreErrors: true
in this plugin's config to prevent deployments from being blocked. ECONNRESET
is usually a server side error.
I'm creating a new issue to add retries: https://github.com/thredup/rollbar-sourcemap-webpack-plugin/issues/73
Also, consider rate limiting.
If you deploy the same code to 2 servers, both will spam rollbar with the same maps. I contacted rollbar support and they pointed out that the rate limits were configurable, eg https://help.rollbar.com/en/articles/2465466-are-deploys-rate-limited
@jakeNiemiec the only http requests this plugin makes is for uploading the sourcemaps to rollbar during the build. I don't think rate limiting is needed since there's only 1 request per sourcemap per build.
I believe that article is referring to rate limiting for the requests made be the application to rollbar at runtime for creating rollbar item occurences (rollbar.warning, rollbar.error, etc).
@jakeNiemiec I re-read and now agree that rate limiting could possibly affect this plugin's ability to upload sourcemaps. It's not likely the plugin would be the cause of hitting a rate limit but if you application is reporting lots of errors, your account could get rate limited and this could block your builds.
So I think this projects documentation should suggest creating a separate post_server_item
for builds only, separate from the one used for runtime.
This is the screen I was referring to (Settings > Setup > Project Access Tokens):
Project Access Tokens
default to just 100 calls / 1 minute
. Users that do even minor code-splitting will hit this limit.
I can confirm that ECONNRESET
is the unhelpful error sent when you bump your head on this. It should be sending 429 Too Many Requests
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429
@brandondoran Additionally, the plugin might be getting a 429, but is not setup to handle it or make use of the Retry-After
header. I would test, but I wouldn't know the first thing about developing for a webpack plugin 😅.