chengpohi / edql

Elasticsearch Query GUI Client
https://plugins.jetbrains.com/plugin/16364-elasticsearch-query--edql
Apache License 2.0
41 stars 2 forks source link

NoSuchElementException : Collection is empty. #33

Closed a1e1c1f5 closed 10 months ago

a1e1c1f5 commented 10 months ago

image

java.util.NoSuchElementException: Collection is empty. at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:201) at com.github.chengpohi.action.function.EDQLFunctionDTO$Companion.buildSystemFunction(EDQLFunctionDTO.kt:42) at com.github.chengpohi.action.function.EDQLFunctionsNode.parseElib(EDQLFunctionsNode.kt:44) at com.github.chengpohi.action.function.EDQLFunctionsNode.getChildren(EDQLFunctionsNode.kt:26) at com.github.chengpohi.action.function.EDQLFunctionsNode.getChildren(EDQLFunctionsNode.kt:14) at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:38) at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:411) at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:329) at com.intellij.ui.tree.StructureTreeModel$Node.isModelLeaf(StructureTreeModel.java:584) at com.intellij.ui.tree.StructureTreeModel.isLeaf(StructureTreeModel.java:365) at com.intellij.ui.tree.LeafState.get(LeafState.java:62) at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.load(AsyncTreeModel.java:597) at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:570) at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:464) at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:430) at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:306) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76) at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:188) at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:165) at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:433) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31) at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215) 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:833)

chengpohi commented 10 months ago

Hi @a1e1c1f5 please try the latest version: v1.10.1, and also you can download from Jetbrains market v1.10.1

This is caused a bug for check files empty issue:

val vf = host.edqlFiles().firstOrNull() ?: return null

Thanks your feedback, If you meet any issue please let me know.

a1e1c1f5 commented 10 months ago

image It`s works well now ! Thanks for your effort ! By the way, it still pop alert although works well.

chengpohi commented 10 months ago

it still pop alert although works well.

this is caused for EDQL will load infos: indices, nodes, plugins, Scripts, Ingests etc. even though concurrently load these info, but maybe some api request still meet timeout. after meet these notification you can refresh node by refresh icon

I will optimize this notification in later release.