QField packaging errors

Hi,

I’ve recently updated my QGIS to v3.22 and the QFieldsync plugin has updated accordingly.

I have a project which is made up of .shp files, not geopackages, and some .csv files that I want to be able to use in QField. However, when I package the project for QField (having addressed all the warnings which now appear when opening QFieldsync) and go to open my data in QField I am told that it is unable to load all my layers, and that I should review and reconfigure the QGIS project. When QFieldsync packages my project, it creates a single data.gpkg file and an ‘attachments’ zip file containing a QGD.

I still have a computer with QGIS 3.18 and an older version of QFieldsync installed. Using this I can still successfully package and export the same project to QField without issue. This package contains all my .shp s and associated files, as well as all .csv files in my project, rather than the data.gpkg and attachements zip files.

Is there something I’m missing about the updated plugin that means it packages projects differently that would causing mine to fail like this?

Any help would be greatly appreciated.


Imported from GitHub discussion by @joewiseman1 on 2023-02-16T09:55:14Z

I guess you have configured your layers as offline editing, which converts them automatically to .gpkg.


Imported from GitHub comment by @suricactus on 2023-02-16T09:56:50Z

Yes I have them set to offline editing. If I have them set to ‘copy’ then my changes won’t be applied to the main database when I re-synchronize my project though right?


Imported from GitHub comment by @joewiseman1 on 2023-02-16T10:04:58Z

I still have a computer with QGIS 3.18 and an older version of QFieldsync installed. Using this I can still successfully package and export the same project to QField without issue. This package contains all my .shp s and associated files, as well as all .csv files in my project, rather than the data.gpkg and attachements zip files.

I guess they are not offline editing on your old project, if you still see the separate .csv and .shp.

Btw, if you share the QFieldSync versions you are using and upload a sample project will help a lot for me or the broader community to solve your issue.


Imported from GitHub comment by @suricactus on 2023-02-16T10:07:26Z

Sorry, yes that’s right. If I set them to offline editing on the old computer (QFieldsync v3.4.4 and QGIS 3.18) I get a data.gpkg but it still works properly when I export it to QField.

The new computer has QFieldsync v4.3.1 and QGIS 3.22.

When you say a sample project you mean a QGIS project with some .shp and .csv formatted in the same way as this project?

Really appreciate your help.


Imported from GitHub comment by @joewiseman1 on 2023-02-16T10:31:06Z

When you say a sample project you mean a QGIS project with some .shp and .csv formatted in the same way as this project?

yes, precisely. You should always try to give precise but concise reproduction steps and minimal sample data, so developers or community members can pick your issue and help you sooner :wink: .


Imported from GitHub comment by @suricactus on 2023-02-16T10:47:25Z

Sample project.zip

Here you go. Hope that’s what you’re after :slight_smile: thanks again


Imported from GitHub comment by @joewiseman1 on 2023-02-16T10:51:59Z

Will look into your issue next weeks, hope someone else is around to help you for now.


Imported from GitHub comment by @suricactus on 2023-02-16T10:55:48Z

Hi,

I still haven’t found a way to resolve this issue. Even using geopackages some layers load and some won’t and I’ve got no idea why.

I’m now using QGIS v3.28.3 and QFieldSync v4.4.9.

Please find attached a new example project, using geopackages. When package this project for QField, all the badger layers load, but it won’t load the otter layers or the lodge location layers. Any help as to why and how I can fix this persistent issue would be greatly appreciated.
New test example.zip


Imported from GitHub comment by @joewiseman1 on 2023-04-06T15:52:40Z

I’m having the same issues, by sounds, and looking forward to some support resolving this issue.


Imported from GitHub comment by @sarahsueroth on 2024-02-20T21:49:27Z

Looking forward to hearing your response as I’m having same issue; unfotunately I wasn’t as clever as joeswiseman1 and don’t have an old version installed so am stopped in my tracks with using the software.


Imported from GitHub comment by @sarahsueroth on 2024-02-20T21:50:42Z

Hello joewiseman1 and sarahsueroth,

The recent updates in QField allow you to work directly from a copy of the folder containing the project and its layers. This eliminates the need to package the project through QFieldSync, as long as the project doesn’t contain PostGIS layers. To test this workflow, follow these steps:

  1. Copy the folder containing the project from your computer to the mobile device (be sure that QGIS is closed and all layers are in the same folder), or by importing the project using your favorite cloud provider (ex. Google Drive or Dropbox).

QField Documentation

  1. Digitize some data in QField on the mobile device.
  2. Copy the project folder back to your computer after making changes. However, please ensure to create a backup of the project before rewriting the folder.

Imported from GitHub comment by @SeqLaz on 2024-02-21T00:21:20Z

Wow - that worked! Thank you! I do, however, have a problem with retrieving digitized data from the mobile app (QField) back to computer (QGIS) after making changes as you suggested above. Instead, I got my QField data over to QGIS by following instructions found on old gis stackexchange post:

  1. In QField go to ‘open local file’ open ‘QField files directory’ then ‘imported project’
  2. Instead of clicking to go into the folder click on the three dots at the side, there should be the option to ‘export to folder’ choose where you want the exported data to be saved.
  3. with your phone/tablet plugged in copy and paste the exported data onto your computer.
    (I stopped there and it was enough for me to access, but the original stackexchange post included step 4. in QGIS go to ‘plugins’ then ‘Qfield sync’ then ‘syncroise from QField’ locate your folder and finaly select ‘syncronise’)

Imported from GitHub comment by @sarahsueroth on 2024-02-21T00:55:05Z

Yes, that is a good workflow. Also, since you are using the project imported directly, you only need to export the layers where you made changes. To do this, you can directly copy the layers from your device connected via USB or retrieve your data from the mobile device by following these steps:

  1. Go to Settings (Gear icon).
  2. Open the Project Folder.
  3. Locate the specific layer name.
  4. Use the three dots on the right side.
  5. Select the “Send to…” function.

Imported from GitHub comment by @SeqLaz on 2024-02-21T06:06:30Z

Hi both,

Thanks for raising this as a point of discussion again Sarah. The processes suggested SeqLaz will come in really useful as I never found a solution to this other than hoping for the best each time, much appreciated.


Imported from GitHub comment by @joewiseman1 on 2024-02-21T09:06:19Z

Hello, I was very glad to find this option that packaging is not necessary!
The reason I needed it is different and I will later issue a bug report - it has to do with warnings during packaging; they occur because we have about 70 mbtile files in our project which are stored in a ‘shared local dataset’; these warnings pop up in a seperate dialog window which is too large for the screen and cannot be resized, hence the “next” button is out of reach and packaging is not possible.
Fortunately, now we know that packaging is not necessary, we can use our project in Qfield, hurray!

However, I wonder what the workflow should be to get the gathered data back into the project. We will user several different devices to collect data and all collected points should come together in one project. I have tried synchronising using de sync plugin (as was mentioned above), but I haven’t yet been able to get that to work. During that process another baffling window appeared, telling me that the original project path could not be found and it mentioned a file path that was probably used in the very first version of my project when it was created (by somebody else) - I cannot find this file path anywhere in the properties or settings of the project or layers, so don’t understand where it came from. Also, I am not sure if this has anything to do with the reason that syncing does not work.
At the moment, I am at a loss about the workflow to combine all data into one project.

Hope that someone here can help me out!
Thanks in advance,
Karen


Imported from GitHub comment by @KarenBBla on 2024-09-03T13:10:51Z