Android: surface snapshot metadata validation errors instead of generic Snapshot refresh failed
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- android, ocaml
調査の方向性
Read shared/src/logseq/core/snapshot_download.ml at the metadata resolver and trace where its validation error reaches Android's sync status and Check log. Reproduce the missing- t metadata response described in the issue and confirm the specific reason is surfaced without exposing credentials or payloads; the existing upstream server includes t, so use the stated older-server case when checking the failure path.
索引モデルが issue の本文から書いたものです。
説明
Summary
Please preserve the underlying snapshot metadata validation reason in Android's sync status / Check log. A deterministic bootstrap contract mismatch currently appears only as Sync failed / Snapshot refresh failed, with repeated download-start events and no actionable reason visible to the user.
Scope: the missing field in this reproduction comes from an intentionally old, locally patched self-hosted server. This is not a claim that the current upstream server still omits the field: the current handler and the current upstream container image include it. Strict cursor validation should remain enabled.
Installed app
- Pixel Fold, native Android app
com.logseq.logseq - Version 2.0.2, versionCode 1701
- Settings revision
cbff0ec5, resolved tocbff0ec53026e139aa8bd2ac5f381b16481086ff(Add Android account deletion and privacy links) - Existing E2EE cloud graph accessed through a self-hosted HTTPS graph server
- Old server source revision
abdf4775a3ad99e526abebca6042deecb541f017, with a separate local transaction-handling patch
Reproduction
-
Configure an older self-hosted server whose successful
/sync/<graph-id>/snapshot/downloadJSON has this shape:{"ok":true,"key":"stream/<graph-id>.snapshot","url":"https://<sync-origin>/sync/<graph-id>/snapshot/stream"} -
On the installed native build, select a graph requiring initial snapshot bootstrap (
cursor=-1). -
Open Sync status, tap Sync now, and wait at least 35 seconds.
-
Inspect Sync status and Settings → Check log.
The observed UI remains:
Status: Sync failed
Connection: Disconnected
Local changes: Not saved
Remote tx: Unavailable
Check log's Last error is Snapshot refresh failed. PID-scoped Android logs show GraphLifecycle: snapshot.download.start repeatedly, approximately 30 seconds apart, without the specific metadata validation reason. This failure was reproduced by an ADB UI script which taps Sync now, waits 35 seconds, and exits 1 for the failed/disconnected state. No app data was cleared.
Source-matched cause and expected diagnostics
The exact installed resolver requires t to be an integer >= 0 and otherwise returns Snapshot cursor metadata is invalid before returning a stream download plan:
The production metadata response was independently authenticated and checked: HTTP 200, fields ok, key, url, no t. Successful HTTP and a working stream are not sufficient to satisfy the native metadata contract.
Please expose that specific reason, ideally with a message indicating an incompatible/older sync server, rather than only Snapshot refresh failed. This would distinguish a protocol contract mismatch from timeouts, authentication, E2EE, and import failures without exposing payloads or credentials.
Current upstream status / limits
The current upstream Logseq handler returns :t (t-now self). A read-only metadata probe against an isolated copy of the graph running ghcr.io/yshalsager/logseq-selfhost-sync:latest passes the installed native metadata contract and returns the actual current cursor.
That probe verifies metadata only. It does not establish Android stream import/decryption success. No graph contents, credentials, key material, private hostnames, raw UI XML, or raw Android logs are attached.
- 主要言語
- OCaml
- スター
- 9
- フォーク
- 2
- 平均マージ
- 2時間 26分
- マージ済み PR(30日)
- 116
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
logseq/mobile のほかの issue
-
Crash on Android 9オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug_feature_triaged Team: Mojo Libraries
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
letsrevel/revel-backend#1520 ·
メンテナーはふだん 1 日以内に返信
-
backend enhancement good first issue help wanted
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
nikhilb2/simple_invoicing#931 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
diivi/aseprite-mcp#43 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
NCAR/MMM-physics#33 ·