dgs-intellij-plugin icon indicating copy to clipboard operation
dgs-intellij-plugin copied to clipboard

Plugin is giving error / not compatible for latest IntelliJ version

Open suraj0223 opened this issue 1 year ago • 4 comments

Hi team, I recently updated IntelliJ to 2023.3, but when I refreshed my project. The DGS plugin**[Version: 1.3.4**] complains about the below error.

java.lang.Throwable: TreeUI should be accessed only from EDT
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.ui.tree.ui.DefaultTreeUI.isValid(DefaultTreeUI.java:216)
	at com.intellij.ui.tree.ui.DefaultTreeUI.getRowCount(DefaultTreeUI.java:772)
	at java.desktop/javax.swing.JTree.getRowCount(JTree.java:1697)
	at com.intellij.util.ui.tree.TreeUtil.collectExpandedObjects(TreeUtil.java:192)
	at com.intellij.util.ui.tree.TreeUtil.collectExpandedPaths(TreeUtil.java:175)
	at com.intellij.ide.util.treeView.TreeState.createOn(TreeState.java:173)
	at com.intellij.ide.util.treeView.TreeState.createOn(TreeState.java:169)
	at com.intellij.ide.projectView.impl.AbstractProjectViewPane.createTreeState(AbstractProjectViewPane.java:696)
	at com.intellij.ide.projectView.impl.AbstractProjectViewPane.saveExpandedPaths(AbstractProjectViewPane.java:702)
	at com.intellij.ide.scopeView.ScopeViewPane.updateFromRoot(ScopeViewPane.java:225)
	at com.intellij.ide.projectView.impl.ProjectViewImpl.refresh(ProjectViewImpl.java:1154)
	at com.netflix.dgs.plugin.services.internal.DgsServiceImpl.getDgsComponentIndex(DgsServiceImpl.java:147)
	at com.netflix.dgs.plugin.provider.DgsComponentsRootNode.getChildren(DgsProjectStructureProvider.kt:73)
	at com.netflix.dgs.plugin.provider.DgsComponentsRootNode.update(DgsProjectStructureProvider.kt:60)
	at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:88)
	at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:32)
	at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:486)
	at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:467)
	at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:460)
	at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:418)
	at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:329)
	at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:323)
	at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:343)
	at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.computeNode(AsyncTreeModel.java:613)
	at com.intellij.ui.tree.AsyncTreeModel$Command.computeNode(AsyncTreeModel.java:489)
	at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:381)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:111)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:108)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:73)
	at com.intellij.util.concurrency.Invoker.startTask(Invoker.java:238)
	at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:194)
	at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:177)
	at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:508)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

Here are my specs about IntelliJ after the update.

IntelliJ IDEA 2023.3 (Ultimate Edition)
Build #IU-233.11799.241, built on December 2, 2023
Expiration date: December 15, 2023
Runtime version: 17.0.9+7-b1087.7 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.1.2
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.github.copilot (1.4.4.3955)
  com.jetbrains.packagesearch.intellij-plugin (233.11799.196)
  io.karatelabs.intellij (1.8.0.371-233)
  com.intellij.lang.jsgraphql (233.11799.172)
  com.netflix.graphql.dgs.intellijplugin (1.3.4)
  Pythonid (233.11799.241)
  izhangzhihao.rainbow.brackets (2023.3.9-233)
  org.sonarlint.idea (10.1.1.77150)
  org.jetbrains.plugins.docker.gateway (233.11799.244)
Kotlin: 233.11799.241-IJ

Could Someone from the DGS team help me fix this issue? I would really appreciate the help. Thank you in advance.

suraj0223 avatar Dec 12 '23 20:12 suraj0223

I also checked that no recent official release of dgs that is compatible with the latest version of IntelliJ is available.

https://plugins.jetbrains.com/plugin/17852-dgs/versions

suraj0223 avatar Dec 12 '23 20:12 suraj0223

I just tried it and seems to work ok. Is there anything specific you are trying to do that triggers this exception?

srinivasankavitha avatar Dec 12 '23 21:12 srinivasankavitha

No, IntelliJ gives when I re-load the project after all the indexing happens. It gives me this prompt.

image

suraj0223 avatar Dec 13 '23 08:12 suraj0223

I tried it with a bunch of different projects (reloading and other operations) using the latest IntelliJ version and DGS plugin and I am unable to reproduce the error. I'm not sure what is triggering this on your side. Maybe you also need to update graphql-js plugin version? If not, we'll probably need to wait to hear from more folks to report with additional information so we have something reproducible for debugging.

srinivasankavitha avatar Dec 13 '23 18:12 srinivasankavitha