opengisch / QField

A simplified touch optimized interface for QGIS
http://www.qfield.org
GNU General Public License v2.0
829 stars 226 forks source link

QField error during upload of geopackages: invalid_dataprovider #5350

Closed anheinra closed 3 months ago

anheinra commented 4 months ago

Describe the issue

I get the error "Packaged layer 'layer_name' is not valid. Error code invalid_dataprovider, error message: File 'name_file' missing." Can someone help? I already tried moving the files to the same file as the cloud project, as someone has suggested, but that didn't work. I am new to QField, so I would appreciate help!

Screenshots and GIFs

Bildschirm­foto 2024-06-18 um 16 34 15

Desktop (please complete the following information)

Mobile (please complete the following information)

[anheinra, Kartierunterlagen_Wellritztal]

SeqLaz commented 4 months ago

Hi @anheinra , It seems like the GeoPackage location was saved or imported from the wrong path. To fix this, find the correct QFieldCloud project folder path. You can check the Properties of the project to locate the folder path, which is typically (../{user}/QField/{Project name}/). Once you find the correct folder, copy and paste the GeoPackage inside the folder, then import the layers into the QGIS project and synchronize any changes to the cloud.

anheinra commented 4 months ago

@SeqLaz Thanks for the quick answer! Unfortunately, the geopackages seem to have the correct folder path... The path seems correct in the cloud, however changes are not uploaded to my mobile device. When I open the cloud project, everything is in place. However, I am unable to open the QGIS project, which includes the reference files for the cloud. I didn't have that problem yesterday. It appears blank in the starting screen and I can not open the qgz-file in the folder.

Bildschirm­foto 2024-06-20 um 11 03 53
SeqLaz commented 4 months ago

@SeqLaz Thanks for the quick answer! Unfortunately, the geopackages seem to have the correct folder path... The path seems correct in the cloud, however changes are not uploaded to my mobile device. When I open the cloud project, everything is in place. However, I am unable to open the QGIS project, which includes the reference files for the cloud. I didn't have that problem yesterday. It appears blank in the starting screen and I can not open the qgz-file in the folder. Bildschirm­foto 2024-06-20 um 11 03 53

@anheinra could you try the new packager? to improve synchronization across devices.

You can find more information about this optimized packager at: https://docs.qfield.org/get-started/tutorials/get-started-qfc/#enhance-your-project-with-the-optimized-packager

I kindly request you to try synchronizing your project using this new functionality. To do so, please navigate to the Settings of your project and make the changes to the packager.

suricactus commented 3 months ago

@anheinra actually your project stores absolute paths to your layers. Can you please force the layer files to be relative paths. I can see in the screenshot you have provided there are paths that are /Desktop/Stadium Lab/, which are absolute paths from your system. If you make sure all your project files are in the same directory and the qgs project stores them as relative paths, you will no longer experience this problem.

sboillat commented 2 weeks ago

I had the same error "invalid_dataprovider" with each one of my layers. This even though all .gpkg files are in the same folder as the project, and project properties are set to relative. I found out that if I create a new project with another name, upload all my .gpkg and style files again and then upload to QFieldCould, it works. But if I close the project and re-open it, I get the error again.