lppedd / idea-conventional-commit

Context and template-based completion for conventional/semantic commits.
https://plugins.jetbrains.com/plugin/13389-conventional-commit
MIT License
336 stars 18 forks source link

java.lang.NoSuchMethodException on opening IntelliJ 2021.2 #65

Closed npaul-cs closed 3 years ago

npaul-cs commented 3 years ago

Every time I open IntelliJ, i get the following Exception/Error report. IntelliJ Build: #UI-212.4746.92 / 2021.2 Ultimate Conventional Commit: 0.18.0

Let me know if you need anything else ;)

java.lang.NoSuchMethodException: com.intellij.openapi.util.registry.Registry.addKeys(java.util.List)
    at java.base/java.lang.Class.getDeclaredMethod(Class.java:2475)
    at com.github.lppedd.cc.CCRegistry.addKeys(CCRegistry.kt:21)
    at com.github.lppedd.cc.CCApplicationLoadListener.addRegistryKeys(CCApplicationLoadListener.kt:29)
    at com.github.lppedd.cc.CCApplicationLoadListener.beforeApplicationLoaded(CCApplicationLoadListener.kt:16)
    at com.intellij.ide.ApplicationLoadListener.beforeApplicationLoaded(ApplicationLoadListener.java:25)
    at com.intellij.idea.ApplicationLoader.initConfigurationStore(ApplicationLoader.kt:322)
    at com.intellij.idea.ApplicationLoader.startApp(ApplicationLoader.kt:121)
    at com.intellij.idea.ApplicationLoader.access$startApp(ApplicationLoader.kt:1)
    at com.intellij.idea.ApplicationLoader$initApplication$2$1.accept(ApplicationLoader.kt:81)
    at com.intellij.idea.ApplicationLoader$initApplication$2$1.accept(ApplicationLoader.kt)
    at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:753)
    at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731)
    at java.base/java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2108)
    at com.intellij.idea.ApplicationLoader$initApplication$2.apply(ApplicationLoader.kt:75)
    at com.intellij.idea.ApplicationLoader$initApplication$2.apply(ApplicationLoader.kt)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
    at com.intellij.idea.ApplicationLoader$initApplication$3.execute(ApplicationLoader.kt:107)
    at java.base/java.util.concurrent.CompletableFuture$UniCompletion.claim(CompletableFuture.java:568)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1069)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1742)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
    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)
lppedd commented 3 years ago

Hi @jpaul-cs! You need version 0.19.0 for 2021.2. Didn't it pop out as an update?

npaul-cs commented 3 years ago

No, and I'm not able to update it via IntelliJ :/ (Unless I would try to install binaries manually)

lppedd commented 3 years ago

@jpaul-cs could you screenshot the plugin manager dialog on IntelliJ? So I can check what you're actually seeing for this plugin.

npaul-cs commented 3 years ago

image

lppedd commented 3 years ago

@jpaul-cs thanks! Gonna ask JetBrains directly soon, as I have no idea what's happening.

lppedd commented 3 years ago

@jpaul-cs ok, question: why is this plugin "bundled"? Did you install it manually in the IDE installation directory?

npaul-cs commented 3 years ago

That might be the reason, yes. I uninstalled and removed the plugin completely, with the goal to reinstall it by marketplace. But unfortunately it wasn't possible.

image

lppedd commented 3 years ago

@jpaul-cs I don't understand why it's saying "version '0.18.0'" when you're downloading 0.19.0. Isn't it strange?

npaul-cs commented 3 years ago

Exactly. I was confused as well...

npaul-cs commented 3 years ago

Are there any local files which should be deleted, which I may forgot?

But I can indeed confirm, that the downloaded Zipfile (downloaded by marketplace) contains the 0.18.0 version. (I ensured it was deleted before, and this is a fresh download)

image

lppedd commented 3 years ago

@jpaul-cs dang, very very strange. And no, you do not have to delete anything.

So basically you're/ve:

Right?

lppedd commented 3 years ago

I think you've recently updated IDEA from an older version, and plugins have been somehow migrated incorrectly. That's why you have my plugin as "bundled".

npaul-cs commented 3 years ago

So here is my case: I had conventional commit installed on my laptop with IntelliJ 2021.1. Then came 2021.2 and the plugin still worked (without updating to 0.19.0)

So I updated my DesktopPC to 2021.2 and tried to install conventional commits afterwards (as it wasn't installed before). It didn't work, so I manually downloaded the plugin and installed it as binary manually.

Then the minor update 2021.2.1 came and lead to this ticket.

After your reply, I manually uninstalled the plugin and restarted IntelliJ (deleted the plugin folder from C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins)

Now I am still not able to install it via marketplace, as the wrong version is downloaded.

lppedd commented 3 years ago

Ok, so the root cause is the that the plugin was installed under, somehow, C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins. What if you manually download the zip file from the Marketplace and use "Plugins > Install plugin from disk"?

npaul-cs commented 3 years ago

Worked! I hope, the next updates will work too ;)