Intellij Pull Requests Tool Windows has errors

619 views Asked by At

Intellij version: 2018.3 (183.4284.148)

I am trying to use the feature https://blog.jetbrains.com/idea/2018/10/intellij-idea-2018-3-eap-github-pull-requests-and-more/ in my Enterprise Github.

When I open the Pull requests tool window it loads pull requests however when I click on any one of them I see an error such as below

enter image description here

There is not much in the idea logs except may be for this one (not sure if this is actually relevant)

2018-12-14 15:56:18,582 [1655214]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #org.jetbrains.plugins.github.api.GithubApiRequestExecutor 
2018-12-14 15:56:28,710 [1665342]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/repos/MY_ORG/MY_REPO get information for repository MY_ORG/MY_REPO : Connecting 
2018-12-14 15:56:29,507 [1666139]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/repos/MY_ORG/MY_REPO GET : Connected 
2018-12-14 15:56:29,509 [1666141]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/repos/MY_ORG/MY_REPO GET : Result extracted 
2018-12-14 15:56:29,519 [1666151]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/search/issues?q=type%3Apr%20repo%3AMY_ORG%2FMY_REPO%20state%3Aopen search issues in repository : Connecting 
2018-12-14 15:56:30,218 [1666850]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/search/issues?q=type%3Apr%20repo%3AMY_ORG%2FMY_REPO%20state%3Aopen GET : Connected 
2018-12-14 15:56:30,458 [1667090]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/search/issues?q=type%3Apr%20repo%3AMY_ORG%2FMY_REPO%20state%3Aopen GET : Result extracted 
2018-12-14 15:56:30,460 [1667092]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/avatars/u/9264? get profile avatar : Connecting 
2018-12-14 15:56:30,461 [1667093]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/avatars/u/7541? get profile avatar : Connecting 
2018-12-14 15:56:31,659 [1668291]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/login?return_to=https%3A%2F%2FMY_COMPANY_URL%2Favatars%2Fu%2F7541%3F GET : Connected 
2018-12-14 15:56:31,660 [1668292]   INFO - .CachingGithubUserAvatarLoader - Error loading image from https://MY_COMPANY_URL/avatars/u/7541? 
java.lang.IllegalStateException: ImageIO.read(stream) must not be null
    at org.jetbrains.plugins.github.api.GithubApiContentHelper.loadImage(GithubApiContentHelper.kt:64)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1$extractResult$1.convert(GithubApiRequests.kt:29)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1$extractResult$1.convert(GithubApiRequests.kt:26)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base$createResponse$1.handleBody(GithubApiRequestExecutor.kt:214)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1.extractResult(GithubApiRequests.kt:28)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1.extractResult(GithubApiRequests.kt:26)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base$execute$1.process(GithubApiRequestExecutor.kt:122)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:523)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:499)
    at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:59)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:352)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base.execute(GithubApiRequestExecutor.kt:111)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$WithTokenAuth.execute(GithubApiRequestExecutor.kt:72)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader.loadAndDownscale(CachingGithubUserAvatarLoader.kt:58)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader.access$loadAndDownscale(CachingGithubUserAvatarLoader.kt:22)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1$1.compute(CachingGithubUserAvatarLoader.kt:46)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1$1.compute(CachingGithubUserAvatarLoader.kt:22)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$3(CoreProgressManager.java:180)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:180)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1.get(CachingGithubUserAvatarLoader.kt:46)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1.get(CachingGithubUserAvatarLoader.kt:22)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
2018-12-14 15:56:31,676 [1668308]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/login?return_to=https%3A%2F%2FMY_COMPANY_URL%2Favatars%2Fu%2F9264%3F GET : Connected 
2018-12-14 15:56:31,677 [1668309]   INFO - .CachingGithubUserAvatarLoader - Error loading image from https://MY_COMPANY_URL/avatars/u/9264? 
java.lang.IllegalStateException: ImageIO.read(stream) must not be null
    at org.jetbrains.plugins.github.api.GithubApiContentHelper.loadImage(GithubApiContentHelper.kt:64)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1$extractResult$1.convert(GithubApiRequests.kt:29)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1$extractResult$1.convert(GithubApiRequests.kt:26)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base$createResponse$1.handleBody(GithubApiRequestExecutor.kt:214)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1.extractResult(GithubApiRequests.kt:28)
    at org.jetbrains.plugins.github.api.GithubApiRequests$CurrentUser$getAvatar$1.extractResult(GithubApiRequests.kt:26)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base$execute$1.process(GithubApiRequestExecutor.kt:122)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:523)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:499)
    at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:59)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:352)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base.execute(GithubApiRequestExecutor.kt:111)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$WithTokenAuth.execute(GithubApiRequestExecutor.kt:72)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader.loadAndDownscale(CachingGithubUserAvatarLoader.kt:58)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader.access$loadAndDownscale(CachingGithubUserAvatarLoader.kt:22)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1$1.compute(CachingGithubUserAvatarLoader.kt:46)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1$1.compute(CachingGithubUserAvatarLoader.kt:22)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$3(CoreProgressManager.java:180)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:180)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1.get(CachingGithubUserAvatarLoader.kt:46)
    at org.jetbrains.plugins.github.util.CachingGithubUserAvatarLoader$requestAvatar$1$1.get(CachingGithubUserAvatarLoader.kt:22)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
