node-coveralls
node-coveralls copied to clipboard
coveralls randomly fails with "Couldn't find a repository matching this job."
coveralls randomly fails with Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true}
. It seems to be malformed data is sent to the coveralls server. I'm unable to reproduce locally but frequently see this error on travis.
See https://travis-ci.org/Firefund/firefund-cli/jobs/123475415 for an example
Oh, it even shows in the unit tests from this repository on travis.
Duplicate of https://github.com/lemurheavy/coveralls-public/issues/750
This error also happens every time on appveyor if a repo token is not provided. It's strange, because one should not be needed, as far as I understand it. When I do provide the token, the message goes away, but all sorts other things misbehave about the coverage reporting. 😦
Pasting my comment from https://github.com/nickmerwin/node-coveralls/issues/166
In my case, it happened when I made the commit directly from GitHub website.
In node_modules/coveralls/lib/fetchGitData.js (https://github.com/nickmerwin/node-coveralls/blob/master/lib/fetchGitData.js#L62) there is a regular expression
var REGEX_COMMIT_DETAILS = /\nauthor (.+?) <(.+?)>.+\ncommitter (.+?) <(.+?)>.+\n?.+?\n\n(.*)/m;
which then tries to match with the output from git cat-file -p <commit/head-id>
(https://github.com/nickmerwin/node-coveralls/blob/master/lib/fetchGitData.js#L65)
When I commit from my local system:
$ git cat-file -p <commit-hash>
tree aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
parent bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
author Name Surname <[email protected]> 1234567890 +0000
committer Name Surname <[email protected]> 1234567890 +0000
My commit subject
When I commit from GitHub website:
$ git cat-file -p <commit-hash>
tree aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
parent bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
author Name Surname <[email protected]> 1234567890 +0000
committer Name Surname <[email protected]> 1234567890 +0000
gpgsig -----BEGIN PGP SIGNATURE-----
abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz12
34567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrst
uvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijkl
mnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcd
efghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz123456
7890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwx
yz123
-----END PGP SIGNATURE-----
My commit subject
Due to this different output, the above mentioned regex fails. Till when that regex issue gets fixed, the workaround would be to push commits from local system.
Hope that helps someone :-)