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

Constant exception thrown in JetBrains Rider #589

Open BoredDevBrian opened 2 months ago

BoredDevBrian commented 2 months ago

For the longest time now, we're constantly had an exception being thrown in Rider when using the Azure DevOps plugin.

The error occurs on start up, regardless of having tried to remove and add the plugin again.

java.lang.Throwable: com.microsoft.alm.plugin.context.ServerContextManager$Holder <clinit> requests com.microsoft.alm.plugin.idea.common.settings.TeamServicesSecrets instance. Class initialization must not depend on services. Consider using instance of the service on-demand instead. at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376) at com.intellij.serviceContainer.ComponentManagerImplKt.checkOutsideClassInitializer(ComponentManagerImpl.kt:1588) at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1557) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:746) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:690) at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:23) at com.microsoft.alm.plugin.idea.common.settings.TeamServicesSecrets.getInstance(TeamServicesSecrets.java:23) at com.microsoft.alm.plugin.idea.common.settings.TeamServicesSettingsService.restoreServerContexts(TeamServicesSettingsService.java:75) at com.microsoft.alm.plugin.idea.common.services.ServerContextStoreImpl.restoreServerContexts(ServerContextStoreImpl.java:25) at com.microsoft.alm.plugin.context.ServerContextManager.restoreFromSavedState(ServerContextManager.java:178) at com.microsoft.alm.plugin.context.ServerContextManager.<init>(ServerContextManager.java:71) at com.microsoft.alm.plugin.context.ServerContextManager$Holder.<clinit>(ServerContextManager.java:55) at com.microsoft.alm.plugin.context.ServerContextManager.getInstance(ServerContextManager.java:79) at com.microsoft.alm.plugin.operations.Operation.getServerContext(Operation.java:164) at com.microsoft.alm.plugin.operations.BuildStatusLookupOperation.doWork(BuildStatusLookupOperation.java:149) at com.microsoft.alm.plugin.operations.OperationExecutor$1.run(OperationExecutor.java:56) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)

mat-kap commented 1 month ago

I've the same exception on every rider start and sometimes on Azure interaction. This is very frustrating because the functionality of the plugin is good and my workday is a lot easier with it.

Stacktrace: java.lang.Throwable: com.microsoft.alm.plugin.context.ServerContextManager$Holder <clinit> requests com.microsoft.alm.plugin.idea.common.settings.TeamServicesSecrets instance. Class initialization must not depend on services. Consider using instance of the service on-demand instead. at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376) at com.intellij.serviceContainer.ComponentManagerImplKt.checkOutsideClassInitializer(ComponentManagerImpl.kt:1590) at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1559) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:755) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:699) at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:23) at com.microsoft.alm.plugin.idea.common.settings.TeamServicesSecrets.getInstance(TeamServicesSecrets.java:23) at com.microsoft.alm.plugin.idea.common.settings.TeamServicesSettingsService.restoreServerContexts(TeamServicesSettingsService.java:75) at com.microsoft.alm.plugin.idea.common.services.ServerContextStoreImpl.restoreServerContexts(ServerContextStoreImpl.java:25) at com.microsoft.alm.plugin.context.ServerContextManager.restoreFromSavedState(ServerContextManager.java:178) at com.microsoft.alm.plugin.context.ServerContextManager.<init>(ServerContextManager.java:71) at com.microsoft.alm.plugin.context.ServerContextManager$Holder.<clinit>(ServerContextManager.java:55) at com.microsoft.alm.plugin.context.ServerContextManager.getInstance(ServerContextManager.java:79) at com.microsoft.alm.plugin.operations.Operation.getServerContext(Operation.java:164) at com.microsoft.alm.plugin.operations.BuildStatusLookupOperation.doWork(BuildStatusLookupOperation.java:149) at com.microsoft.alm.plugin.operations.OperationExecutor$1.run(OperationExecutor.java:56) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)

BoredDevBrian commented 1 month ago

I've the same exception on every rider start and sometimes on Azure interaction. This is very frustrating because the functionality of the plugin is good and my workday is a lot easier with it.

Stacktrace: java.lang.Throwable: com.microsoft.alm.plugin.context.ServerContextManager$Holder <clinit> requests com.microsoft.alm.plugin.idea.common.settings.TeamServicesSecrets instance. Class initialization must not depend on services. Consider using instance of the service on-demand instead. at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376) at com.intellij.serviceContainer.ComponentManagerImplKt.checkOutsideClassInitializer(ComponentManagerImpl.kt:1590) at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1559) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:755) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:699) at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:23) at com.microsoft.alm.plugin.idea.common.settings.TeamServicesSecrets.getInstance(TeamServicesSecrets.java:23) at com.microsoft.alm.plugin.idea.common.settings.TeamServicesSettingsService.restoreServerContexts(TeamServicesSettingsService.java:75) at com.microsoft.alm.plugin.idea.common.services.ServerContextStoreImpl.restoreServerContexts(ServerContextStoreImpl.java:25) at com.microsoft.alm.plugin.context.ServerContextManager.restoreFromSavedState(ServerContextManager.java:178) at com.microsoft.alm.plugin.context.ServerContextManager.<init>(ServerContextManager.java:71) at com.microsoft.alm.plugin.context.ServerContextManager$Holder.<clinit>(ServerContextManager.java:55) at com.microsoft.alm.plugin.context.ServerContextManager.getInstance(ServerContextManager.java:79) at com.microsoft.alm.plugin.operations.Operation.getServerContext(Operation.java:164) at com.microsoft.alm.plugin.operations.BuildStatusLookupOperation.doWork(BuildStatusLookupOperation.java:149) at com.microsoft.alm.plugin.operations.OperationExecutor$1.run(OperationExecutor.java:56) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)

I'm also noticing that intellisense/intellij fails when i first start up Rider - but unsure if this is the cause of it. I have to restart Rider to get it working. Happens each and every time.

Are you also seeing this behavior @mat-kap ?

mat-kap commented 1 month ago

@BoredDevBrian No I think this is another bug (https://youtrack.jetbrains.com/issue/RIDER-116340/Code-Parsing-and-Navigation-Fails-in-Rider-After-Opening-a-Solution). This was fixed in the current EAP of Rider. I think there should be an upcoming release of Rider where this bugfix is included soon.

BoredDevBrian commented 1 month ago

@BoredDevBrian No I think this is another bug (https://youtrack.jetbrains.com/issue/RIDER-116340/Code-Parsing-and-Navigation-Fails-in-Rider-After-Opening-a-Solution). This was fixed in the current EAP of Rider. I think there should be an upcoming release of Rider where this bugfix is included soon.

That's fantastic news... now we just need to get his one fixed and i'm all gucci :D

maybe i should try looking at the EAP versions of Rider.. but am hesitant because i don't want EAP issues to roll up into the project i'm working on

bobonov commented 3 weeks ago

Same error in PhpStorm 2024.2.4, today update Build #PS-242.23726.107, built on October 23, 2024

Jonatha1983 commented 1 week ago

Hello @BoredDevBrian @krukow @klikh @mat-kap

I noticed you're experiencing some issues with the Azure DevOps plugin for IntelliJ. I just wanted to let you know about an alternative that might help - my AZD IntelliJ Plugin.

Although it's not free, you can benefit from a 10-day free trial to see if it suits your needs. You can read reviews and see what people are saying about it on the JetBrains Marketplace and in this JetBrains blog post:

Plugin Spotlight on JetBrains Marketplace AZD Plugin

For more information, check out the documentation. If you have bugs to report or feature requests, feel free to use the issue tracker.

Cheers,

Jonathan