bundlesize icon indicating copy to clipboard operation
bundlesize copied to clipboard

Jenkins 422 error

Open garmeeh opened this issue 5 years ago • 5 comments

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

Bug

What is the current behavior?

During the Jenkins build I get the following error:

$ bundlesize --debug
 WARN  cli config: undefined 

 WARN  package json config: [
  {
    "path": ".next/static/**/*.js"
  }
] 

 WARN  selected config: [
  {
    "path": ".next/static/**/*.js"
  }
] 

 WARN  files: [
  {
    "maxSize": null,
    "path": ".next/static/chunks/13.c46dfa3cd18da4ec1093.js",
    "size": 206563,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/chunks/commons.39924d3786e9e9a04989.js",
    "size": 106235,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/_app.js",
    "size": 12633,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/_error.js",
    "size": 169,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/auth-testing.js",
    "size": 1866,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/fake-protected.js",
    "size": 2112,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/how-it-works.js",
    "size": 29675,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/index.js",
    "size": 29557,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/intel-tool.js",
    "size": 42807,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/property.js",
    "size": 55866,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/search.js",
    "size": 56984,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/nRZSRmWqb1IE~7THbtaYq/pages/valuation-tool.js",
    "size": 55012,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/runtime/main-2cc4e36e327a74e4e03e.js",
    "size": 7377,
    "compression": "gzip"
  },
  {
    "maxSize": null,
    "path": ".next/static/runtime/webpack-5097bfc0168f8fd7810a.js",
    "size": 1163,
    "compression": "gzip"
  }
] 

 WARN  token exists: true 

 WARN  repo: "owner/repo" 

 WARN  sha: "59309b9" 

 WARN  api enabled: true 

 WARN  fetching values: "..." 

 ERROR  Could not add github status.
        422: Validation Failed 

I know that you do not support Jenkins, but any insight on what might be causing the 422 would be great.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

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

Please mention other relevant information.

  • node version 10.X
  • npm version: yarn v1.3.2
  • Operating system
  • bundlesize version: 0.17.1
  • CI you are using: Jenkins

garmeeh avatar Mar 05 '19 21:03 garmeeh

ERROR  Could not add github status.
        422: Validation Failed 

Maybe: This points to the chance that your github token isn't valid.

siddharthkp avatar Mar 07 '19 04:03 siddharthkp

🤔 I tried a couple of tokens just to be sure.

Also made sure access was allowed to the correct repo.

Is there anything else you can think of that might help with debugging?

garmeeh avatar Mar 07 '19 07:03 garmeeh

Running bundlesize with --debug flag will confirm if it was able to read the token

siddharthkp avatar Mar 07 '19 11:03 siddharthkp

Thanks, I got: WARN token exists: true

garmeeh avatar Mar 07 '19 11:03 garmeeh

same for us: We use GitLab, have refreshed the token, gave the token access to our github organization, set all environment variables via a gitlab config file, set the debug flag, and got the same report with the same error message.

PaulKujawa avatar Jan 22 '20 10:01 PaulKujawa