microsoft / azure-devops-intellij

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

Cannot create a workspace, crash with ToolBadExitCodeException: KEY_TF_BAD_EXIT_CODE #392

Closed Nerves82 closed 4 years ago

Nerves82 commented 4 years ago

I am attempting to create a workspace from TFSVC in Jetbrains Rider on Mac, I get to the project select screen and select the project I want to create a workspace for and when I click "Create Workspace" it crashes and I am shown the below exception. I have tried with and without "Use built in reactive client when possible" selected and I have tried adjusting the reactive client memory limit from the default of 2048mb down to 512mb and 1024mb. I have also opened the TF executable and changed the memory value as suggested here but still get the crash.

Jetbrains Rider version 2020.2 Azure DeveOps plugin 1.161.0 tee-clc/14.134.0_1 installed

com.microsoft.alm.plugin.external.exceptions.ToolBadExitCodeException: KEY_TF_BAD_EXIT_CODE
at com.microsoft.alm.plugin.external.tools.TfTool.throwBadExitCode(TfTool.java:109)
at com.microsoft.alm.plugin.external.commands.Command$1.completed(Command.java:180)
at com.microsoft.alm.plugin.external.ToolRunner$ListenerProxy.completed(ToolRunner.java:295)
at com.microsoft.alm.plugin.external.ToolRunner$ProcessWaiter.run(ToolRunner.java:333)

When running a "Hello World" Xamarin Forms project I am getting this exception in the Jetbrains IDE Fatal Errors Pane,

Catch

java.lang.IllegalArgumentException: toolProcess at com.microsoft.alm.common.utils.ArgumentHelper.checkNotNull(ArgumentHelper.java:21) at com.microsoft.alm.plugin.external.ToolRunner.sendArgsViaStandardInput(ToolRunner.java:201) at com.microsoft.alm.plugin.external.ToolRunnerCache.getRunningToolRunner(ToolRunnerCache.java:64) at com.microsoft.alm.plugin.external.commands.Command.run(Command.java:143) at com.microsoft.alm.plugin.external.commands.Command.runSynchronously(Command.java:223) at com.microsoft.alm.plugin.external.utils.CommandUtils.getPartialWorkspace(CommandUtils.java:136) at com.microsoft.alm.plugin.idea.tfvc.extensions.TfvcRootChecker.lambda$isRoot$1(TfvcRootChecker.java:73) at com.microsoft.alm.plugin.idea.tfvc.ui.settings.EULADialog.executeWithGuard(EULADialog.java:226) at com.microsoft.alm.plugin.idea.tfvc.extensions.TfvcRootChecker.isRoot(TfvcRootChecker.java:69) at com.jetbrains.rider.projectView.actions.projectTemplating.backend.VcsIntegrationPanel$3.invoke(VcsIntegrationPanel.kt:60) at com.jetbrains.rider.projectView.actions.projectTemplating.backend.VcsIntegrationPanel$3.invoke(VcsIntegrationPanel.kt:25) at com.jetbrains.rd.util.reactive.Signal.fire(Signal.kt:30) at com.jetbrains.rd.util.reactive.Property.setValue(Property.kt:13) at com.jetbrains.rd.util.reactive.Property.set(Property.kt:6) at com.jetbrains.rider.projectView.actions.projectTemplating.backend.ReSharperTemplateGeneratorBase.updateInfo(ReSharperTemplateGeneratorBase.kt:271) at com.jetbrains.rider.projectView.actions.projectTemplating.backend.ReSharperTemplateGeneratorBase.initialize(ReSharperTemplateGeneratorBase.kt:157) at com.jetbrains.rider.projectView.actions.projectTemplating.backend.ReSharperSolutionTemplateGenerator.(ReSharperSolutionTemplateGenerator.kt:29) at com.jetbrains.rider.projectView.actions.projectTemplating.backend.ReSharperSolutionTemplate.createGenerator(ReSharperSolutionTemplate.kt:22) at com.jetbrains.rider.projectView.actions.projectTemplating.impl.ProjectTemplateDialog.a(ProjectTemplateDialog.kt:264) at com.jetbrains.rider.projectView.actions.projectTemplating.impl.ProjectTemplateDialog.a(ProjectTemplateDialog.kt:330) at com.jetbrains.rider.projectView.actions.projectTemplating.impl.ProjectTemplateDialog.(ProjectTemplateDialog.kt:155) at com.jetbrains.rider.projectView.actions.projectTemplating.impl.ProjectTemplateDialog.(ProjectTemplateDialog.kt:49) at com.jetbrains.rider.projectView.actions.projectTemplating.impl.ProjectTemplateDialog$Companion.show(ProjectTemplateDialog.kt:60) at com.jetbrains.rider.projectView.actions.projectTemplating.impl.ProjectTemplateDialog$Companion.show$default(ProjectTemplateDialog.kt:57) at com.jetbrains.rider.projectView.actions.NewSolutionAction.actionPerformed(NewSolutionAction.kt:12) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282) at com.intellij.openapi.actionSystem.ex.ActionUtil.invokeAction(ActionUtil.java:446) at com.intellij.openapi.actionSystem.ex.ActionUtil.invokeAction(ActionUtil.java:431) at com.intellij.ui.components.labels.ActionLink$1.linkSelected(ActionLink.java:47) at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:138) at com.intellij.ui.components.labels.ActionLink.doClick(ActionLink.java:56) at com.intellij.ui.components.labels.LinkLabel$MyMouseHandler.mouseReleased(LinkLabel.java:322) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6650) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345) at java.desktop/java.awt.Component.processEvent(Component.java:6415) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5025) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:967) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:904) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:836) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:450) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:449) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:503) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

ForNeVeR commented 4 years ago

Could you attach IDE logs please? Help → Diagnostic Tools → Show Log in Finder.

From the error message itself, it is unclear what the particular problem is.

Nerves82 commented 4 years ago

Here are the logs. Archive.zip

Nerves82 commented 4 years ago

Any update on this?

ForNeVeR commented 4 years ago

@Nerves82, your logs indicate that the TFVC client has crashed its JVM inside of the the native function Java_com_microsoft_tfs_jni_internal_keychain_NativeKeychain_nativeFindInternetPassword.

The client could try to use this function for some of its functionality (e.g. to read or store the TFVC password), but actually it shouldn't do that.

There's a fork of TFVC client, where this functionality (managing the native keychain) was removed, so this function could no longer crash. Could you try using it? Download the client (e.g. TEE-CLC-14.135.1.zip) from JetBrains fork's Releases page.

ForNeVeR commented 4 years ago

Since the issue doesn't look like actionable from the plugin side (and we have a workaround implemented in the TFVC client itself), I'm going to close the issue.