asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
355 stars 145 forks source link

Plugin does not load due to "Unknown element: plugin-id" error #1106

Closed Javaru closed 2 years ago

Javaru commented 2 years ago

Observed vs. expected behavior

Immediately after upgrading the AsciiDoc plugin to v0.37.32, upon restart, IntelliJ IDEA threw an exception with the message "Unknown element: plugin-id". (Full stacktrace shown below.) Given I had only upgraded AsciiDoc and another plugin, I was fairly certain the issue was with one of them. The absence of AsciiDoc features seemed to indicate it was the AsciiDoc plugin. A series of disabling and enabling the AsciiDoc plugin (with restarts in between) confirmed it as the exception would occur only on a restart after enabling the AsciiDoc plugin.

I then went to try a reinstall in the event of corrupt file or such. I uninstalled the plugin and restarted IntelliJ IDEA. After installing v07.37.32 again, upon closing the plugin dialog, IntelliJ IDEA immediately threw the "Unknown element: plugin-id" exception again.

Note, this cannot be reported via the ErrorReportSubmitter since it is preventing the plugin from loading, and thus shows as an error in "IDEA Core".

Steps to reproduce

Install v0.37.32 of the plugin.

Environment

Plugin Version: 0.37.32

IntelliJ Details:

IntelliJ IDEA 2022.1.4 (Ultimate Edition) Build #IU-221.6008.13, built on July 19, 2022 Runtime version: 11.0.15+10-b2043.56 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 3072M Cores: 8 Registry: debugger.click.disable.breakpoints=true undo.documentUndoLimit=250 analyze.exceptions.on.the.fly=true ide.remove.help.button.from.dialogs=true undo.globalUndoLimit=20 ide.tree.clearOnHideTime=10800000 documentation.show.toolbar=true editor.richcopy.max.size.megabytes=20 show.live.templates.in.completion=false

Non-Bundled Plugins: ski.chrzanow.foldableprojectview (1.1.2) org.nik.presentation-assistant (1.0.10) org.intellij.RegexpTester (1.0.8) com.nasller.CodeGlancePro (1.4.5) com.jetbrains.php.framework (221.6008.13) com.jetbrains.edu (2022.6-2022.1-569) com.intellij.plugins.watcher (221.6008.13) com.intellij.plugins.macoskeymap (221.6008.13) com.intellij.ideolog (203.0.30.0) ru.artyushov (1.3.0) org.jetbrains.kotlin (221-1.7.10-release-333-IJ5591.52) io.intellij-sdk-thread-access (2.0) org.jetbrains.idea.grammar (2021.1.2) com.alayouni.ansiHighlight (22.1.3) PsiViewer (221-SNAPSHOT) LogSupportLite (0.5.1) GrepConsole (12.14.211.6693.0) mobi.hsz.idea.gitignore (4.4.0) FrameSwitcher (3.31.0-212) Dilbert (1.9.0.168) DBN (3.3.1923.0) CMD Support (1.0.5) BrowseWordAtCaret (3.0.5) MavenRunHelper (4.20.213.3714.1) net.javaru.idea.frc (2.1.1-2022.1) com.jetbrains.lang.ejs (221.6008.13) com.intellij.plugins.html.instantEditing (221.6008.13) com.intellij.jsf (221.6008.13) Pythonid (221.6008.13) zielu.gittoolbox (212.9.7) JProfiler (19.5)

Kotlin: 221-1.7.10-release-333-IJ5591.52

Exception Stacktrqce

java.lang.Throwable: Unknown element: plugin-id
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
    at com.intellij.ide.plugins.XmlReader.readRootElementChild(XmlReader.kt:289)
    at com.intellij.ide.plugins.XmlReader.access$readRootElementChild(XmlReader.kt:1)
    at com.intellij.ide.plugins.XmlReader.readModuleDescriptor(XmlReader.kt:92)
    at com.intellij.ide.plugins.XmlReader.readModuleDescriptor(XmlReader.kt:45)
    at com.intellij.ide.plugins.PluginDescriptorLoader.loadDescriptorFromJar(PluginDescriptorLoader.kt:142)
    at com.intellij.ide.plugins.PluginDescriptorLoader.loadDescriptorFromFileOrDir(PluginDescriptorLoader.kt:203)
    at com.intellij.ide.plugins.PluginDescriptorLoader.loadDescriptorFromFileOrDir$default(PluginDescriptorLoader.kt:188)
    at com.intellij.ide.plugins.LoadDescriptorsFromDirAction$compute$$inlined$use$lambda$1.compute(PluginDescriptorLoader.kt:644)
    at com.intellij.ide.plugins.LoadDescriptorsFromDirAction$compute$$inlined$use$lambda$1.compute(PluginDescriptorLoader.kt:642)
    at java.base/java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:94)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:396)
    at java.base/java.util.concurrent.ForkJoinTask.invokeAll(ForkJoinTask.java:853)
    at com.intellij.ide.plugins.LoadDescriptorsFromDirAction.compute(PluginDescriptorLoader.kt:658)
    at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:396)
    at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:721)
    at java.base/java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2423)
    at com.intellij.ide.plugins.PluginDescriptorLoader.loadBundledDescriptorsAndDescriptorsFromDir(PluginDescriptorLoader.kt:444)
    at com.intellij.ide.plugins.PluginDescriptorLoader.loadDescriptors(PluginDescriptorLoader.kt:385)
    at com.intellij.ide.plugins.PluginManagerCore.lambda$getOrScheduleLoading$5(PluginManagerCore.java:620)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
    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)
ahus1 commented 2 years ago

Thank for for this detailed error description. I'm sorry to hear the installation is giving you problems.

I also see that you've already tried different things to fix this, and this includes the recommendations I would have given to fix this.

With the IDE version and operating system listed above, I tried to reproduce the problem, so far without success. Installations from the marketplace and from a manually downloaded file for the release v0.37.32 worked on my machine without problems.

Like you wrote in the description, the exception reads as if there is a corrupted file.

Could you please one more thing, that is installing a manually downloaded file from the marketplace?

Please let me know if this solve it for your.

Javaru commented 2 years ago

Sorry, I failed to mention in my original post that I had tried a manual install via the downloaded file for v0.37.32, and still experienced the issue. That said, v0.37.33 installed without issues for me. Perhaps the v0.37.32 file was corrupted in a CDN or ISP cache and I kept getting the corrupted file ¯_(ツ)_/¯. Either that or it was Gremlins :) Thanks for the followup.