weixin_39564151
weixin_39564151
2021-01-10 12:13

GET /values resulting in status code 500

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:
      '\n\n\n<meta charset="utf-8">\n<title>Error</title>\n\n\n<pre>Internal Server Error</pre>\n\n\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

该提问来源于开源项目:siddharthkp/bundlesize

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

20条回答

  • weixin_39869959 weixin_39869959 4月前

    Still an issue for me on this job.

    点赞 评论 复制链接分享
  • weixin_39634022 weixin_39634022 4月前

    I just ran into this issue, too, unfortunately.

    点赞 评论 复制链接分享
  • weixin_39622980 weixin_39622980 4月前

    I got this issue...

    点赞 评论 复制链接分享
  • weixin_39879674 weixin_39879674 4月前

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

    点赞 评论 复制链接分享
  • weixin_39761880 weixin_39761880 4月前

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

    image

    点赞 评论 复制链接分享
  • weixin_39746282 weixin_39746282 4月前

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

    点赞 评论 复制链接分享
  • weixin_39683526 weixin_39683526 4月前

    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)

    点赞 评论 复制链接分享
  • weixin_39842271 weixin_39842271 4月前

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

    点赞 评论 复制链接分享
  • weixin_39535349 weixin_39535349 4月前

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

    点赞 评论 复制链接分享
  • weixin_39797393 weixin_39797393 4月前

    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 },
    ...
    
    点赞 评论 复制链接分享
  • weixin_39879674 weixin_39879674 4月前

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

    点赞 评论 复制链接分享
  • weixin_39889481 weixin_39889481 4月前

    If you have a similar issue can you please add a :+1: 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

    点赞 评论 复制链接分享
  • weixin_39761880 weixin_39761880 4月前

    Same here https://travis-ci.org/sweetalert2/sweetalert2/builds/554705140

    image

    点赞 评论 复制链接分享
  • weixin_39609170 weixin_39609170 4月前

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

    点赞 评论 复制链接分享
  • weixin_39913422 weixin_39913422 4月前

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

    点赞 评论 复制链接分享
  • weixin_39564151 weixin_39564151 4月前

    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?

    点赞 评论 复制链接分享
  • weixin_39913422 weixin_39913422 4月前

    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.

    点赞 评论 复制链接分享
  • weixin_39524636 weixin_39524636 4月前

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

    点赞 评论 复制链接分享
  • weixin_39913422 weixin_39913422 4月前

    Are you seeing this error too?

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

    点赞 评论 复制链接分享
  • weixin_39524636 weixin_39524636 4月前

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

    点赞 评论 复制链接分享

相关推荐