2018-12-14 15:56:32,848 [1669480]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/repos/MY_ORG/MY_REPO/pulls/3863 get pull request : Connecting 
2018-12-14 15:56:33,488 [1670120]  DEBUG - b.api.GithubApiRequestExecutor - Request: https://MY_COMPANY_URL/api/v3/repos/MY_ORG/MY_REPO/pulls/3863 GET : Connected 
2018-12-14 15:56:33,571 [1670203]  DEBUG - b.api.GithubApiRequestExecutor - Can't get pull request 
org.jetbrains.plugins.github.exceptions.GithubJsonException: Can't get pull request

Couldn't parse GitHub response
    at org.jetbrains.plugins.github.api.GithubApiContentHelper.readJson(GithubApiContentHelper.kt:46)
    at org.jetbrains.plugins.github.api.GithubApiRequest$Companion$parseJsonResponse$1.convert(GithubApiRequest.kt:165)
    at org.jetbrains.plugins.github.api.GithubApiRequest$Companion$parseJsonResponse$1.convert(GithubApiRequest.kt:163)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base$createResponse$1.readBody(GithubApiRequestExecutor.kt:210)
    at org.jetbrains.plugins.github.api.GithubApiRequest$Companion.parseJsonResponse(GithubApiRequest.kt:165)
    at org.jetbrains.plugins.github.api.GithubApiRequest$Companion.access$parseJsonResponse(GithubApiRequest.kt:163)
    at org.jetbrains.plugins.github.api.GithubApiRequest$Get$Json.extractResult(GithubApiRequest.kt:61)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base$execute$1.process(GithubApiRequestExecutor.kt:122)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:523)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:499)
    at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:59)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:352)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$Base.execute(GithubApiRequestExecutor.kt:111)
    at org.jetbrains.plugins.github.api.GithubApiRequestExecutor$WithTokenAuth.execute(GithubApiRequestExecutor.kt:72)
    at org.jetbrains.plugins.github.pullrequest.data.GithubPullRequestsDataLoader$DataTask.run(GithubPullRequestsDataLoader.kt:90)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.jetbrains.io.mandatory.JsonMandatoryException: Field 'labels' is mandatory, but missing in response
    at org.jetbrains.io.mandatory.NullCheckingFactory$1.read(NullCheckingFactory.java:57)
    at com.google.gson.Gson.fromJson(Gson.java:927)
    at com.google.gson.Gson.fromJson(Gson.java:892)
    at org.jetbrains.plugins.github.api.GithubApiContentHelper.readJson(GithubApiContentHelper.kt:43)
    ... 27 more

Can someone please help?

3

There are 3 answers

1
yole On

This is a bug in IntelliJ IDEA. I've reported it to our issue tracker.

1
Ivan Semenov On

I can't comment on yole's answer (not enough karma) and I couldn't pinpoint your profile on youtrack but I need some more logs to determine the root-cause of the issue.

Please enable debug logs (Help - Debug Log Settings...) for the following categories:

#org.jetbrains.plugins.github.api.GithubApiRequestExecutor

Then please reproduce the issue and share the entire logs folder zipped in the youtrack issue. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241085 to locate the logs.

4
Dmitrii Smirnov On

The actual issue appears to be Field 'labels' is mandatory, but missing in response. The field was implemented in GitHub Enterprise 2.13 only, and earlier versions do not return it in response.

The issue has been fixed in dev version and the will be backported to 2018.3 soon - https://youtrack.jetbrains.com/issue/IDEA-200881

As a side note, GitHub Enterprise 2.12 has been discontinued https://enterprise.github.com/releases/series/2.12 and most likely it will be updated soon in your organization, and PR will work even with the current IDE version