Retest PR cause Github API call failed with 404
See original GitHub issueAfter comments on a Github PR “retest this please”. Jenkins could not rebuild, and the following exception is logged in Jenkins log page.
It might be https://api.github.com/repos/<UserName>/<RepoName>/pulls/4/commits
.
- Plugin version: 1.33.2
A thread (Thread-9/80) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
java.lang.Error: java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:433)
at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:400)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:365)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:214)
at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:346)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.handleComment(GhprbTrigger.java:618)
at org.jenkinsci.plugins.ghprb.GhprbRootAction$1.run(GhprbRootAction.java:233)
Caused by: java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:592)
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:429)
... 8 more
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/<UserName>/<RepoName>/issues/4/commits
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.kohsuke.github.Requester.parse(Requester.java:524)
at org.kohsuke.github.Requester.access$200(Requester.java:68)
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:424)
... 8 more
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/<UserName>/<RepoName>/issues/4/commits
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at org.kohsuke.github.Requester.parse(Requester.java:514)
... 10 more
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:44 (22 by maintainers)
Top Results From Across the Web
Github API Create Issues return 404 Not found - Stack Overflow
I am making a request to the below URL- Post https://api.github.com/repos/kvimal/2048/issues With my Token as a header for authorization.
Read more >Complex multi-repo builds with GitHub Actions and Camunda ...
Typically, we send a 404 error when your client isn't properly authenticated. You might expect to see a 403 Forbidden in these cases....
Read more >Troubleshooting Grafana Agent | Grafana Cloud documentation
If you still run into this error, please contact Grafana support for more help. ... server returned HTTP status 404 Not Found: 404...
Read more >Gdrive to Gdrive Error 404 File not Found - Help and Support
... gdrives always result with googleapi error 404 files not found. ... traffic to the API and adjust project quota limits accordingly.
Read more >GitHub integration - Snyk User Docs
Snyk tests any newly created pull request in your repositories for security vulnerabilities and sends a status check to GitHub. This lets you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have no label on my side. Currently:
Hi, I am also suffering from this issue. I’m using Github Enterprise 2.8 with Github Pull Request Builder plugin 1.33.2 (but, this also occurs at the master branch)
In my opinion, this is more complex issue because it related to
github-api
. This error is occurs at this point ( https://github.com/jenkinsci/ghprb-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java#L365 ) by callinglistCommits
.But, github’s hook returns api url
/repos/:user/:repo/issues/:pr_number
not/repos/:user/:repo/pulls/:pr_number
.github-api
project’sGHPullRequest
implements are ( https://github.com/kohsuke/github-api/blob/master/src/main/java/org/kohsuke/github/GHPullRequest.java#L250 ). At this point, we neither could modify PR’s api url nor call user defined url.