Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Restart Cody in case of webview renderer crash#2645

Merged
pkukielka merged 1 commit intomainfrom
pkukielka/implement-webview-restart
Nov 15, 2024
Merged

Restart Cody in case of webview renderer crash#2645
pkukielka merged 1 commit intomainfrom
pkukielka/implement-webview-restart

Conversation

@pkukielka
Copy link
Copy Markdown
Contributor

Changes

Looks like webview renderer process crashes from time to time for some users - especially in cases like long running IDE or suspending/unsuspending OS.

We might not be able to fully fix the root cause, but we should handle the crash and recover from it.
For now, I'm just restarting the agent which also restarts the webview.
I was trying to only restart the webviews and keep the agent running, but I did not managed to do it on the first try.
Let's merge this as it improves current situation significantly, and I will work on better/quicker restoration of the state in the followup PR(s).

Test plan

  1. Start IntelliJ with Cody panel opened
  2. Open process explorer and kill jcef Helper (Renderer)
  3. Go back to IntelliJ - Cody panel should restart itself

@pkukielka pkukielka force-pushed the pkukielka/implement-webview-restart branch from be166fe to 6f1624e Compare November 14, 2024 15:48
@pkukielka pkukielka force-pushed the pkukielka/implement-webview-restart branch from 6f1624e to 8b96605 Compare November 15, 2024 08:37
SSL Info: $sslInfo"""
.trimIndent())
ProjectManager.getInstance().openProjects.forEach { project ->
TelemetryV2.sendTelemetryEvent(project, "cody.webview.request", "certError")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment on lines -404 to -406
// TODO: Add Telemetry here.
// TODO: Logging.
// TODO: Trigger a reload.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@pkukielka pkukielka merged commit f66c994 into main Nov 15, 2024
@pkukielka pkukielka deleted the pkukielka/implement-webview-restart branch November 15, 2024 11:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants