Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘Import project from ZIP’ forgets all layers #4834

Open
VEWA-Patrice opened this issue Dec 7, 2023 · 3 comments
Open

‘Import project from ZIP’ forgets all layers #4834

VEWA-Patrice opened this issue Dec 7, 2023 · 3 comments

Comments

@VEWA-Patrice
Copy link

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]
@nirvn
Copy link
Member

nirvn commented Mar 22, 2024

@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.

@VEWA-Patrice
Copy link
Author

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.

@nirvn
Copy link
Member

nirvn commented Mar 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants