Browser session open can fail with repeated "oneshot canceled" during Chrome session restore
Summary
Opening the ChatGPT Web browser can fail with:
invalid_request: oneshot canceled: oneshot canceled: oneshot canceled
when Chromium restores multiple persisted tabs and one of the page targets disappears while CCCC is enumerating/reusing pages.
Tested on CCCC v0.4.40, Linux ARM64, Chromium 151, system_browser_cdp.
Reproduction observed
- Use the persistent ChatGPT Web Chrome profile.
- Let Chrome accumulate/restores entries under:
Default/Sessions/ - Close/reopen or delete/recreate a Web Model actor/group, then choose Open ChatGPT.
- CCCC launches Chromium, but the request eventually returns HTTP 400:
{"error":{"code":"invalid_request","message":"oneshot canceled: oneshot canceled: oneshot canceled"},"ok":false}
The same Chromium binary, same profile, and same ChatGPT URL work when launched directly outside CCCC.
Removing only Default/Sessions also makes CCCC open successfully, which points to transient restored targets rather than a corrupt profile or login state.
Root cause
Startup code enumerates Chromium pages and calls page.url().await?.
During Chrome session restore, a target can disappear between page enumeration and the URL request. Chromiumoxide then returns a canceled oneshot.
CCCC already has is_page_gone() recovery logic in crates/cccc-web/src/browser_surface/page_recovery.rs, but:
oneshot canceledis not classified as a recoverable page-gone error.- startup
reusable_page()propagatespage.url()errors instead of skipping vanished targets. - similar URL enumeration paths in page recovery/internal-page cleanup can fail the whole operation for the same transient target churn.
Expected
A restored page target disappearing during enumeration should be skipped. It should not fail the entire browser-session open.
Local verification
Using the exact same persisted Default/Sessions files:
Stock v0.4.40
browser-session/open-> HTTP 400- repeated
oneshot canceled - failure after ~30-38s
Local recovery patch
- classify
oneshot canceledas a page-gone condition - skip page URL failures matching
is_page_gone()in startup/recovery cleanup paths
Result:
browser-session/open-> HTTP 200active=trueready=true- login preserved
- close -> reopen also succeeds without deleting Sessions
cccc-web --lib: 490 passed, 0 failed, 5 ignored
This appears to be a transient-target recovery issue rather than a Chromium/profile corruption issue.
Thanks for the detailed investigation! The pending patch skips failed candidate pages only when the browser confirms their targets have disappeared. Connection failures still propagate, and saved profiles are preserved. Isolated browser tests pass; your exact ARM64 session-restore scenario still needs confirmation.