[SP 18.13.1 / macOS] Initial sync race on startup: last binding fails when multiple bindings are configured #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Environment: Super Productivity v18.13.1 (macOS, Apple Silicon). Not reproducible on 18.9.1D.
Summary
On app startup with multiple bindings (3 in my setup), the initial sync of the last binding in config order (confirmed: Laboral Kutxa) fails with a snack:
It is recoverable — pressing Sync Now afterwards syncs the failed binding fine. It only happens at startup.
Steps to reproduce
Expected
Every binding's initial sync completes on startup, regardless of how many bindings are configured.
Root cause
On startup,
initSyncRegistrylaunchedperformInitialSyncfor every binding in parallel (fire-and-forget). SP 18.13.1 starts plugins faster (no consent dialog after the first grant), so the near-simultaneous initial syncs race and SP cannot process them all at once → the last one fails. On 18.9.1D the slower activation path masked this.Fix
sync-manager.ts— create the sessions synchronously, then runperformInitialSyncsequentially (awaitper binding) instead of launching them all at once.plugin.onReady()inbackground.tsbefore loading config / initial sync (feature-detected, with a fallback timeout — the recommended 18.13.1 lifecycle).Introduced by the faster no-dialog startup in SP 18.13.1.
Fixed in commit
5161a1d.Root cause: on startup, initSyncRegistry launched performInitialSync for every binding in parallel (fire-and-forget). SP 18.13.1's faster, no-dialog startup made the near-simultaneous initial syncs race, so the last binding failed with the recoverable "Initial sync failed" snack. 18.9.1D's slower activation path had masked it.
Fix:
Verified on SP 18.13.1 (macOS M2): on startup with 3 bindings the "Initial sync failed" snack no longer appears and all bindings sync correctly.
Closing as fixed.