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

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

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

評価

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

調査の方向性

QGIS plugin で、Attachment widget を持つ Photo_: という名前のフィールドを作成し、表示されている attachment pattern を設定してプロジェクトを同期することで、問題を再現します。まず、同期前にフィールド名またはプロジェクトスキーマがどこで検証されているかを追跡します。対応すべき内容には、同期前にサポートされていない名前を防止するか明確に警告すること、報告された文字を対象とするテストカバレッジ、および使用できないモバイルプロジェクトが生成されるのを避ける動作を含める必要があります。

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

説明

bug

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.

主要言語
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 を短くまとめたダイジェスト。