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

Aperta
#906 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia riproducendo lo scenario di sincronizzazione Windows dell'issue e segui la gestione della pull-action del plugin per i file GeoPackage eliminati mentre il layer rimane aperto in QGIS. Il lavoro è completato quando il caso del file bloccato non produce più un errore client non gestito: il layer viene scaricato prima dell'eliminazione oppure l'utente riceve un'istruzione chiara per chiuderlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug sync windows

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.

Lingua principale
Python
Stelle
45
Fork
21
Merge medio
3g 13h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MerginMaps/qgis-plugin

Tutte le issue di MerginMaps/qgis-plugin

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.