Skip to content

OPFSCoopSyncVFS: Database initialization timeout on page refresh (Safari) #808

@longfellowone

Description

@longfellowone

Description

When using OPFSCoopSyncVFS, rapid page refreshes (especially pull‑to‑refresh on Safari iOS) can cause database initialization to time out. The new page can’t acquire OPFS file locks because the previous page’s worker hasn’t released them yet.

Environment

  • @powersync/web: 1.30.0
  • Browser: Safari 26.1 (iOS and macOS)
  • VFS: OPFSCoopSyncVFS

Configuration

  • VFS: OPFSCoopSyncVFS (Dedicated Worker for DB)
  • Multi‑tabs: enabled (SharedWorker for sync)
  • Issue occurs regardless of Sync Worker type — lock appears to be held by DB worker.

Reproduction

  1. Open an app using PowerSyncDatabase with OPFSCoopSyncVFS
  2. Wait for database to initialize and connect
  3. Pull‑to‑refresh (iOS) or Cmd+R (macOS) rapidly
  4. After 1–3 refreshes, database initialization times out

Expected

Database initializes successfully after refresh.

Actual

Database initialization times out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions