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

Error when starting Rider with plugin enabled #462

Open karolis-k opened 2 years ago

karolis-k commented 2 years ago

The following error is thrown when I activate plugin. Only thing that shows something from the VCS menu is TFVC->Edit workspace. Other things doesn't seem to work. It just shows that Default changelist is updating.

java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.jetbrains.rd.util.reactive.RdFault: workingFolder.localItem must not be null, reason: java.lang.IllegalStateException: workingFolder.localItem must not be null
    at com.microsoft.tfs.TfsClient$Companion.loadMappings(TfsClient.kt:61)
    at com.microsoft.tfs.TfsClient$Companion.getDetailedWorkspaceInfo(TfsClient.kt:89)
    at com.microsoft.tfs.MainKt$initializeModel$3.invoke(Main.kt:100)
    at com.microsoft.tfs.MainKt$initializeModel$3.invoke(Main.kt)
    at com.jetbrains.rd.framework.impl.RdEndpoint$set$2.invoke(RdTask.kt:203)
    at com.jetbrains.rd.framework.impl.RdEndpoint$set$2.invoke(RdTask.kt:176)
    at com.jetbrains.rd.framework.impl.RdEndpoint.onWireReceived(RdTask.kt:226)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:31)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:14)
    at com.jetbrains.rd.util.threading.SingleThreadSchedulerBase$queue$1.run(SingleThreadScheduler.kt:41)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

    at com.microsoft.alm.plugin.idea.tfvc.core.TfvcClient.getDetailedWorkspaceInfo(TfvcClient.java:361)
    at com.microsoft.alm.plugin.idea.tfvc.core.TfvcWorkspaceLocator.getPartialWorkspace(TfvcWorkspaceLocator.java:72)
    at com.microsoft.alm.plugin.idea.tfvc.core.TfvcWorkspaceLocator.getPartialWorkspace(TfvcWorkspaceLocator.java:90)
    at com.microsoft.alm.plugin.idea.tfvc.core.tfs.TFVCUtil.getMappingsFromWorkspace(TFVCUtil.java:111)
    at com.microsoft.alm.plugin.idea.tfvc.core.tfs.TFVCUtil.filterValidTFVCPaths(TFVCUtil.java:78)
    at com.microsoft.alm.plugin.idea.tfvc.core.TFSChangeProvider.getChanges(TFSChangeProvider.java:95)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.actualUpdate(ChangeListManagerImpl.java:704)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.iterateScopes(ChangeListManagerImpl.java:606)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$11(ChangeListManagerImpl.java:512)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$14(ChangeListManagerImpl.java:511)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$11(BackgroundTaskUtil.java:241)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:270)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:248)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:240)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.updateImmediately(ChangeListManagerImpl.java:465)
    at com.intellij.openapi.vcs.changes.UpdateRequestsQueue$MyRunnable.run(UpdateRequestsQueue.java:212)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl$MyLoggingRunnable.run(ChangeListManagerImpl.java:1713)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
    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:829)
Caused by: java.util.concurrent.ExecutionException: com.jetbrains.rd.util.reactive.RdFault: workingFolder.localItem must not be null, reason: java.lang.IllegalStateException: workingFolder.localItem must not be null
    at com.microsoft.tfs.TfsClient$Companion.loadMappings(TfsClient.kt:61)
    at com.microsoft.tfs.TfsClient$Companion.getDetailedWorkspaceInfo(TfsClient.kt:89)
    at com.microsoft.tfs.MainKt$initializeModel$3.invoke(Main.kt:100)
    at com.microsoft.tfs.MainKt$initializeModel$3.invoke(Main.kt)
    at com.jetbrains.rd.framework.impl.RdEndpoint$set$2.invoke(RdTask.kt:203)
    at com.jetbrains.rd.framework.impl.RdEndpoint$set$2.invoke(RdTask.kt:176)
    at com.jetbrains.rd.framework.impl.RdEndpoint.onWireReceived(RdTask.kt:226)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:31)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:14)
    at com.jetbrains.rd.util.threading.SingleThreadSchedulerBase$queue$1.run(SingleThreadScheduler.kt:41)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
    at com.microsoft.alm.plugin.idea.tfvc.core.TfvcClient.getDetailedWorkspaceInfo(TfvcClient.java:359)
    ... 39 more
