microsoft / azure-devops-intellij

IntelliJ IDEA plug-in for Visual Studio Team Services and Team Foundation Server (TFS)
MIT License
151 stars 95 forks source link

Failed to Create Pull Request #397

Open ShawnTalbert opened 4 years ago

ShawnTalbert commented 4 years ago

I'm getting an error when trying to create a pull request via the plugin. I cloned the repo using a PAT and am able to do other operations (pull/push) without trouble.

The error message is a tooltip popup as follows:

Failed to Create Pull Request
API resource location 9946fd70-0d40-406e-b686-b4744cbbcc37 is not registered on https://dev.azure.com/rsm-appdev. HTTP 302 Found

Here's except from idea.log

getUpdatedContext found/created context on first attempt 2020-09-16 08:07:42,309 [2845145] WARN - request.CreatePullRequestModel - Create pull request failed com.microsoft.alm.client.model.VssResourceNotFoundException: API resource location 9946fd70-0d40-406e-b686-b4744cbbcc37 is not registered on https://dev.azure.com/rsm-appdev. HTTP 302 Found at com.microsoft.alm.client.AlmHttpClientBase.createTarget(AlmHttpClientBase.java:138) at com.microsoft.alm.client.AlmHttpClientBase.createRequest(AlmHttpClientBase.java:463) at com.microsoft.alm.plugin.context.rest.GitHttpClientEx.createPullRequest(GitHttpClientEx.java:54) at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel.doCreatePullRequest(CreatePullRequestModel.java:576) at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel.access$1000(CreatePullRequestModel.java:80) at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel$4$1.onSuccess(CreatePullRequestModel.java:500) at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel$4$1.onSuccess(CreatePullRequestModel.java:483) at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1089) at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30) at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1174) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:719) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:124) at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1056) at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel$4.run(CreatePullRequestModel.java:483) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:935) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:442) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: javax.ws.rs.RedirectionException: HTTP 302 Found at org.glassfish.jersey.client.JerseyInvocation.createExceptionForFamily(JerseyInvocation.java:1095) at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1081) at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:859) at org.glassfish.jersey.client.JerseyInvocation.access$500(JerseyInvocation.java:75) at org.glassfish.jersey.client.JerseyInvocation$2.completed(JerseyInvocation.java:816) at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:203) at org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:61) at org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:154) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:244) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288) at org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:154) at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:480) at org.glassfish.jersey.client.ClientRuntime.lambda$null$3(ClientRuntime.java:163) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:244) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288) at org.glassfish.jersey.client.ClientRuntime.lambda$createRunnableForAsyncProcessing$4(ClientRuntime.java:139) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

ausfestivus commented 4 years ago

Receiving the same error. idea.log:

2020-09-19 12:49:16,202 [185942287]   WARN - request.CreatePullRequestModel - Create pull request failed 
java.lang.AssertionError: Unexpected exception type: Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server
    at com.microsoft.alm.client.model.WrappedException.Unwrap(WrappedException.java:186)
    at com.microsoft.alm.client.AlmHttpClientBase.handleResponse(AlmHttpClientBase.java:536)
    at com.microsoft.alm.client.AlmHttpClientBase.sendRequest(AlmHttpClientBase.java:508)
    at com.microsoft.alm.client.AlmHttpClientBase.sendRequest(AlmHttpClientBase.java:518)
    at com.microsoft.alm.plugin.context.rest.GitHttpClientEx.createPullRequest(GitHttpClientEx.java:63)
    at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel.doCreatePullRequest(CreatePullRequestModel.java:576)
    at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel.access$1000(CreatePullRequestModel.java:80)
    at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel$4$1.onSuccess(CreatePullRequestModel.java:500)
    at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel$4$1.onSuccess(CreatePullRequestModel.java:483)
    at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1089)
    at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
    at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1174)
    at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:719)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:124)
    at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1056)
    at com.microsoft.alm.plugin.idea.git.ui.pullrequest.CreatePullRequestModel$4.run(CreatePullRequestModel.java:483)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:935)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:442)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)

Only seems to be happening on a single repo though. PRs into other repos arent affected.