Onboarding error when upgrading to 0.6.2: "Could not save onboarding progress. Please try again."

已關閉
#3,770 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

已經有一個關聯 PR 被合併了。

  • #3778 來自 @yashranaway —— 已合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
macos, rust
領域
backend, desktop

研究方向

Start with apps/desktop-gpui/src/store.rs and inspect read_store and the write path; the report says empty files block onboarding saves, while the cause of the update truncation is still uncertain. Trace the old app's update and exit path to identify how store is written. Done means the app can recover from an empty store and the update path preserves existing settings across interruption.

由索引模型根據 Issue 內容生成。

描述

Hi Cap team, love the app thanks for the effort you put into it.

Had this small issue when upgrading to 0.6.2 today - Claude analysis below

macOS: updating to 0.6.2 left the settings store file empty (0 bytes), and 0.6.2 then can't get past onboarding ("Could not save onboarding progress")

Summary

The in-app update to 0.6.2 left ~/Library/Application Support/so.cap.desktop/store empty (0 bytes). On first launch, the new GPUI app reads that file, fails to parse it, and refuses every write. The Welcome screen then shows "Could not save onboarding progress. Please try again." every time you press Get Started, so you can't get past onboarding. All previous settings are lost too.

Environment

  • Cap 0.6.2 (updated in-app from the previous Tauri build)
  • macOS 26.4.1 (25E253), Apple Silicon (arm64)

Steps to reproduce (what happened)

  1. Use the previous Cap version normally.
  2. Accept the in-app update to 0.6.2. The old app exits to install it.
  3. Launch 0.6.2. The Welcome screen appears.
  4. Press Get Started. It shows "Could not save onboarding progress. Please try again." and nothing happens.

Evidence

The store file's modification time matches the old app's exit during the update, and its size is 0:

-rw-r--r--  0 Nov  5 20:46  so.cap.desktop/store

cap-desktop.log (old app), with the times in UTC:

07:41:38Z INFO cap_desktop_lib::updates: Installing update 0.6.2
07:42:11Z INFO cap_desktop_lib::updates: Installing update 0.6.2
07:46:09Z INFO cap_desktop_lib: App exit requested code=Some(2147483647)
07:46:09Z INFO cap_desktop_lib: Exit cleanup completed elapsed_ms=2

cap-gpui.log (0.6.2) logs this from the first second after launch, and again on every attempt to save:

07:47:40Z ERROR cap_gpui::store: the Tauri store did not parse (EOF while parsing a value at line 1 column 0); refusing to write to it

Analysis

In apps/desktop-gpui/src/store.rs, read_store treats a missing file as an empty store. It treats a file that exists but doesn't parse as None and blocks all writes, so it never replaces someone's settings with a fresh object. That protection makes sense for real corruption. A 0-byte file is a different case: there's nothing left to protect, and refusing to write leaves the app permanently stuck at onboarding.

There appear to be two problems:

  1. Data loss. Something in the old app's exit or update path truncated store without writing new contents (possibly a non-atomic write interrupted at exit). Writing the store through a temp file plus rename, as gpui-state.json already does, would prevent this.
  2. No recovery. 0.6.2 should handle an empty file (or whitespace only) the same way as a missing one. For a file that really is corrupt, it could move it aside (for example to store.corrupt-<timestamp>) and start fresh, instead of blocking onboarding with no explanation. At least the onboarding error could tell the user why the save failed.

Workaround

Quit Cap, then move the empty file aside and relaunch:

mv ~/Library/Application\ Support/so.cap.desktop/store ~/Library/Application\ Support/so.cap.desktop/store.empty-backup

Cap recreates a valid store and onboarding completes. Previous settings are not recovered.

主要語言
Rust
星號
24.2k
分支
2.2k
平均合併
1 天 10 小時
30 天內合併 PR
684

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CapSoftware/Cap 的其他 Issue

查看 CapSoftware/Cap 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。