node-coveralls icon indicating copy to clipboard operation
node-coveralls copied to clipboard

Unable to find repository (from Travis CI, Pro)

Open askarby opened this issue 7 years ago • 4 comments

The integration with coveralls has started failing on our Travis (Pro) builds.

First it was limited to Pull Requests, now it fails on our develop-branch as well (using Git flow).

The error message we're encountering is:

> cat ./coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js -v
/home/travis/build/EG-Xena/Gabrielle.Web/node_modules/coveralls/bin/coveralls.js:18
        throw err;
        ^
Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true}

I can read in the documentation (README.md) that the tool should automatically provide the required parameters when running from Travis.

As a sanity check, I've tried adding a .coveralls.yml-file, with the contents being:

repo_token: <removed for security reasons>

and

service_name: travis-pro
repo_token: <removed for security reasons>

neither making any difference.

I've double and triple checked that the tokens match the tokens from coveralls (copy/paste should be a sure winner here, right?)

I'm running out of good (and even worse) bad ideas of what to try. Hope you have an idea of what may be going on...

If there's a means of of providing debugging information, don't shy away asking for them. It would be nice to see which HTTP request are being executed, to debug further.

askarby avatar Mar 22 '17 10:03 askarby

Are you still experiencing this? Same error that I'm facing but with a public build.

jakeols avatar Mar 24 '17 12:03 jakeols

@jakeols Well, since I've disabled coveralls I'm not... but I don't think it magically disappeared?

askarby avatar Mar 24 '17 12:03 askarby

Hi @askarby and @jakeols could you try logging out and into Coveralls? The Github or Travis token may have rolled.

nickmerwin avatar Mar 26 '17 21:03 nickmerwin

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 :-)

paras20xx avatar May 09 '18 10:05 paras20xx