QField icon indicating copy to clipboard operation
QField copied to clipboard

‘Import project from ZIP’ forgets all layers

Open VEWA-Patrice opened this issue 2 years ago • 4 comments

Describe the issue

When choosing the ‘Import project from ZIP’ action according to https://docs.qfield.org/get-started/storage/ only the Project file *.QGS is copied to the project folder, all other files including the data.gpkg not.

Reproduction steps

Steps to reproduce the behavior:

  1. Create an arbitrary Project in QGIS with some vector layer.
  2. Export this with the QField plugin.
  3. Upload to OneDrive.
  4. Download from OneDrive, eventually already on an Android device.
  5. Open QField: Open local files -> "+" -> Import project from ZIP.
  6. Scroll to the Download folder and choose the ZIP file.
  7. QField returns with a link to the Project (but any other contained file is not listed)
  8. Open the project and find it empty.

Expected behavior

Import the project file, the data.gpkg and other layer files to the project.

Observed behavior

Only the project file is imported.

Screenshots and GIFs

The contents of the ZIP file: Screenshot_20231207-175349

The result of the import: Screenshot_20231207-175303

ZIP file: 9999 Testprojekt Monitoring2.zip

Desktop

  • OS: Windows 10 (10.0.19045 Build 19045)
  • QGIS Version 3.32.3
  • QFieldSync Version 4.6.1

Mobile

  • Device: Cat S42 (also observed on other devices)
  • OS: Android 12 (also observed with Android 14)
  • QField version: 3.1.0 (also observed with other versions)

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: [No]
  • Problem can be reliably reproduced, doesn't happen randomly: [Yes]
  • Problem happens with all files and projects, not only some files or projects: [Yes]

VEWA-Patrice avatar Dec 07 '23 17:12 VEWA-Patrice

@VEWA-Patrice , how was the ZIP file created? I've noticed in the past that Android Zip class (which we use to decompress the ZIP file) doesn't handle ZIP files created by web app such as onedrive. If you use a software like the Gnome Archive tool or winzip/winrar on Windows.

nirvn avatar Mar 22 '24 04:03 nirvn

Thanks @nirvn for pointing this out. Yes, we use a Onedrive storage to distribute QField packages and some users download these directly from their Android device (overgoing connecting it per USB to a Windows desktop). Ok, knowing this and testing that a Zip file created on a Windows desktop works makes us to continue inzipping the projects as workaround.

VEWA-Patrice avatar Mar 27 '24 14:03 VEWA-Patrice

@VEWA-Patrice , glad to hear you found a suitable workflow. Keep on mapping! :)

nirvn avatar Mar 27 '24 15:03 nirvn