alibaba-cloud-toolkit / cosy

阿里云智能编码插件品牌升级为通义灵码,欢迎查看通义灵码帮助手册,同时也期待你在 IDE 客户端中将插件升级,我在通义灵码等你,一起开启智能编码之旅。
https://tongyi.aliyun.com/lingma
435 stars 28 forks source link

IDEA 2023.1.1 启动时cosy报错 java.lang.Throwable: Do not use constructor injection (requestorClass=com.soldevelo.qaplug.scanner.AnalysisProjectProfileManager) #184

Open milestone-l opened 1 year ago

milestone-l commented 1 year ago

cosy.log内容 2023-05-09T16:08:58.586+0800 INFO Checking update ... 2023-05-09T16:08:58.591+0800 INFO System platform x86_64_windows 2023-05-09T16:09:03.603+0800 ERROR Cosy update failed: failed to initialize client 2023-05-09T16:09:06.397+0800 INFO Checking update ... 2023-05-09T16:09:06.401+0800 INFO System platform x86_64_windows 2023-05-09T16:09:10.637+0800 ERROR Cosy update failed: failed to initialize client 2023-05-09T16:09:10.988+0800 INFO ===== Starting cosy service ===== 2023-05-09T16:09:10.993+0800 INFO Config Local exclude lang: 2023-05-09T16:09:10.993+0800 INFO Preparing inference environment 2023-05-09T16:09:10.994+0800 ERROR Failed to read raw environment file 2023-05-09T16:09:10.994+0800 ERROR Local inference environment is not ready, please try to restart IDE

IDEA信息 版本:2023.1.1

IDEA内异常信息 java.lang.Throwable: Do not use constructor injection (requestorClass=com.soldevelo.qaplug.scanner.AnalysisProjectProfileManager) at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:78) at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:1041) at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:36) at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133) at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:77) at com.intellij.serviceContainer.ComponentManagerImpl.createComponents(ComponentManagerImpl.kt:451) at com.intellij.openapi.project.impl.DefaultProjectImpl.init(DefaultProject.java:316) at com.intellij.openapi.project.impl.DefaultProject$1.init(DefaultProject.java:50) at com.intellij.openapi.project.impl.DefaultProjectTimed.get(DefaultProjectTimed.java:33) at com.intellij.openapi.project.impl.DefaultProject.getDelegate(DefaultProject.java:138) at com.intellij.openapi.project.impl.DefaultProject.getMessageBus(DefaultProject.java:250) at com.intellij.openapi.project.impl.ProjectManagerImpl.getDefaultProject(ProjectManagerImpl.kt:215) at com.alibaba.p3c.idea.component.AliProjectComponent.getProject(AliProjectComponent.kt:62) at com.alibaba.p3c.idea.component.AliProjectComponent.projectOpened(AliProjectComponent.kt:124) at com.intellij.openapi.project.impl.ProjectManagerImplKt$runInitProjectActivities$$inlined$launchAndMeasure$2.invokeSuspend(startUpMeasurer.kt:44) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:35) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:456) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:666) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:570) at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:570) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:994) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:994) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

zxdxjtu commented 1 year ago

IDEA侧的报错不是cosy插件报出来的,是p3c,也就是Java开发规约检测插件报的。 cosy的日志看起来是环境文件加载有问题,请问下网络是否联通?请尝试kill掉cosy进程,然后删除.cosy目录,重新IDEA试试呢

lifeizhaopaopao commented 1 year ago

我的电脑是mac也是相同的问题 按照FAQ中的描述操作无解

zxdxjtu commented 1 year ago

@lifeizhaopaopao 能贴一下~/.cosy/log里面的cosy.log以及cosylocal.log吗?上面插件端的报错是代码规约插件的报错,和cosy没关系

lifeizhaopaopao commented 1 year ago
image image image image

只有这些文件和这个日志,网络是通的

zxdxjtu commented 1 year ago

@lifeizhaopaopao 看起来像是模型环境没有下载成功,试试纯本地版本呢?删除cosy进程,删除.cosy目录,安装all-in-one版本离线包,重启IDEA:https://toolkit.aliyun.com/idea/cosy-intellij-beta-latest-all-in-one.zip

lifeizhaopaopao commented 1 year ago

@lifeizhaopaopao 看起来像是模型环境没有下载成功,试试纯本地版本呢?删除cosy进程,删除.cosy目录,安装all-in-one版本离线包,重启IDEA:https://toolkit.aliyun.com/idea/cosy-intellij-beta-latest-all-in-one.zip

我意外重启了一下电脑,在进去idea之后就可以运行了

milestone-l commented 1 year ago

@lifeizhaopaopao idea install all-in-one版还是不行,在尝试前清理了 .cosy目录等所有相关文件, 有可能是网络问题,如需配置代理应该如何处理?