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

Failed to upload many source maps #68

Open
mkozak0108 opened this issue Jul 9, 2019 · 6 comments
Open

Failed to upload many source maps #68

mkozak0108 opened this issue Jul 9, 2019 · 6 comments

Comments

@mkozak0108
Copy link

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'
  })
@skamps-duac-quizlet
Copy link

Have you resolved this? We are experiencing the same intermittent issue.

@brandondoran
Copy link
Collaborator

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: #73

@jakeNiemiec
Copy link

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

@brandondoran
Copy link
Collaborator

@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).

@brandondoran
Copy link
Collaborator

@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.

@jakeNiemiec
Copy link

This is the screen I was referring to (Settings > Setup > Project Access Tokens):
image


image

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 😅.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants