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

GET /values resulting in status code 500 #308

Open
tjefferson08 opened this issue Jun 6, 2019 · 22 comments · May be fixed by #349
Open

GET /values resulting in status code 500 #308

tjefferson08 opened this issue Jun 6, 2019 · 22 comments · May be fixed by #349

Comments

@tjefferson08
Copy link

Do you want to request a feature or report a bug?

Bug 🐛

What is the current behavior?

When our Travis CI build runs yarn bundlesize, the size check against master fails and we get some http logs indicating a 500 error.

If the current behavior is a bug, please provide the steps to reproduce.
Here's the relevant section of the Travis CI build logs:

$ /home/travis/build/sharethrough/groundcontrol/node_modules/.bin/bundlesize
{ Error: Request failed with status code 500
    at createError (/home/travis/build/sharethrough/groundcontrol/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/home/travis/build/sharethrough/groundcontrol/node_modules/axios/lib/core/settle.js:18:12)
    at IncomingMessage.handleStreamEnd (/home/travis/build/sharethrough/groundcontrol/node_modules/axios/lib/adapters/http.js:202:11)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  config:
   { adapter: [Function: httpAdapter],
     transformRequest: { '0': [Function: transformRequest] },
     transformResponse: { '0': [Function: transformResponse] },
     timeout: 0,
     xsrfCookieName: 'XSRF-TOKEN',
     xsrfHeaderName: 'X-XSRF-TOKEN',
     maxContentLength: -1,
     validateStatus: [Function: validateStatus],
     headers:
      { Accept: 'application/json, text/plain, */*',
        'User-Agent': 'axios/0.18.1' },
     method: 'get',
     url:
      'https://bundlesize-store.now.sh/values?repo=sharethrough/groundcontrol&token=[secure]',
     data: undefined },
  request:
   ClientRequest {
     _events:
      [Object: null prototype] {
        socket: [Function],
        abort: [Function],
        aborted: [Function],
        error: [Function],
        timeout: [Function],
        prefinish: [Function: requestOnPrefinish] },
     _eventsCount: 6,
     _maxListeners: undefined,
     output: [],
     outputEncodings: [],
     outputCallbacks: [],
     outputSize: 0,
     writable: true,
     _last: true,
     chunkedEncoding: false,
     shouldKeepAlive: false,
     useChunkedEncodingByDefault: false,
     sendDate: false,
     _removedConnection: false,
     _removedContLen: false,
     _removedTE: false,
     _contentLength: 0,
     _hasBody: true,
     _trailer: '',
     finished: true,
     _headerSent: true,
     socket:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: 'bundlesize-store.now.sh',
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 8,
        connecting: false,
        _hadError: false,
        _handle: [TLSWrap],
        _parent: null,
        _host: 'bundlesize-store.now.sh',
        _readableState: [ReadableState],
        readable: true,
        _maxListeners: undefined,
        _writableState: [WritableState],
        writable: false,
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: [TLSWrap],
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular],
        [Symbol(res)]: [TLSWrap],
        [Symbol(asyncId)]: 13,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 0,
        [Symbol(connect-options)]: [Object] },
     connection:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: 'bundlesize-store.now.sh',
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 8,
        connecting: false,
        _hadError: false,
        _handle: [TLSWrap],
        _parent: null,
        _host: 'bundlesize-store.now.sh',
        _readableState: [ReadableState],
        readable: true,
        _maxListeners: undefined,
        _writableState: [WritableState],
        writable: false,
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: [TLSWrap],
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular],
        [Symbol(res)]: [TLSWrap],
        [Symbol(asyncId)]: 13,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 0,
        [Symbol(connect-options)]: [Object] },
     _header:
      'GET /values?repo=sharethrough/groundcontrol&token=[secure] HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.18.1\r\nHost: bundlesize-store.now.sh\r\nConnection: close\r\n\r\n',
     _onPendingData: [Function: noopPendingOutput],
     agent:
      Agent {
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object],
        requests: {},
        sockets: [Object],
        freeSockets: {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        maxCachedSessions: 100,
        _sessionCache: [Object] },
     socketPath: undefined,
     timeout: undefined,
     method: 'GET',
     path:
      '/values?repo=sharethrough/groundcontrol&token=[secure]',
     _ended: true,
     res:
      IncomingMessage {
        _readableState: [ReadableState],
        readable: false,
        _events: [Object],
        _eventsCount: 3,
        _maxListeners: undefined,
        socket: [TLSSocket],
        connection: [TLSSocket],
        httpVersionMajor: 1,
        httpVersionMinor: 1,
        httpVersion: '1.1',
        complete: true,
        headers: [Object],
        rawHeaders: [Array],
        trailers: {},
        rawTrailers: [],
        aborted: false,
        upgrade: false,
        url: '',
        method: null,
        statusCode: 500,
        statusMessage: 'Internal Server Error',
        client: [TLSSocket],
        _consuming: false,
        _dumped: false,
        req: [Circular],
        responseUrl:
         'https://bundlesize-store.now.sh/values?repo=sharethrough/groundcontrol&token=[secure]',
        redirects: [] },
     aborted: undefined,
     timeoutCb: null,
     upgradeOrConnect: false,
     parser: null,
     maxHeadersCount: null,
     _redirectable:
      Writable {
        _writableState: [WritableState],
        writable: true,
        _events: [Object],
        _eventsCount: 2,
        _maxListeners: undefined,
        _options: [Object],
        _redirectCount: 0,
        _redirects: [],
        _requestBodyLength: 0,
        _requestBodyBuffers: [],
        _onNativeResponse: [Function],
        _currentRequest: [Circular],
        _currentUrl:
         'https://bundlesize-store.now.sh/values?repo=sharethrough/groundcontrol&token=[secure]' },
     [Symbol(isCorked)]: false,
     [Symbol(outHeadersKey)]:
      [Object: null prototype] { accept: [Array], 'user-agent': [Array], host: [Array] } },
  response:
   { status: 500,
     statusText: 'Internal Server Error',
     headers:
      { 'content-type': 'text/html; charset=utf-8',
        connection: 'close',
        'x-powered-by': 'Express',
        'content-security-policy': 'default-src \'none\'',
        'content-length': '148',
        date: 'Thu, 06 Jun 2019 19:26:59 GMT',
        'x-content-type-options': 'nosniff',
        'cache-control': 'public, max-age=0, must-revalidate',
        'x-now-cache': 'MISS',
        'x-now-trace': 'cle1',
        server: 'now',
        'x-now-id': 'cle1:bom1:jr8r2-1559849218421-d7f4b31ddc96',
        'strict-transport-security': 'max-age=63072000' },
     config:
      { adapter: [Function: httpAdapter],
        transformRequest: [Object],
        transformResponse: [Object],
        timeout: 0,
        xsrfCookieName: 'XSRF-TOKEN',
        xsrfHeaderName: 'X-XSRF-TOKEN',
        maxContentLength: -1,
        validateStatus: [Function: validateStatus],
        headers: [Object],
        method: 'get',
        url:
         'https://bundlesize-store.now.sh/values?repo=sharethrough/groundcontrol&token=[secure]',
        data: undefined },
     request:
      ClientRequest {
        _events: [Object],
        _eventsCount: 6,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: false,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: 0,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [TLSSocket],
        connection: [TLSSocket],
        _header:
         'GET /values?repo=sharethrough/groundcontrol&token=[secure] HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.18.1\r\nHost: bundlesize-store.now.sh\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Agent],
        socketPath: undefined,
        timeout: undefined,
        method: 'GET',
        path:
         '/values?repo=sharethrough/groundcontrol&token=[secure]',
        _ended: true,
        res: [IncomingMessage],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        _redirectable: [Writable],
        [Symbol(isCorked)]: false,
        [Symbol(outHeadersKey)]: [Object] },
     data:
      '<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>Internal Server Error</pre>\n</body>\n</html>\n' } }
 PASS  ./dist/gc.js: 38.95KB < maxSize 40KB (gzip) 

 PASS  ./dist/sfp-iframe-buster.js: 8.69KB < maxSize 15KB (gzip) 

