Skip to content

intermittent error occurs when using OPFSCoopSyncVFSΒ #664

@ImSingee

Description

@ImSingee

An intermittent error occurs when using OPFSCoopSyncVFS:

Failed to execute 'createSyncAccessHandle' on 'FileSystemFileHandle': Access Handles cannot be created if there is another open Access Handle or Writable stream associated with the same file.

This error has been observed in all versions since OPFS support was introduced.

The issue is intermittent and seems more likely to occur under the following conditions:

  • Leaving the page open in the background for several hours, especially after the computer has been asleep.
  • Quickly switching away from the page and then back to it

The error can occur with either a single tab or multiple tabs open (with the same powersync db).

If there's more than one tabs open, when the error occurs, all other pages can no longer execute SQL queries, and the sync status gets stuck on "connecting".

The only way to recover is to close all application tabs and reopen them.

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