Travis error
AdrienLemaire opened this issue · comments
Adrien Lemaire commented
Version: lighthouse-gh-reporter ^1.3.1
config:
{
"scripts": {
"test:lighthouse:ci": "lighthouse-github-reporter run -- --prId=${TRAVIS_PULL_REQUEST}",
},
"config": {
"lighthouse-github-reporter": {
"urls": [
"https://project.local"
],
"apiUrl": "https://api.github.com",
"owner": "company",
"repository": "repo",
"reporterUserName": "Fandekasp",
"noiseLevel": "low",
"scoreThresholds": {
"performance": 5,
"pwa": 27,
"accessibility": 58,
"best-practices": 100,
"seo": 90
}
}
}
}
Log from Travis
yarn test:lighthouse:ci
yarn run v1.3.2
(node:19390) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ lighthouse-github-reporter run -- --prId=${TRAVIS_PULL_REQUEST}
[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4
NOISE LEVEL IS LOW - REMOVING OLD GITHUB COMMENTS ON PR-false
Generating lighthouse report...
(node:19419) UnhandledPromiseRejectionWarning: HttpError: Invalid value for parameter 'number': "false" is NaN
at values.forEach (/home/travis/build/company/project/repo/node_modules/@octokit/rest/lib/plugins/endpoint-methods/validate.js:89:17)
at Array.forEach (<anonymous>)
at Object.keys.forEach.parameterName (/home/travis/build/company/project/repo/node_modules/@octokit/rest/lib/plugins/endpoint-methods/validate.js:54:12)
at Array.forEach (<anonymous>)
at validate (/home/travis/build/company/project/repo/node_modules/@octokit/rest/lib/plugins/endpoint-methods/validate.js:32:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
(node:19419) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19419) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Lighthouse generated report for 1 urls
Sending report to github pr-false asFandekasp
(node:19419) UnhandledPromiseRejectionWarning: HttpError: Invalid value for parameter 'number': "false" is NaN
at values.forEach (/home/travis/build/company/project/repo/node_modules/@octokit/rest/lib/plugins/endpoint-methods/validate.js:89:17)
at Array.forEach (<anonymous>)
at Object.keys.forEach.parameterName (/home/travis/build/company/project/repo/node_modules/@octokit/rest/lib/plugins/endpoint-methods/validate.js:54:12)
at Array.forEach (<anonymous>)
at validate (/home/travis/build/company/project/repo/node_modules/@octokit/rest/lib/plugins/endpoint-methods/validate.js:32:31)
(node:19419) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Done in 6.07s.
The command "cd $HOME/build/company/project/repo/
yarn test:lighthouse:ci
" exited with 0.
Any idea why I'm getting these HttpError: Invalid value for parameter 'number'
errors ?
Carles Núñez commented
Hello Fandekasp! First of all thank you for using and share your issues with the community.
Can you provide more info?
- Does travis have visibility to the url in which are you accessing?
- Does TRAVIS_PULL_REQUEST variable have any access??
It sounds like TRAVIS_PULL_REQUEST is === false so it won't work probably.
https://docs.travis-ci.com/user/environment-variables/#convenience-variables
TRAVIS_PULL_REQUEST is set to the pull request number if the current job is a pull request build, or false if it’s not.
Carles Núñez commented
Does your problem got fixed @Fandekasp ?
Adrien Lemaire commented
Hi Carles, thanks for the reply.
Unfortunately, the project got cut off while I was working on it, so I
won't be able to verify this in the near future. Maybe in a couple months.
Cordially
…On Thu, Mar 7, 2019 at 7:57 AM Carles Núñez ***@***.***> wrote:
Does your problem got fixed @Fandekasp <https://github.com/Fandekasp> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAP7d25d83Urqd2gXViLKIq6wFhJGTkuks5vUEfcgaJpZM4bd_ma>
.