Bug: KeyError: 'version' in pull() and push() after server update (May 25, 2026)
Description
Since the Mergin Maps server update on May 25, 2026, mergin-db-sync (both the pre-compiled exe v2.1.1 and the Python sources) fails with a KeyError: 'version' during pull and push operations.
The root cause is that mc.get_projects_by_names() now returns {'project/name': {'error': 404}} instead of the expected project info dict containing a 'version' key. This appears to be a breaking change in the server API response format.
Steps to reproduce
- Use
mergin-db-sync v2.1.1 (exe or Python sources)
- Run with
--single-run against a valid Mergin Maps project
- Init completes successfully, but pull (and push) fail immediately after
Error
Traceback (most recent call last):
File "dbsync_daemon.py", line 203, in <module>
File "dbsync_daemon.py", line 154, in main
File "dbsync.py", line 1465, in dbsync_pull
File "dbsync.py", line 762, in pull
server_version = projects[project_path]["version"]
KeyError: 'version'
Debug output
Adding a print before line 762 shows:
DEBUG: {'FREDON-Occitanie/project_name': {'error': 404}}
Workaround
Replacing get_projects_by_names() with mc.project_info() fixes the issue:
# Before (broken)
projects = mc.get_projects_by_names([mp.project_full_name()])
server_version = projects[mp.project_full_name()]["version"]
# After (working)
project_info = mc.project_info(mp.project_full_name())
server_version = project_info["version"]
The same fix needs to be applied in both pull() (line ~762) and push() (line ~1018).
Environment
- mergin-db-sync: 2.1.1
- OS: Windows 10
- Broke after Mergin Maps server update on May 25, 2026
- Was working correctly the day before
Bug: KeyError: 'version' in pull() and push() after server update (May 25, 2026)
Description
Since the Mergin Maps server update on May 25, 2026,
mergin-db-sync(both the pre-compiled exe v2.1.1 and the Python sources) fails with aKeyError: 'version'during pull and push operations.The root cause is that
mc.get_projects_by_names()now returns{'project/name': {'error': 404}}instead of the expected project info dict containing a'version'key. This appears to be a breaking change in the server API response format.Steps to reproduce
mergin-db-syncv2.1.1 (exe or Python sources)--single-runagainst a valid Mergin Maps projectError
Debug output
Adding a print before line 762 shows:
Workaround
Replacing
get_projects_by_names()withmc.project_info()fixes the issue:The same fix needs to be applied in both
pull()(line ~762) andpush()(line ~1018).Environment