Skip to content

Windows: sync fails with [WinError 32] when remote user deletes a GeoPackage that is open in QGIS #906

Description

@RastoHu

Description
When a project is open in QGIS on Windows and another user (e.g. on macOS) deletes a GeoPackage file from the project, saves and syncs, the Windows client fails to apply the pull (delete) action and shows a client error instead. The GeoPackage file is locked by QGIS which prevents the plugin from deleting it during sync.

Error: Client error: Detail: Failed to apply pull actions: [WinError 32] The process cannot access the file because it is being used by another process

This issue was previously reported in #334 but was closed as duplicate. It appears to still be reproducible with current versions.

Environment
[x] PROD

Application (+ app version, build, operating system)

  • QGIS: 3.40.15-Bratislava
  • Mergin Maps Plugin version: TBD
  • macOS: Tahoe 26.3 (syncing machine)
  • Windows 11 (affected machine)

Steps to reproduce

  1. macOS: create a new project in Mergin Maps plugin with a GeoPackage layer
  2. Windows: download and open the project in Mergin Maps QGIS plugin
  3. macOS: delete the .gpkg file from the project, save and sync
  4. Windows: sync the project in the Mergin Maps QGIS plugin → Client error appears

Actual results
Sync fails with [WinError 32] The process cannot access the file because it is being used by another process

Expected results
The plugin should handle the locked file gracefully — either close/unload the layer before deleting it during pull, or show a clear message asking the user to close the layer first.

Screenshots or logs

Conclusion
Created by Claude and supervised by a human test analyst.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsyncRelated to synchronisation of projectswindows

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions