RuntimeException: java.lang.reflect.InvocationTargetException
See original GitHub issueWebStorm encountered this issue and said I should report it to you 😉
Steps to reproduce
I guess this happened, like this:
- I wrote a commit message. (and selected one of one file from a changeset)
- I used WebStorm’s cock wheel there to set a different commit author than myself.
- Switched branch to main branch, updated from origin and finally created a new branch with
/
i.e. git-directory-like asexample/hereWegGo
.
Then this happened.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:132)
at com.intellij.util.EventDispatcher.throwExceptions(EventDispatcher.java:158)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:402)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:379)
at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:33)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:178)
at com.sun.proxy.$Proxy118.dirtyUnder(Unknown Source)
at git4idea.annotate.GitRepositoryForAnnotationsListener$1.repositoryChanged(GitRepositoryForAnnotationsListener.java:18)
at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:674)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:649)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:422)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:397)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:379)
at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:33)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:185)
at com.sun.proxy.$Proxy117.repositoryChanged(Unknown Source)
at git4idea.repo.GitRepositoryUpdater.filesChanged(GitRepositoryUpdater.java:105)
at com.intellij.vfs.AsyncVfsEventsPostProcessorImpl$processEvents$1.run(AsyncVfsEventsPostProcessorImpl.kt:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:254)
at com.intellij.vfs.AsyncVfsEventsPostProcessorImpl.processEvents(AsyncVfsEventsPostProcessorImpl.kt:63)
at com.intellij.vfs.AsyncVfsEventsPostProcessorImpl.access$processEvents(AsyncVfsEventsPostProcessorImpl.kt:32)
at com.intellij.vfs.AsyncVfsEventsPostProcessorImpl$queue$1.consume(AsyncVfsEventsPostProcessorImpl.kt:34)
at com.intellij.vfs.AsyncVfsEventsPostProcessorImpl$queue$1.consume(AsyncVfsEventsPostProcessorImpl.kt:32)
at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$0(QueueProcessor.java:81)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$1(QueueProcessor.java:81)
at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$3(QueueProcessor.java:214)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$4(QueueProcessor.java:214)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:265)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.github.lppedd.cc.vcs.CCVcsHandler.readMetadataComp(CCVcsHandler.kt:143)
at com.github.lppedd.cc.vcs.CCVcsHandler.fetchCommitsFromLogProvider(CCVcsHandler.kt:127)
at com.github.lppedd.cc.vcs.CCVcsHandler.access$fetchCommitsFromLogProvider(CCVcsHandler.kt:29)
at com.github.lppedd.cc.vcs.CCVcsHandler$fetchCommits$1.invoke(CCVcsHandler.kt:103)
at com.github.lppedd.cc.vcs.CCVcsHandler$fetchCommits$1.invoke(CCVcsHandler.kt:29)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:752)
at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:782)
at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:773)
at com.github.lppedd.cc.vcs.CCVcsHandler.fetchCommits(CCVcsHandler.kt:104)
at com.github.lppedd.cc.vcs.CCVcsHandler.refreshCachedValues(CCVcsHandler.kt:91)
at com.github.lppedd.cc.vcs.CCVcsHandler.access$refreshCachedValues(CCVcsHandler.kt:29)
at com.github.lppedd.cc.vcs.CCVcsHandler$MyVcsLogRefresher.refresh(CCVcsHandler.kt:211)
at git4idea.log.GitLogProvider.lambda$subscribeToRootRefreshEvents$4(GitLogProvider.java:397)
at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:674)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:649)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:422)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:393)
... 42 more
Caused by: com.intellij.openapi.vcs.VcsException: not a git repository (or any of the parent directories): .git
at git4idea.commands.GitCommandResult.throwOnError(GitCommandResult.java:151)
at git4idea.history.GitLogUtil.collectMetadata(GitLogUtil.java:137)
at git4idea.log.GitLogProvider.readMetadata(GitLogProvider.java:347)
... 64 more
System
WebStorm 2021.1 Build #WS-211.6693.108, built on April 5, 2021 Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 1996M Cores: 4 Registry: ide.intellij.laf.enable.animation=true, debugger.watches.in.variables=false, ide.balloon.shadow.size=0 Non-Bundled Plugins: com.berzanmikaili.intellij.monokai_pro (2.0.2c), com.github.lppedd.idea-conventional-commit (0.18.0), com.intellij.ideolog (203.0.27.0), com.mallowigi.idea (13.1), com.tylerthrailkill.intellij.solarized (3.0.0), mobi.hsz.idea.gitignore (4.1.0), com.intellij.swagger (211.6693.108), izhangzhihao.rainbow.brackets (6.17)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@rklec this should be solved in 0.20.*, as I have added additional checks in
CCVcsHandler
.I’ll close for now, but let me know in case it happens again.
The error happens in this method.
https://github.com/lppedd/idea-conventional-commit/blob/f2edc7cc99ba2e1f261e9d537786fc71b4a8239f/src/main/kotlin/com/github/lppedd/cc/vcs/CCVcsHandler.kt#L130-L155
The
@Compatibility(minVersion = "203.4203.26")
annotation indicates I’ve done this to provide this feature to all the IDEs, from 2019.2 to 2021.*, and that to avoid Reflection I’d have to be at least on 2020.3.The error arises because they changed their API and my Reflection code still uses the old version, probably.