robocorp / robotframework-lsp

Robocorp extensions for VS Code: Robocorp Code and RFW LSP
https://robocorp.com/docs/developer-tools/visual-studio-code
Apache License 2.0
206 stars 93 forks source link

Plugin stops working when moving between branches #653

Closed Sam-Eldin closed 2 years ago

Sam-Eldin commented 2 years ago

Describe the bug The plugin works great, but whenever I move checkout to another branch the plugin stop working.

To Reproduce Steps to reproduce the behavior:

  1. Open PyCharm and load project, do few goto Definition to validate that everything is working
  2. Checkout to another branch, PyCharm will tell you that the plugin encountered an error.

Expected behavior For the plugin to keep working, goto definition and so on

Screenshots NONE

Versions:

IDE error log Error getting RobotProjectPreferences

java.lang.Throwable: Control-flow exceptions (like ProcessCanceledException) should never be logged: ignore for explicitly started processes or rethrow to handle on the outer process level at com.intellij.openapi.diagnostic.Logger.ensureNotControlFlow(Logger.java:234) at com.intellij.idea.IdeaLogger.doLogError(IdeaLogger.java:210) at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:189) at com.intellij.openapi.diagnostic.Logger.error(Logger.java:204) at robocorp.robot.intellij.RobotProjectPreferences.getInstance(RobotProjectPreferences.java:1408) at robocorp.robot.intellij.RobotFrameworkLanguage.createProcessBuilderFromPreferences(RobotFrameworkLanguage.java:107) at robocorp.robot.intellij.RobotFrameworkLanguage.createLanguageServerDefinition(RobotFrameworkLanguage.java:528) at robocorp.robot.intellij.RobotFrameworkLanguage.getLanguageDefinition(RobotFrameworkLanguage.java:513) at robocorp.robot.intellij.RobotLanguageDefinitionProvider.getLanguageDefinition(RobotLanguageDefinitionProvider.java:10) at robocorp.lsp.intellij.FeatureSymbols$WorkspaceSymbolProvider.workspaceSymbols(FeatureSymbols.java:142) at robocorp.lsp.intellij.FeatureSymbols.processNames(FeatureSymbols.java:209) at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel.processContributorNames(ContributorsBasedGotoByModel.java:127) at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel$1.processInReadAction(ContributorsBasedGotoByModel.java:86) at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel$1.processInReadAction(ContributorsBasedGotoByModel.java:80) at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:11) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:865) at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61) at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:11) at com.intellij.concurrency.JobLauncherImpl.lambda$invokeConcurrentlyUnderProgress$0(JobLauncherImpl.java:52) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818) at com.intellij.concurrency.JobLauncherImpl.lambda$invokeConcurrentlyUnderProgress$1(JobLauncherImpl.java:52) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084) at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66) at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104) at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) Caused by: com.intellij.openapi.progress.ProcessCanceledException at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:156) at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:147) at com.intellij.openapi.progress.util.AbstractProgressIndicatorExBase.checkCanceled(AbstractProgressIndicatorExBase.java:103) at com.intellij.openapi.progress.util.ProgressWrapper.checkCanceled(ProgressWrapper.java:96) at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:143) at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:210) at com.intellij.serviceContainer.ContainerUtilKt.checkCanceledIfNotInClassInit(containerUtil.kt:16) at com.intellij.serviceContainer.BaseComponentAdapter.checkContainerIsActive(BaseComponentAdapter.kt:135) at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:72) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:60) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:595) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:569) at com.intellij.openapi.client.ClientAwareComponentManager.getFromSelfOrCurrentSession(ClientAwareComponentManager.kt:37) at com.intellij.openapi.client.ClientAwareComponentManager.getService(ClientAwareComponentManager.kt:22) at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:27) at robocorp.robot.intellij.RobotProjectPreferences.getInstance(RobotProjectPreferences.java:1406) ... 32 more

fabioz commented 2 years ago

I've done some changes which could fix it given your traceback (but I'm not sure since I wasn't able to reproduce it here).

Can you get the build (intellij-distribution) from:

https://github.com/robocorp/robotframework-lsp/actions/runs/2184301995

and check if it works for you with those changes?

See: https://github.com/robocorp/robotframework-lsp/blob/master/robotframework-ls/docs/faq.md#how-to-install-a-build-from-github-on-intellij for instructions on how to install the build locally.

Sam-Eldin commented 2 years ago

Hey, Update: I'm not longer getting the IDE Error which is nice (I think), but the problem is still the same,

LOGS These are all the logs that I could gather according to: https://github.com/robocorp/robotframework-lsp/blob/master/robotframework-ls/docs/reporting_issues.md#intellij-logs

image Pycharm_log.zip robotframework_ls.log.lint.server-api.11576.zip