nextcloud / ios

📱 Nextcloud iOS App
https://itunes.apple.com/us/app/nextcloud/id1125420102
GNU General Public License v3.0
1.94k stars 876 forks source link

With 4.4.0 auto upload stopped working #2026

Closed ne20002 closed 1 year ago

ne20002 commented 2 years ago

Steps to reproduce

  1. Shoot Photos

  2. Do not open Nextcloud app for some time (days)

  3. No auto upload / no increase of counter on app icon

  4. Open Nextcloud app after some time (days)

  5. Counter increases (detecting new photos)

  6. Files are uploaded as long as the app is open / in foreground

Expected behaviour

At least not chunked photos and videos should be auto uploaded.

Actual behaviour

No auto upload at all

Environment data

iOS version: latest 15 Nextcloud iOS app version: 4.4.0 Server operating system: Debian bullseye Web server: nginx, php-fpm docker Database: postgres 13 Nextcloud version: 23.0.5

dukey commented 2 years ago

I believe this is related to the removal of the GPS code.  I also noticed that the upload in the background option has been removed.

While I'm not a software developer, I imagine the "proper" solution would be to have Nextcloud server send a hidden notification to iOS clients to wake time up from time to time.  The client checks to see if there is anything to upload, and if there is, tells the server to wake it up on a more frequent basis so uploads process.  Once updates are completed, notifications resume at the original rate (maybe every 20 or 30 minutes)

I imagine this would require changes in both the server code, as well as the iOS client.  Google, Amazon, Flicker, etc all seem to have the ability to upload in the background  without GPS. Other than manpower, I don't see a reason why Nextcloud can't see the same.

On Tue, 2022-05-31 at 00:13 -0700, ne20002 wrote:

Steps to reproduce 1. Shoot Photos

  1. Do not open Nextcloud app for some time (days)
  2. No auto upload / no increase of counter on app icon
  3. Open Nextcloud app after some time (days)
  4. Counter increases (detecting new photos)
  5. Files are uploaded as long as the app is open / in foreground Expected behaviourAt least not chunked photos and videos should be auto uploaded. Actual behaviourNo auto upload at all Environment dataiOS version: latest 15 Nextcloud iOS app version: 4.4.0 Server operating system: Debian bullseye Web server: nginx, php-fpm docker Database: postgres 13 Nextcloud version: 23.0.5 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
jasondaigo commented 2 years ago

I will miss this. Very sad they removed it.

ne20002 commented 2 years ago

I don't think the intention was to remove the upload. In the comment @marinofaggiana mentioned that the upload in now anachronistic ... so I assume it shall be triggerd time based. But at least with my devive it does not seem to work. But we all know that the backgroud upload in iOS is problematic due to iOS. I would really appreciate to have a rework/redesign for the upload, including chunked files in background, as I believe, the upload in background is a very important feature.

jasondaigo commented 2 years ago

delete pictures from iphone after upload option was also removed, idk.

marinofaggiana commented 2 years ago

Hi all, a bit of clarity:

marinofaggiana commented 2 years ago

delete pictures from iphone after upload option was also removed, idk.

Schermata 2022-06-01 alle 09 32 00

ne20002 commented 2 years ago

Put the phone on charge and you will see that sooner or later the iOS fetch will wake up the app that will start the routine. Unfortunately this is the best that can be done.

This is what I expected. Currently I haven't seen this behaviour. :(

If/when this is working I'd really like to see chunk uploiads in background.

fermulator commented 2 years ago

@marinofaggiana https://github.com/nextcloud/ios/issues/2026#issuecomment-1143221036 i think a small mistake here was made if the user previously had delete from camera roll enabled … since the change/move the setting is disabled :( i had to come here to github to understand what was going on

ne20002 commented 2 years ago

Hi @marinofaggiana

Now that there has been a few days since version 4.4.0 has been released I can confirm that background auto upload is indeed working. Even though it is triggered not as often as I would expect. It seems as if it really needs some time on the charger to kick in. If the iPhone is removed from the charger too soon after been fully charged it just does not upload.

