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

オープン
#906 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python

調査の方向性

まず issue にある Windows 同期シナリオを再現し、レイヤーが QGIS で開いたままになっている場合に、削除された GeoPackage ファイルに対する plugin の pull-action 処理を追跡します。ロックされたファイルのケースで未処理のクライアントエラーが発生しなくなれば完了です。削除前にレイヤーがアンロードされるか、ユーザーにレイヤーを閉じるよう明確な指示が表示されます。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
45
フォーク
21
平均マージ
3日 13時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MerginMaps/qgis-plugin のほかの issue

MerginMaps/qgis-plugin の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。