What is the expected behavior?
I expect the master branch values to be retrieved successfully, resulting in a handy comparison in the status notification on the pull request.

If this is a feature request, what is motivation or use case for changing the behavior?
N/A

Please mention other relevant information.
I'll pull these straight from the Travis CI logs

$ node --version
v10.16.0
$ npm --version
6.9.0
$ nvm --version
0.34.0
$ yarn --version
1.3.2
  • Operating system: Ubuntu 14.04.5 LTS
  • bundlesize version: 0.17.2
  • CI you are using: Travis CI
@Rabinzon
Copy link

same error on circleci, very often in last time :(((

@siddharthkp
Copy link
Owner

Ugh, this is pretty horrible. Migrating to a different storage (shelf) is on my roadmap, haven't been able to get to it yet.

@tjefferson08
Copy link
Author

@siddharthkp what's going on with the storage backend?

Does 500 mean... we're overwhelming the firebase app? Or is it a serialization/deserialization issue?

Could we try wiping the data for our repo and start from scratch?

@siddharthkp
Copy link
Owner

we're overwhelming the firebase app? Or is it a serialization/deserialization issue?

500 = It's unhandled. Could be either, honestly.

Could we try wiping the data for our repo and start from scratch?

I don't think that will help. I will find some time to dig into this, soon-ish.

@siddharthkp siddharthkp added this to the Stable backend milestone Jun 25, 2019
@bolismauro
Copy link

Hi!
Any news on this? Is there a way to fix the problem or a workaround?

@siddharthkp
Copy link
Owner

@bolismauro Are you seeing this error too?

(I'm working on a long term fix this month)

@bolismauro
Copy link

Yes yesterday it didn't work but I just tried and It worked. No idea why

@limonte
Copy link
Contributor

limonte commented Jul 5, 2019

@limonte
Copy link
Contributor

limonte commented Jul 8, 2019

bumped bundlesize to ^0.18.0, same result: https://travis-ci.org/sweetalert2/sweetalert2/builds/555643927

image

@XhmikosR
Copy link
Contributor

XhmikosR commented Jul 9, 2019

For what is worth, we too are seeing this on Bootstrap for quite some time now.

@caleb15
Copy link

caleb15 commented Jul 10, 2019

Just installed bundlesize (0.18.0) and when I added BUNDLESIZE_GITHUB_TOKEN I got this error. I'm guessing it's a problem with the size difference calculation because the CI status check still works and we still get size details on the https://bundlesize-store.now.sh website.

Our CI message:

bundlesize — Total bundle size is 514.3KB/1.76MB (-null)

@hugomrdias
Copy link

same here https://travis-ci.com/ipfs/js-ipfs/jobs/218558166#L415

@RomanHotsiy
Copy link

Same here. It started 1 hour ago and restarting builds doesn't help: https://travis-ci.org/Redocly/redoc/builds/564951645

@joma74
Copy link

joma74 commented Aug 13, 2019

Me too on Travis

ci-prod] [build          ] $ bundlesize
[ci-prod] [build          ] { Error: Request failed with status code 500
[ci-prod] [build          ]     at createError (/home/travis/build/joma74/acc-natours/node_modules/axios/lib/core/createError.js:16:15)
[ci-prod] [build          ]     at settle (/home/travis/build/joma74/acc-natours/node_modules/axios/lib/core/settle.js:18:12)
[ci-prod] [build          ]     at IncomingMessage.handleStreamEnd (/home/travis/build/joma74/acc-natours/node_modules/axios/lib/adapters/http.js:201:11)
[ci-prod] [build          ]     at IncomingMessage.emit (events.js:198:15)
[ci-prod] [build          ]     at endReadableNT (_stream_readable.js:1139:12)
[ci-prod] [build          ]     at processTicksAndRejections (internal/process/task_queues.js:81:17)
[ci-prod] [build          ]   config:
[ci-prod] [build          ]    { adapter: [Function: httpAdapter],
[ci-prod] [build          ]      transformRequest: { '0': [Function: transformRequest] },
[ci-prod] [build          ]      transformResponse: { '0': [Function: transformResponse] },
[ci-prod] [build          ]      timeout: 0,
[ci-prod] [build          ]      xsrfCookieName: 'XSRF-TOKEN',
[ci-prod] [build          ]      xsrfHeaderName: 'X-XSRF-TOKEN',
[ci-prod] [build          ]      maxContentLength: -1,
[ci-prod] [build          ]      validateStatus: [Function: validateStatus],
[ci-prod] [build          ]      headers:
[ci-prod] [build          ]       { Accept: 'application/json, text/plain, */*',
[ci-prod] [build          ]         'User-Agent': 'axios/0.18.0' },
[ci-prod] [build          ]      method: 'get',
[ci-prod] [build          ]      url:
[ci-prod] [build          ]       'https://bundlesize-store.now.sh/values?repo=joma74/acc-natours&token=[secure]',
[ci-prod] [build          ]      data: undefined },
...

@ctavan
Copy link

ctavan commented Sep 12, 2019

Still an issue for me as well. Anything we could contribute to get this fixed?

@zoetrope69
Copy link

If you have a similar issue can you please add a 👍 to the first post, people who are watching this thread for a response get notified so writing a comment that is the same as that isn't very useful

@mohsinulhaq mohsinulhaq linked a pull request Oct 6, 2019 that will close this issue
@michaelmior
Copy link

Still an issue for me on this job.

@zeptonaut
Copy link

I just ran into this issue, too, unfortunately.

@lednhatkhanh
Copy link

I got this issue...

ctavan added a commit to uuidjs/uuid that referenced this issue Feb 7, 2020
Bundlesize is unmaintained and currently doesn't support reporting
differences compared to master, see:
siddharthkp/bundlesize#308 As mentioned here,

Bundlewatch seems to be a working successor:
GoogleChrome/lighthouse#10272 (comment)
ctavan added a commit to uuidjs/uuid that referenced this issue Feb 10, 2020
Bundlesize is unmaintained and currently doesn't support reporting
differences compared to master, see:
siddharthkp/bundlesize#308 As mentioned here,

Bundlewatch seems to be a working successor:
GoogleChrome/lighthouse#10272 (comment)
ctavan added a commit to uuidjs/uuid that referenced this issue Feb 10, 2020
Bundlesize is unmaintained and currently doesn't support reporting
differences compared to master, see:
siddharthkp/bundlesize#308 As mentioned here,

Bundlewatch seems to be a working successor:
GoogleChrome/lighthouse#10272 (comment)
@ctavan
Copy link

ctavan commented Feb 10, 2020

For anyone bumping into this, https://github.com/bundlewatch/bundlewatch might be an alternative.

ctavan added a commit to uuidjs/uuid that referenced this issue Feb 10, 2020
Bundlesize is unmaintained and currently doesn't support reporting
differences compared to master, see:
siddharthkp/bundlesize#308 As mentioned here,

Bundlewatch seems to be a working successor:
GoogleChrome/lighthouse#10272 (comment)
@roligheten
Copy link

We are getting this issue as well on our project. Looking at this thread should we still be using this tool? It looks like this has been an issue for a long time and no one has fixed it, solution seems to be removing the tool for most projects and use an alternative.

@siddharthkp any chance this will be fixed? Is this tool still actively maintained? 🙂

@siddharthkp
Copy link
Owner

Is this tool still actively maintained? 🙂

going to be honest, barely 😓

I did a rewrite which is a lot more reliable - https://github.com/siddharthkp/bundlesize2, it's not 100% feature complete, but it's got the core features you probably need.

Migration path:

  1. Use the npm package bundlesize2 instead of bundlesize
  2. If you'd like status reported back to github, use the flag --enable-github-checks + authorize bundlesize2 app. More in the docs
  3. If anything breaks, let me know :)

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

Successfully merging a pull request may close this issue.