Skip to content

Mobile sync resurrects deleted .gpkg (file removed on server, then re-uploaded from iOS on next sync) #4335

@RastoHu

Description

@RastoHu

Description

A .gpkg file is removed from the project in QGIS plugin (and synced to the server), and the next sync on mobile should remove the file from mobile device as well. Instead, a subsequent mobile sync re-uploads the deleted .gpkg back to the server, and it reappears again in QGIS plugin after the next pull/sync.

This looks like mobile treating the missing file as something to upload (no deletion/tombstone applied), causing the file to be “brought back”.

Environment
Staging/PROD

Application (+ app version, build, operating system)

  • QGIS version: 3.44.7-Solothurn
  • MM plugin version: 2026.1.2
  • iOS version: iOS 26.0
  • iOS app build: 26.2.860811

Steps to reproduce

  1. Have a project containing a to_delete.gpkg file. There are no pending changes in the project on plugin side.
  2. In Mergin Maps mobile app, add/edit some records to to_delete.gpkg and sync changes to server.
  3. In Mergin Maps plugin in QGIS, pull/sync the project to get the mobile changes.
  4. Remove the to_delete.gpkg file from the project directory on disk (file system).
  5. Sync in QGIS plugin (known behavior: sync fails; user restarts QGIS, reopens the project, removes unavailable layers, then syncs again - bug).
  6. After the successful plugin sync, confirm the to_delete.gpkg file is removed on server (project no longer contains the to_delete.gpkg) -> see screenshot A
  7. On mobile app, run sync (expected: .gpkg should be removed locally too).
  8. Run sync again on mobile app.

Actual results

  • After the .gpkg is removed from server, mobile sync does not persist the deletion locally as expected.
  • A later mobile sync re-uploads the deleted .gpkg back to the server -> screenshot B
  • After the next QGIS plugin sync/pull, the .gpkg reappears in the plugin too.

Expected results

  • Once the .gpkg is removed from server, the mobile client should remove it locally on next sync (or clearly report why it cannot).
  • Mobile should not re-upload a file that was deleted remotely (unless user explicitly restores it / resolves a conflict).

Screenshots or logs
A

**B**

Conclusion
Created by GitHub Copilot and supervised by a human test analyst.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions