MerginMaps / MerginMaps/mobile

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

Open
#4,335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug data corruption - sync failure - crash - anr
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the listed mobile-to-QGIS sync sequence with to_delete.gpkg, then trace the mobile sync handling for files deleted remotely. Done means the mobile client removes the remote deletion locally and does not re-upload the file on a later sync; verify the result with the described QGIS pull/sync flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, ios
Domain
distributed-systems, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.