MerginMaps / MerginMaps/qgis-plugin

Invalid field name with unsupported characters accepted; project uploads but mobile app hangs when opening

Open
#817 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
44
Forks
20
Avg merge
3d 12h
Merged PRs (30d)
5

Description

Description
A layer field whose name contains invalid / unsupported characters (tested: Photo_: — characters like : | ? " *) is not rejected or warned about by the QGIS plugin. The project syncs successfully to the server. When the project is downloaded in the Mergin Maps mobile app (Android/iOS) and opened, the app stays in an indefinite “opening” state (spinner) until forcibly killed. This creates a hidden data integrity / usability issue: plugin allows creation + upload of a schema that mobile cannot handle gracefully.

Environment
PROD

Application (+ app version, build, operating system)

  • QGIS version: 3.40.5-Bratislava
  • Plugin version: 2025.3.3
  • Desktop OS: macOS Sequoia 15.6 (reported)
  • Mobile platforms: Android + iOS (both hang)

Steps to reproduce

  1. In QGIS, create a new Mergin Maps project.
  2. Add a new layer and create a text field named exactly: Photo_: (an example containing a colon; other disallowed characters like | ? " * likely similar).
  3. Set the field’s widget to Attachment.
  4. Open Mergin Maps plugin settings and define a custom attachment naming pattern referencing that field, e.g.:
    @layer_name + '-' + @mm_username + '-' + format_date(now(),'ddMMyy_hhmm')
  5. Sync the project to the server — sync completes without validation error.
  6. On mobile (Android or iOS), download the project.
  7. Attempt to open the project.

Actual results

  • QGIS plugin shows no validation warning about the field name.
  • Sync succeeds; project is present on server.
  • Mobile app: after tapping the project to open, it remains stuck “opening” (spinner) indefinitely; no user-facing error, necessitating force-closing the app.
  • Project content never loads.

Expected results

  • Plugin should proactively validate field names (especially for layers with attachment widgets) and block or warn if unsupported characters are present before allowing sync.
  • Either:
    • (Blocking) Prevent sync until offending field names are renamed, listing all invalid characters detected.
    • (Sanitizing) Automatically map / escape invalid characters (with a clear transformation note) so mobile can open the schema.
  • Mobile app should not hang; if schema is invalid it should display a clear error (e.g., “Project schema contains unsupported field name: ‘Photo_:’”).

Screenshots or logs

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

Reproduce the issue in the QGIS plugin by creating a field named Photo_: with an Attachment widget, configuring the shown attachment pattern, and syncing the project. Start by tracing where field names or project schemas are validated before sync. Done should include preventing or clearly warning about unsupported names before sync, with coverage for the reported characters and behavior that avoids producing an unusable mobile project.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
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.