I also see that big files or files bigger than the defined chunk size are still not auto uploaded. I request a change to the upload mechanism:

The uploads of big files in chunks does make sense in two scenarios:

a) limit the size of the http request payload and b) be able to resume (an interrupted) upload (instead of starting again from beginning)

If it is possible to upload a small file in background it should also be possible to upload a chunk and to resume with next chunk the next time the background upload is triggered.

So this is what I'd like to have when the background processing is triggered:

a) a function to check for new files in the photo roll for upload and add those files to the upload list /queue. This function only needs to be processed at maybe every 15 minutes, so if the time from last call is less than that, just skip to the next function.

b) upload of next file or chunk.

1st) Check if a file smaller than chunksize is in the list

if yes -> upload the file if no -> goto 2nd

2nd) check if a file for chunk upload exist with already uploaded chunks

if yes -> upload next chunk

if this has been last chunk: check if all chunks are still available on server, if yes -> assemble file if no: restart chunks missing on server

if no -> start with upload of first chunk of next file

then restart with function a)

With this approach small files (less than chunksize) will be uploaded with priority to keep the upload list shorter (easier to handle, big files don't block other uploads). Also, big files shall be uploaded in background as well.

Would this be a possible way to do it?

jstokholm commented 2 years ago

Thank you for all your hard work.

Background autoupload of photos and videos was the main reason I set up a Nextcloud server.

Now it is not working anymore on any of our 5 family iPhones, which are the ones needed to be backed up automatically to avoid loosing precious photos. All are charging every night while Wi-Fi connected.

It worked flawlessly with the gps option on. It would indeed be a great thing, if you can bring back that feature - people afraid of tracking can just turn it off. But please let us choose this for ourselves.

ne20002 commented 2 years ago

For me it is not really clear on when the auto upload happens. But this seems to be mainly caused by iOS behaviour. As it sometimes kicks in, I believe it is working (as much as possible in iOS).

marinofaggiana commented 2 years ago

For me it is not really clear on when the auto upload happens. But this seems to be mainly caused by iOS behaviour. As it sometimes kicks in, I believe it is working (as much as possible in iOS).

Exactly! Much as possible in iOS.

twizzayy commented 1 year ago

Sad to see the GPS syncing go. It worked flawlessly. I am missing photos on my server now. :(

marinofaggiana commented 1 year ago

Try the V 4.5

milfer322 commented 1 year ago

Prueba la V 4.5

I installed today the nextcloud and I configure and test the autoupload with the App for ios 4.5.3 and only upload when I have the app in opened.

Is my first day with nc but seems that dont works fine. Pd: the first night that upload a photos, why in the night? Thanks so much!

twizzayy commented 1 year ago

Try the V 4.5

@marinofaggiana Ive been verifiably using v4.5.3 for at least 24hours now. I am self hosting the current Nextcloudpi Docker build on an amd64 computer. It still seems that photos aren't syncing in the background. Could have been a bad wifi connection. Ill test again tonight.

Could the culprit be that Im not on NC 25 yet?

What changed with auto upload? The release notes aren't too specific (which is probably the way it should be). But is there a longer explanation somewhere else?

Haui1112 commented 1 year ago

Same issue here. iOS client is not uploading in the background at all. I tested it for 24h and it's not working. Iphone has been charged to full multiple times since i have a wireless charger I just put the phone on. The app does not upload a single photo until I open it.

Does it maybe need to download the photos stored in icloud and is getting denied? I found that my internet monitor goes up and down in kind of a sinus curve when nextloud is just uploadint through wifi. This makes sense as the original photos are stored in the cloud.

jstokholm commented 1 year ago

It does not work.

Have Nextcloud on 5 iOS devices which all used to auto upload, the main (only) reason for me to have a server running. None of them are aotouploading on the newest version. All are set to Wi-Fi only but are on different versions of iOS including the newest.

gmeks commented 1 year ago

Is there anything we can do to help debug this issue?

My wife also has this issue, and in here case the automatic upload seems to have disabled itself ( The setting itself).

marinofaggiana commented 1 year ago

Please try: Version 4.5.4 build 6 in TestFlight

marinofaggiana commented 1 year ago

plase use: https://github.com/nextcloud/ios/issues/2225

venkat9507 commented 1 year ago

auto update not working ... on IOS what to do .. now i need to keep the app open all the time even .. while charging not working

ajaufura commented 1 year ago

I confirm. Same issue here with iphone ios. Photo is not uploading in the background. Is there a fix for this?

jstokholm commented 1 year ago

Still also very sporadically for me, whether it works or not - would a more simple “trigger auto upload” at a specified time point e.g. 3AM every night be a possible addition?

JSuenram commented 1 year ago

Has this ever been solved? We also have issues with auto upload....

chaesngmin commented 1 year ago

Still not working on iOS v16.4.1 Nextcloud v4.8.0.5

Only starts uploading as soon as the app is opened.

ChildLearningClub commented 1 year ago

Hi all, a bit of clarity:

  • we have removed the GPS code for "detect" the new photo ? Yes ... why ?
  1. Many users did not understand the reason for this choice and considered it almost a tracking system
  2. Many users thought it limited the battery (False because the service did not use the true GPS but only the 3/4/5G interpolation of cells)
  3. From several version Apple has introduced the Background processing, resolved ? NO but is a little more
  • so how do I do it? ?
  1. Put the phone on charge and you will see that sooner or later the iOS fetch will wake up the app that will start the routine. Unfortunately this is the best that can be done.

With a system that already struggled with running sync in the background I don’t understand the decision to remove one of the possible usable options?

I can say I am one of those users that didn’t use the GPS because I thought it would limit my battery life. If this statement was made more clear before then I think more people would have used it as a way to trigger the background jobs.

There is no way to add GPS back in for those that would like to use it?

tim427 commented 1 year ago

Still not working on iOS v16.4.1 Nextcloud v4.8.0.5

Only starts uploading as soon as the app is opened.

Same with iOS v16.5 and Nextcloud v4.8.0.5

SwedenGuy commented 1 year ago

Or at least give an option to keep the screen alive like OneDrive... Uploading 35000 files when you phone locks every 5 minutes (company mandated policy) is a small nightmare.

MoritzJens commented 1 year ago

@marinofaggiana

Im quite new in the nextcloud world, make my first experience with my self hosted cloud. I found this thread only through google because i mention the same problem.

So please take that in mind and when there is such an offer which is called "automatically upload" and you have to do something that "automatically" comes true then make a note beside that option which explains exactly how it works ( or when not ).

Im trying now the "pluged in power over night" method but i only got the information from a post in that thread ... thats not very user friendly nor easy to find out.

lets see if it changes something for me ... otherwise the option should renamend or in best case we need an other solution for it?

EDIT: For me the same. Network connection gots broken it says after plugged it in, backround activation is on for the app, app is not in the foreground while push the power button of the phone to lay it down ...

So for me that function does also only work if the app is in the foreground plugged or not plugged.

bunk3m commented 10 months ago

Why was this issue closed when it is obvious from the number of comments that it doesn't work? Is this issue closed because it is a duplicate?

SwedenGuy commented 10 months ago

Why was this issue closed when it is obvious from the number of comments that it doesn't work? Is this issue closed because it is a duplicate?

I continue to have the same problem. It gets very tiring. Auto upload of photos from IOS is the only reason that I run Nextcloud and the lack of it and lack of attention to it is annoying

frederikb96 commented 10 months ago

As far as I understand it, all input should go to this issue about auto upload and IOS: #2225

And there is a guide on how to generate logs, such that developers can debug the problem.

But I can also confirm that it is not working as expected. My sister is using IOS and I set up the app on her phone with auto-upload enabled etc. and simply no new uploads are happening - so not working out of the box. However, I can not debug it since she is living somewhere else, but I will also try to generate logs once I am at her place again.