UserDataSyncer reboot loop after database reset in dev
#7 078 ouverte le 7 nov. 2025
Description
Description
When developing locally with yarn dev-app, if the PostgreSQL database is reset (e.g., by removing the Docker volume), the UserDataSyncer Durable Object gets stuck in a reboot loop when users have cached browser state from before the reset.
Steps to Reproduce
- Start
yarn dev-appand log in to the app - Stop the dev server
- Reset the database by running:
cd apps/dotcom/zero-cache yarn docker-down docker volume rm docker_tlapp_pgdata - Restart
yarn dev-app - Try to use the app without clearing browser storage
Expected Behavior
The app should gracefully handle the situation or provide a clear error message to the user.
Actual Behavior
The sync-worker logs show repeated errors:
[UserDataSyncer]: Error: reboot loop, waiting
The UserDataSyncer attempts to restore user state from the database but can't find the necessary history because:
- The browser has cached session/user IDs from before the database reset
- The fresh database doesn't have the historical data needed for fast reboot
- The syncer tries to reboot but hits the same issue repeatedly
Workaround
Clear browser storage (Application > Storage > Clear site data in Chrome DevTools) and refresh the page.
Impact
- Affects: Local development only
- Severity: Low (workaround is simple)
- Frequency: Only occurs when database is reset during development
Solution
A helpful error message has been added in apps/dotcom/sync-worker/src/UserDataSyncer.ts:486-488 to guide developers to the workaround. This should help new contributors understand what's happening.
Environment
- OS: macOS
- Node: v22.12.0
- Database: PostgreSQL 16.2 (Docker)
/cc @steveruizok