fix(runtime-cef): replace assert_eq! in CefRuntime::init with diagnostic panic#13
Open
senamakel wants to merge 1 commit into
Open
fix(runtime-cef): replace assert_eq! in CefRuntime::init with diagnostic panic#13senamakel wants to merge 1 commit into
senamakel wants to merge 1 commit into
Conversation
…tic panic The previous `assert_eq!(cef::initialize(...), 1)` produces an opaque `assertion left == right` panic when CEF browser-process init fails, with no information about the cause. In production this hides the dominant trigger — a second app instance whose cache lock is still held by the primary — behind a useless stack trace (Sentry OPENHUMAN-TAURI-A, 442 events across Win10/11 + Linux, all releases). Replace the assert with a logged panic that includes the actual return code and `cache_path`. The expectation is that callers register `tauri-plugin-single-instance` before `Builder::build()` to remove the primary cause; this change ensures any remaining init failure produces an actionable Sentry event instead of a bare assertion.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the bare
assert_eq!(cef::initialize(...), 1)inCefRuntime::init(crates/tauri-runtime-cef/src/lib.rs:2071) with alogged
panic!that carries the actual return code andcache_path.The previous assert produces an opaque
assertion left == rightpanicwhen CEF browser-process init fails — no info about the cause, useless
for triage.
Context
In production this fired ~442 times across 8 days on Win10/11 + Linux
(Sentry
OPENHUMAN-TAURI-A). The dominant trigger is a second appinstance whose cache lock is still held by the primary. The consuming
app is fixing that side by registering
tauri-plugin-single-instancebefore
Builder::build(). This PR is defense in depth: any remaininginit failure (corrupt cache, missing helpers, sandbox denied, …) now
produces an actionable Sentry event instead of a bare assert.
Test plan
consumer's
cargo checkon the bumped submodule pointer.