opengisch / QField

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

Photos not synchronising from Qfield to Cloud #4765

Closed vk3il closed 1 month ago

vk3il commented 10 months ago

This issue was originally raised in the discussion topic as per below on 28 February 2023. It appears to remain an open issue and is certainly impacting me, so keen to get a resolution. See the discussion thread below for some more details.

Discussed in https://github.com/opengisch/QField/discussions/3983

Originally posted by **Rubendbdv** February 28, 2023 Greetings, We recently had a problem with photos not synchronising on the cloud. For this project we place points (trees) and fill in attributes (information regarding the trees), as well as photos. The attributes get pushed through with synchronising the cloud, but the photos don't. This problem happens with photos from seemingly random times and with 2 types of connections (pushing with WIFI or Mobile Network gives the same result) Specifics we use: -Tablet (Trimble R2) with Qfield (version 2.6.3) -Desktop (different devices, OS Windows 11) with Qgis 3.22.15 -Connection with WIFI aswell as Mobile Network -Qfieldcloud username: "thomasdbdv" -Project: "boombeheer_maasmechelen" Normally we place a point and the attributes and photos get pushed through. We synchronise via Qgis and we can see the attributes AND photos on our desktop. For the past days (since February 1st) SOME photos are only stored locally on the tablet but are not pushed through with the rest of the attributes. We can still view the photos when we click on the point in Qfield, but not on desktop Qgis. Now, the bigger issue is that whenever we synchronise the same project in the future using Qgis on desktop, it automatically deletes these photos from our local folder (when we 'prefer cloud'). qgis-ltr-bin_Q4LSlIyTuK So far the only way we could solve this was manually copying the photos from the DCIM folder on the tablet to the folder on our desktop where Qgis normally stores the photos. We can see this aswell in our libraries: the DCIM folder where the photos are normally stored now has 277 items that are synched by cloud. Now when we copy the items (371) out of the local folder (exported from tablet to desktop) into this cloud folder, the total amount of items becomes 424, where there are 224 items with the same name. explorer_BJKqC4VKFT This also shows that the photos that won't synchronise to the cloud are not from a specific timeframe, but rather in groups (the highlighted items are the ones copied from the local exported folder, the non-highlighted items are the ones already synchronised): explorer_UuM517rjLa explorer_C7kvchTtQg The steps we take: -Place a point in a project using Qfield. -Fill in information (attributes) and a photo. -Push changes in the Qfield app. -Qfield gives notification that the changes have been pushed through, but it doesn't say anything about attachments (before it said: "(amount) attachments are being uploaded in the background" -Synchronise on desktop using Qfield cloud plugin -Qgis cloud plugin sees that the cloud has less photos in it than the local folder on our desktop -Qgis cloud plugin wants to delete them (because we 'prefer cloud') Even though we can solve this problem manually at the moment, everytime we synchronise in the future it appears again, and we don't know if it will happen with other projects. All help is greatly appreciated. Sincerely, Ruben
serverul commented 10 months ago

Hi there.

Is there any chance that you have a free qfield account? If so, you are limited to 100Mb of data for all the projects. Maybe you reached the qouta.

vk3il commented 10 months ago

@serverul No, I have a paid qfield account with plenty of space remaining, so I don't think that's the issue.

encleadus commented 8 months ago

We are having the same problem. Our paid user with 6 gigabytes of storage not syncing all the pictures from the device to cloud. We use samsung s23 ultra on site. Yesterday we have used qfield on a live project and unfortunately failed to sync several photos. In QGIS qfield settings, we save relative path, image type (auto size) --this saves to DCIM folder, picture resize setting set to 1500 px to reduce size.

Our surveyor took photos all day and at the end of the day he pushed sync. I cannot confirm he changed app or changed internet connection wifi to 4/5g or vica versa during sync (btw I am not sure when the sync completes as there is no info feedback if the photos were uploaded as well)? . But today we will make sure he keeps open the app and stays on wifi only.

Our site surveyor took 175 photos based on the synced database records (I've checked it with counting the relative path records where not null). In the DCIM folder I counted 160 photos.

So I've started to investigate and I identified two things which should not happen anyway. In the process we use the qfield camera, but in some cases our surveyor decided to took photos outside of the app for later use with the native camera and he picked them later on as existing photos during attribute edit. Those photos did not come through.

the second thing when our user retake some photos during attribute edit. There will be one relative path saved, but all the unused photos came through. that is why we have got 27 path saved in a database table and received 29 photos.

Unfortunately this was only just half of the mystery, the other half I think is related to this topic as this looks like some of the photos (looks random) never arrives to qfield cloud. I've started to compare and locate the exact missing photos, as they are still exist on the android device. I realized a few things here and however I don't understand the process I share my points.

It looks like the photos stored on android are not the resized ones (at least what I have found), Where the resized ones are kept? when the resize happens? can the sync of the picture run to time out because lets say the original pictures are too big and causing missing photos in the cloud? The android photo names are different from the path records stored in the database, even the timestamp is different so it makes really hard to do a manual match to find the missing photos.

All in all I think this is a critical issue as most of these site data collections are heavily relate on pictures and if anyhow a picture or few does not come across to the qfield cloud there should be an option to resend the images, or it should be an inbuilt feedback process to compare and check if the number of the pictures are adds up with the number of the paths saved.

one example of missing photo located on android: size 9.3mb 3000px*4000px image

same photo in the database: path saved to database there is no matching photo in the DCIM folder after sync. (timestamp is a bit different, the target photo should be 1500px*Ypx and the size around 600kb. image

CACG1022 commented 7 months ago

Hello everyone, I want to ask if anyone has found a solution to this problem? I have been experiencing this issue for a few years now. Some photos never arrive, and sometimes photos get deleted on the device they were taken on. I need an urgent solution, I would greatly appreciate it if anyone knows how to resolve this issue. I also use the paid version, but they do not provide a definitive solution.

gounux commented 7 months ago

Hi, I also came to this problem, photos not being uploaded to the Cloud. Figured out that when closing the QField app and reopening it, there is a notification that pops up and says that recent changes are pushed to the cloud. After having checked in QGIS, indeed the photos are now available for synchronization. Maybe a background task issue in the synchronization pushing process ?

SeqLaz commented 7 months ago

Hello. It is advisable to wait patiently for a while, as the pictures may take some time to upload depending on the device's connection speed, especially if there are many pictures attached, even if there is not a notification.

Alternatively, you can try to retrieve your data from the mobile device by following these steps:

nirvn commented 1 month ago

@vk3il , QField 3.3.10 has received a number of fixes with regards to photo synchronization with QFieldCloud. In addition, it is now possible to manually send individual images to the cloud in case of upload failure. The action is available in the project folder panel through the 3-dot menu of images.

Let us know if 3.3.10 works for you.

github-actions[bot] commented 1 month ago

The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.