MerginMaps / MerginMaps/qgis-plugin
Windows: sync fails with [WinError 32] when remote user deletes a GeoPackage that is open in QGIS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 20
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 5
Description
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
- macOS: create a new project in Mergin Maps plugin with a GeoPackage layer
- Windows: download and open the project in Mergin Maps QGIS plugin
- macOS: delete the
.gpkgfile from the project, save and sync - 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows sync scenario from the issue and trace the plugin's pull-action handling for deleted GeoPackage files while the layer remains open in QGIS. Done means the locked-file case no longer produces an unhandled client error: the layer is unloaded before deletion or the user receives a clear instruction to close it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100