azure-devops-intellij: Any action causes KEY_TF_AUTH_FAIL error

Hello. I’m getting KEY_TF_AUTH_FAIL error when I’m trying to make any TFVS action using JetBrains Webstorm or JetBrains Rider.

This error causes both on Windows and MacOS, on several different machines.

I’ve tried TFS Plugin with the same tfvs repository and it worked. However it has thrown 401 error and I’ve been able to fix it with next java flags:

-Dorg.jetbrains.tfsIntegration.webservice.auth.ntlm.message1flags=0x00088207 -Dorg.jetbrains.tfsIntegration.webservice.auth.ntlm.message3flags=0x00088205

Now, I want to use your plugin, I still have java flags described above - how can I fix this error?

idea.log:

2019-11-20 20:56:28,468 [ 165702]   INFO - in.idea.common.utils.VcsHelper - getRepositoryContext: cache miss: /Users/egorgrushin/projects/Portal/Src/Portal.Web.SPA 
2019-11-20 20:56:28,468 [ 165702]   INFO - lugin.external.ToolRunnerCache - getRunningToolRunner: toolLocation={0} 
2019-11-20 20:56:28,468 [ 165702]   INFO - lugin.external.ToolRunnerCache - getRunningToolRunner: fast version - 14.134.0.201804261732 
2019-11-20 20:56:28,468 [ 165702]   INFO - lugin.external.ToolRunnerCache - getRunningToolRunner: key=/usr/local/cellar/tee-clc/14.134.0/bin/tf|/users/egorgrushin/projects/portal/src/portal.web.spa 
2019-11-20 20:56:28,468 [ 165702]   INFO - alm.plugin.external.ToolRunner - sendArgsViaStandardInput: proceedWithArgs: workfold -noprompt ******** 
2019-11-20 20:56:28,468 [ 165702]   INFO - lugin.external.ToolRunnerCache - updateCachedInstance: caching a new runner: key=/usr/local/cellar/tee-clc/14.134.0/bin/tf|/users/egorgrushin/projects/portal/src/portal.web.spa 
2019-11-20 20:56:28,468 [ 165702]   INFO - alm.plugin.external.ToolRunner - ToolRunner.start: toolLocation = /usr/local/Cellar/tee-clc/14.134.0/bin/tf 
2019-11-20 20:56:28,468 [ 165702]   INFO - alm.plugin.external.ToolRunner - ToolRunner.start: workingDirectory = /Users/egorgrushin/projects/Portal/Src/Portal.Web.SPA 
2019-11-20 20:56:28,468 [ 165702]   INFO - alm.plugin.external.ToolRunner - arguments: @ 
2019-11-20 20:56:28,865 [ 166099]   INFO - ugin.external.commands.Command - CMD: =============================================================================== 
2019-11-20 20:56:28,865 [ 166099]   INFO - ugin.external.commands.Command - CMD: Workspace:  Foris 
2019-11-20 20:56:28,865 [ 166099]   INFO - ugin.external.commands.Command - CMD: Collection: https://tfs.mtsit.com/sts/ 
2019-11-20 20:56:36,361 [ 173595]   INFO - ugin.external.commands.Command - ERROR: An error occurred: Access denied connecting to TFS server https://tfs.mtsit.com/ (authenticating as username) 
2019-11-20 20:56:36,392 [ 173626]   WARN - .commands.FindWorkspaceCommand - Authentication exception hit when running 'tf workfold' 
2019-11-20 20:56:36,392 [ 173626]   WARN - ugin.external.commands.Command - CMD: parsing output failed 
com.microsoft.alm.plugin.external.exceptions.ToolAuthenticationException: KEY_TF_AUTH_FAIL
	at com.microsoft.alm.plugin.external.commands.FindWorkspaceCommand.throwIfError(FindWorkspaceCommand.java:130)
	at com.microsoft.alm.plugin.external.commands.FindWorkspaceCommand.parseOutput(FindWorkspaceCommand.java:88)
	at com.microsoft.alm.plugin.external.commands.FindWorkspaceCommand.parseOutput(FindWorkspaceCommand.java:24)
	at com.microsoft.alm.plugin.external.commands.Command$1.completed(Command.java:178)
	at com.microsoft.alm.plugin.external.ToolRunner$ListenerProxy.completed(ToolRunner.java:295)
	at com.microsoft.alm.plugin.external.ToolRunner$ProcessWaiter.run(ToolRunner.java:333)
2019-11-20 20:56:36,392 [ 173626]   WARN - ugin.external.commands.Command - Error: com.microsoft.alm.plugin.external.exceptions.ToolAuthenticationException: KEY_TF_AUTH_FAIL
Sync stack trace: java.base/java.lang.Thread.getStackTrace(Thread.java:1606)
    at com.microsoft.alm.plugin.external.commands.Command.runSynchronously(Command.java:243)
    at com.microsoft.alm.plugin.idea.common.utils.VcsHelper.getRepositoryContext(VcsHelper.java:174)
    at com.microsoft.alm.plugin.idea.tfvc.core.TFSVcs.getServerContext(TFSVcs.java:254)
    at com.microsoft.alm.plugin.idea.tfvc.core.TFSHistoryProvider.createSessionFor(TFSHistoryProvider.java:83)
    at com.microsoft.alm.plugin.idea.tfvc.core.TFSHistoryProvider.reportAppendableHistory(TFSHistoryProvider.java:119)
    at com.intellij.openapi.vcs.history.VcsCachingHistory.reportHistory(VcsCachingHistory.java:90)
    at com.intellij.openapi.vcs.history.VcsCachingHistory.access$000(VcsCachingHistory.java:31)
    at com.intellij.openapi.vcs.history.VcsCachingHistory$1.run(VcsCachingHistory.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:408)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    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)
    at java.base/java.lang.Thread.run(Thread.java:834) 
2019-11-20 20:56:36,393 [ 173627]   INFO - ugin.external.commands.Command - 7.924708397 sec - elapsed time for workfold -noprompt ******** 
2019-11-20 20:56:36,393 [ 173627]   WARN - in.idea.common.utils.VcsHelper - Unable to get repository context for the project. 
com.microsoft.alm.plugin.external.exceptions.ToolAuthenticationException: KEY_TF_AUTH_FAIL
	at com.microsoft.alm.plugin.external.commands.FindWorkspaceCommand.throwIfError(FindWorkspaceCommand.java:130)
	at com.microsoft.alm.plugin.external.commands.FindWorkspaceCommand.parseOutput(FindWorkspaceCommand.java:88)
	at com.microsoft.alm.plugin.external.commands.FindWorkspaceCommand.parseOutput(FindWorkspaceCommand.java:24)
	at com.microsoft.alm.plugin.external.commands.Command$1.completed(Command.java:178)
	at com.microsoft.alm.plugin.external.ToolRunner$ListenerProxy.completed(ToolRunner.java:295)
	at com.microsoft.alm.plugin.external.ToolRunner$ProcessWaiter.run(ToolRunner.java:333)
2019-11-20 20:56:36,393 [ 173627]   INFO - in.idea.common.utils.VcsHelper - getRepositoryContext: We couldn't determine the VCS provider, so returning null. 
2019-11-20 20:56:36,393 [ 173627]   INFO - m.plugin.idea.tfvc.core.TFSVcs - TFSVcs.getServerContext repositoryContext is null: true 

About this issue

Most upvoted comments

We don’t support the server workspaces yet, but we’re very close to enabilng the support. Feel free to watch over #325 (there’s already an open PR, #360).