IDEA啟動失敗報錯解決思路
背景:在IDEA里安裝插件失敗,重啟后直接進不去了,然后分析問題解決問題的過程記錄下來。方便下次遇到快速解決。也是一種解決問題的思路,分享出去。
啟動報錯信息
Internal error. Please refer to https://jb.gg/ide/critical-startup-errorscom.intellij.diagnostic.PluginException: Key com.itangcent.idea.plugin.settings.xml.ApplicationSettingsComponent duplicated; existingAdapter: ServiceAdapter(descriptor=ServiceDescriptor(interface='null', serviceImplementation='com.itangcent.idea.plugin.settings.xml.ApplicationSettingsComponent', testServiceImplementation='null', headlessImplementation='null', overrides=false, configurationSchemaKey='null', preload=FALSE, client=null), pluginDescriptor=PluginDescriptor(name=EasyYapi, id=com.itangcent.idea.plugin.easy-yapi, descriptorPath=easy-yapi-java.xml, path=d:\user\wfq100426\Application Data\JetBrains\IdeaIC2023.2\plugins\easy-yapi, version=2.6.8.212.0, package=null, isBundled=false)); descriptor=com.itangcent.idea.plugin.settings.xml.ApplicationSettingsComponent, app=Application (containerState PRE_INIT) , current plugin=com.itangcent.idea.plugin.easy-apiat com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:566)at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:257)at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:48)at com.intellij.ide.bootstrap.AppPreInitKt$initServiceContainer$2.invokeSuspend(appPreInit.kt:41)at com.intellij.ide.bootstrap.AppPreInitKt$initServiceContainer$2.invoke(appPreInit.kt)at com.intellij.ide.bootstrap.AppPreInitKt$initServiceContainer$2.invoke(appPreInit.kt)at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)at com.intellij.diagnostic.TracerKt.subtask(tracer.kt:45)at com.intellij.diagnostic.TracerKt.subtask$default(tracer.kt:34)at com.intellij.ide.bootstrap.AppPreInitKt.initServiceContainer(appPreInit.kt:40)at com.intellij.ide.bootstrap.AppPreInitKt$initServiceContainer$1.invokeSuspend(appPreInit.kt)at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:270)at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)-----
Your JRE: 17.0.8+7-b1000.22 amd64 (JetBrains s.r.o.)
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.2.2\jbr
閱讀報錯信息并解決問題
報錯類型:Internal error 內部錯誤
日志中說請看這個地址:https://jb.gg/ide/critical-startup-errors
com.intellij.diagnostic.PluginException: Key com.itangcent.idea.plugin.settings.xml.ApplicationSettingsComponent duplicated; existingAdapter:
插件異常,應用配置組件重復
那原因就是插件搞的報錯導致啟動失敗
current plugin=com.itangcent.idea.plugin.easy-api
那就是easy-api這個插件搞的
再去看日志里提到的這個網址
這個網址講述了這個啟動錯誤可能的一些原因以及一些解決辦法
我們這種插件異常符合第二種解決方案,直接去插件目錄里刪除這個問題插件
2. Delete the third-party plug-ins directory (idea.plugins.path in the user's home directory, depends on the OS and IDE version. Please be aware that default locations have changed in 2020.1 release). You can bisect the plug-ins to find the offending one and remove only that plug-in, keeping the working plug-ins.
這個第二點的 third-party plug-ins directory 這個文字是個超鏈接,點開地址 https://intellij-support.jetbrains.com/hc/en-us/articles/206544519
這里可以看到他們標明了各平臺IDEA的一些文件存儲的位置
我目前用的windows,plugins目錄就是
%APPDATA%\JetBrains\IntelliJIdea2022.2\plugins
%APPDATA%是個APP數據目錄的系統變量,在windows打開cmd輸出看下我電腦實際路徑是多少
復制這個路徑拼接好插件路徑進入這個目錄
好的很啊,事情變得有趣了,手動進去APPDATA目錄看看去
可以看到我已經手動找到了他們的Plugins目錄,原因很簡單,新版本的目錄變了,文檔的是根據IntelliJIdea2022.2版本的情況寫的,所以這個地方靈活應變一下就可以解決了
我把這個easy-api(報錯的)和easy-yapi(安裝這個插件過程后重啟IDEA啟動報錯)兩個涉事嫌疑犯目錄剪切出來放到最外面去(不要刪除,防止又要放回去~)
再啟動idea,成功!
我再重新安裝easy-yapi去就可以了
安裝成功