LiLittleCat / intellij-chatgpt

A plugin that integrates ChatGPT and other third-party mirror sites into JetBrains IDEs.一个将 ChatGPT 和其他第三方镜像网站整合到 JetBrains IDEs 的插件。
https://plugins.jetbrains.com/plugin/20629-chatgpt-tool
Apache License 2.0
141 stars 17 forks source link

Clion - It's show the following message #16

Closed SaidBenaissa closed 1 year ago

SaidBenaissa commented 1 year ago

log:

java.lang.Throwable: Cookie setting took more than 10000 ms at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.ui.jcef.JBCefCookieManager.setCookie(JBCefCookieManager.java:235) at com.lilittlecat.chatgpt.window.ChatGPTToolWindow.<init>(ChatGPTToolWindow.java:78) at com.lilittlecat.chatgpt.window.ChatGPTToolWindowFactory.createToolWindowContent(ChatGPTToolWindowFactory.java:27) at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:543) at com.intellij.openapi.wm.impl.ToolWindowImpl.scheduleContentInitializationIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:522) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doShowWindow(ToolWindowManagerImpl.kt:1009) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl(ToolWindowManagerImpl.kt:946) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.activateToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:662) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.activateToolWindow$intellij_platform_ide_impl$default(ToolWindowManagerImpl.kt:630) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.activated$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:1947) at com.intellij.toolWindow.StripeButton._init_$lambda$0(StripeButton.kt:62) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:411) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392) at com.intellij.toolWindow.StripeButton.processMouseEvent(StripeButton.kt:248) at java.desktop/java.awt.Component.processEvent(Component.java:6413) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752) 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:751) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480) 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)

Screenshot 2023-03-09 at 18 44 08
LiLittleCat commented 1 year ago

I will add some alternative websites to avoid this problem.

SaidBenaissa commented 1 year ago

Hi @LiLittleCat Could you let me know if you fixed this issue and released it to the plug-in?

LiLittleCat commented 1 year ago

Hi @LiLittleCat Could you let me know if you fixed this issue and released it to the plug-in?

Hi @SaidBenaissa,

Yes, I have fixed this issue. This exception occurred because I stored the session token and set it to JCEF to log in when restarting the IDE automatically, and I still don't know why it occurs occasionally. There were similar issues, such as #6 and #9. I thought it was because the timeout time was too short, so I make it to 1000ms, but it didn't work either. So I removed the session token storage after testing that the cookie will remain when restarting the IDE even though I don't store it and set it manually.

This fix is in version 1.1.0, and it will be available in JetBrains Marketplace soon.

Please let me know if there are any issues after upgrading to 1.1.0. Thank you. :smile: