Skip to content

Conversation

@peppescg
Copy link
Collaborator

A bunch of time we have this error during an app restarting ( in particular after an app upgrade ). In order to debug it, let's add more logs and see what cause the issue

[2025-10-08 15:48:40.900] [error] Error: TypeError: Failed to fetch (localhost:50074)
    at Object.beforeLoad (file:///Users/giuseppe/workspace/toolhive-react/out/ToolHive-darwin-arm64/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-CY_Ujpgk.js:507:58651)
    at async uC (file:///Users/giuseppe/workspace/toolhive-react/out/ToolHive-darwin-arm64/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-CY_Ujpgk.js:54:66510)
    at async file:///Users/giuseppe/workspace/toolhive-react/out/ToolHive-darwin-arm64/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-CY_Ujpgk.js:54:77352
[2025-10-08 15:48:42.262] [info]  Container engines are now available, restarting ToolHive...

@peppescg peppescg self-assigned this Oct 10, 2025
Copilot AI review requested due to automatic review settings October 10, 2025 09:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive error logging and Sentry telemetry to help debug bootstrap failures that occur during app restarts, particularly after upgrades. The focus is on capturing detailed context about the application state when health checks fail.

Key changes:

  • Enhanced error handling in the root route's beforeLoad function with detailed logging
  • Added Sentry error reporting with contextual information about Toolhive and container engine status
  • Improved error messaging to distinguish health check failures from generic errors

Copy link
Collaborator

@samuv samuv left a comment

Choose a reason for hiding this comment

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

🔍

@peppescg peppescg merged commit 534f5ea into main Oct 10, 2025
15 checks passed
@peppescg peppescg deleted the fix-boostrap-error branch October 10, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants