Android is push-only until sync v2: stop showing the 'zero peers … layout problem' warning; pull other hosts only once v2 reads from staging
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- distributed-systems, mobile
Research direction
Trace syncBoth, copySyncFilesToSafDir, pull_all/list_remote_dbs, and resolveSyncDirectory, then compare dirs::get_sync_dir() with the Android AW_SYNC_DIR value. Verify whether peer databases can be read from the SAF tree and whether the hostname/device_id levels match. Done means either Android pull behavior and the warning are corrected, or the UI explicitly identifies Android as push-only until sync v2.
Written by the indexing model from the issue text.
Description
Observed on v0.14.2b2 (POCO F8 Ultra), Sync Settings after a successful sync:
Last Sync succeeded at 13:00 … pulled 0, pushed 1
Found 0 remote db files to pull from /storage/emulated/0/Android/data/net.activitywatch.android/files/sync/poco_f8_ultra
Zero peers in a configured sync dir is usually a layout or setup problem, not a no-op.
[own-staging 2-level] …/files/sync/poco_f8_ultra/41662…/test.db 299.2 MB not pulled: own device_id, excluded from pull
syncBoth does call pull_all (correct, 3-level list_remote_dbs), but copySyncFilesToSafDir only mirrors internal → SAF. Nothing ever copies other hosts' {hostname}/{device_id}/test.db from the Syncthing folder into the app-private dir, so the only thing under the internal root is our own staging and pull is guaranteed to find zero peers. The #687 warning then tells the user their setup is broken when it is working as designed for push.
Two things:
- Decide whether Android pulls at all. If yes, peers have to be read from the SAF tree (either an inbound mirror of
{other-host}/…folders before the pull, orpull_allreading peer dbs via SAF-backed copies). If no for now, the Sync Settings text should say "push-only on Android" instead of the layout-problem warning. - The root in that message is
…/files/sync/poco_f8_ultra, and the own staging is classified as 2-level under it — butresolveSyncDirectorysetsAW_SYNC_DIRto…/files/sync, and the push lands at…/files/sync/poco_f8_ultra/<device_id>/test.db(3-level from that root). Worth checking whatdirs::get_sync_dir()resolves to on Android vs the env var; if the pull root really is the hostname folder, pull could never work even with an inbound mirror.
Related desktop-side bug found in the same session: ActivityWatch/aw-server-rust#711 (resume cursor duplicates the boundary event; the phone's staging stopwatch bucket already holds 285 copies of one event).
cc @TimeToBuildBob
- Dominant language
- Kotlin
- Stars
- 270
- Forks
- 57
- Avg merge
- 23h 47m
- Merged PRs (30d)
- 39
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/aw-android
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ActivityWatch/aw-android#306 ·
Maintainers usually reply within 1 day
-
AuthSettingsActivity crashes on launch (InflateException: Material attributes under AppCompat theme)Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ActivityWatch/aw-android#210 · 7 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ActivityWatch/aw-android#302 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
ActivityWatch/aw-android#300 · 6 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
ActivityWatch/aw-android#296 ·
Maintainers usually reply within 1 day
All issues in ActivityWatch/aw-android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
T31n/YagniLauncher#1051 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Accepted Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ankidroid/Anki-Android#22114 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solana-foundation/pay-kit#341 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
element-hq/element-x-android#7783 ·
Maintainers usually reply within 1 day