qfieldsync
qfieldsync copied to clipboard
QField Sync generates invalid relative paths (../) for local GPKG layers when packaging via USB
What is the bug or the crash? What were your expectations and what actually happened?
I’m using QField Sync to package a QGIS project via USB. My project contains both PostGIS layers (configured as Offline editing) and a local GPKG layer (configured as Copy).
On my Android device, I’m unable to load the local GPKG layers. I get the following error message:
Cannot open /storage/emulated/0/Android/data/ch.opengis.qfield/files/Imported Projects/RPNS_2025.gpkg.()
After investigation, I found that the
I was able to fix the issue by manually editing the XML and removing the ../, like this:
After that, the layers loaded correctly in QField.
However, I would prefer not to manually fix the XML every time I package the project. Is there a recommended way to configure my QGIS project and QField Sync settings to avoid this situation altogether?
Thanks in advance !
Steps to reproduce the issue
-
In QGIS, create a new project
-
Add:
-
One or more PostGIS layers.
-
One or more local GPKG layers
- In QField Sync configuration :
-
Set PostGIS layers to Offline editing.
-
Leave the GPKG layers set to Copy.
-
In Project Properties > General, ensure "Save paths" is set to "Relative".
-
Use QField Sync's cable packaging to export the project to an empty folder.
-
Transfer the packaged project to your Android device
-
Open the project in QField.
Version
3.0.1
Operating system name
Windows
Operating system version
Windows 11
Reinstall QFieldSync
- [x] I have a fresh install of the latest QFieldSync version on a new QGIS profile, but the problem persists.
- [ ] Problem can be reliably reproduced, doesn't happen randomly.
- [ ] Problem happens with all files and projects, not only some files or projects.
Additional context
No response