Caused by: com.jetbrains.rd.util.reactive.RdFault: workingFolder.localItem must not be null, reason: java.lang.IllegalStateException: workingFolder.localItem must not be null
    at com.microsoft.tfs.TfsClient$Companion.loadMappings(TfsClient.kt:61)
    at com.microsoft.tfs.TfsClient$Companion.getDetailedWorkspaceInfo(TfsClient.kt:89)
    at com.microsoft.tfs.MainKt$initializeModel$3.invoke(Main.kt:100)
    at com.microsoft.tfs.MainKt$initializeModel$3.invoke(Main.kt)
    at com.jetbrains.rd.framework.impl.RdEndpoint$set$2.invoke(RdTask.kt:203)
    at com.jetbrains.rd.framework.impl.RdEndpoint$set$2.invoke(RdTask.kt:176)
    at com.jetbrains.rd.framework.impl.RdEndpoint.onWireReceived(RdTask.kt:226)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:31)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:14)
    at com.jetbrains.rd.util.threading.SingleThreadSchedulerBase$queue$1.run(SingleThreadScheduler.kt:41)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

    at com.jetbrains.rd.framework.RdTaskResult$Companion.read(TaskInterfaces.kt:23)
    at com.jetbrains.rd.framework.impl.RdCall.onWireReceived(RdTask.kt:102)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:31)
    at com.jetbrains.rd.framework.MessageBroker$invoke$1.invoke(MessageBroker.kt:14)
    at com.jetbrains.rd.util.threading.SynchronousScheduler.queue(SynchronousScheduler.kt:15)
    at com.jetbrains.rd.framework.MessageBroker.invoke(MessageBroker.kt:29)
    at com.jetbrains.rd.framework.MessageBroker.invoke$default(MessageBroker.kt:25)
    at com.jetbrains.rd.framework.MessageBroker.dispatch(MessageBroker.kt:96)
    at com.jetbrains.rd.framework.SocketWire$Base.readMsg(SocketWire.kt:151)
    at com.jetbrains.rd.framework.SocketWire$Base.receiverProc(SocketWire.kt:119)
    at com.jetbrains.rd.framework.SocketWire$Base.access$receiverProc(SocketWire.kt:65)
    at com.jetbrains.rd.framework.SocketWire$Base$1.invoke(SocketWire.kt:102)
    at com.jetbrains.rd.framework.SocketWire$Base$1.invoke(SocketWire.kt:65)
    at com.jetbrains.rd.util.reactive.Signal.fire(Signal.kt:29)
    at com.jetbrains.rd.util.reactive.OptProperty.set(Property.kt:33)
    at com.jetbrains.rd.framework.SocketWire$Server$thread$1.invoke(SocketWire.kt:369)
    at com.jetbrains.rd.framework.SocketWire$Server$thread$1.invoke(SocketWire.kt:338)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
ForNeVeR commented 2 years ago

This is very strange. It means the client has detected a local workspace mapping without a local part, which doesn't make sense to me.

Could you please call a command tf workfold in your workspace directory to gather some details?

As a workaround, try disabling the reactive client in settings and see if that works.

karolis-k commented 2 years ago

tf workfold returns all workspaces if I run it from project folder:

Workspace : USER1 (Kniuksta Karolis)
Collection: http://b-tfspdpad:8080/tfs/xcity
 $/[edited]: C:\[edited]
 (cloaked) $/[edited]/123:
 (cloaked) $/[edited]/124:
...

And returns Unable to determine the source control server. if I run it from somewhere else.

If I disable reactive client it somewhat starts working (e.g. shows pending changes). But everything is very slow (e.g. adding file takes 1.5 minutes) and sometimes it makes Rider totally unresponsive, to the point where I have to kill the process from task manager.

Note, (I didn't mention this earlier) - I think this started happening only after latest version update. Though it was quite long time since I last enabled it. I tried plugin when new version was released as I naively hoped that maybe after this update plugin will at last become usable :(.

ForNeVeR commented 2 years ago

Okay, that's interesting. It's possible that the issue is caused by cloaked folders, I'll investigate. Thanks for help.

rajeshaz09 commented 2 years ago

@ForNeVeR Latest version has issues(1.162.0). I removed plugin and installed previous one (1.161.2) from https://plugins.jetbrains.com/plugin/7981-azure-devops/versions Previous version is working fine.