nextcloud / ios

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

Transfers are not retried when they fail #751

Open spantaleev opened 5 years ago

spantaleev commented 5 years ago

In an area where changing between networks happens often (LTE / Pocket Wi-Fi / other public Wi-Fi, possibly with walled garden login), Nextcloud transfers are unreliable.

I have a bunch of transfers that are stuck (forever?) with 2 different kinds of error:

Expected behaviour

Failed transfers are retried again later. If not automatically, then at least manually (by tapping on the transfer).

Actual behaviour

When a transfer fails, it's not retried at all and remains in an error state forever.

Steps to reproduce

Unknown.

iOS version

iOS 12.1

App version

Nextcloud for iOS 2.22.7.4

Server configuration

Operating system: CentOS 7.5

Database: PostgreSQL 11.1

Nextcloud version: 15.0.0 running within the official Nextcloud Apache image.

marinofaggiana commented 5 years ago

Hi @spantaleev thanks for you report ... it's difficult for me repeat this issue, how I can reproduce it ? I have try with switch Wi-Fi / 4G but do not sprint the error.

spantaleev commented 5 years ago

@marinofaggiana, I think it's more to do not with changing between Wi-Fi and 4G, but rather with ending up up on a Wi-Fi network which uses a walled-garden login (forwarding traffic to some login page, which obviously fails SSL certificate checks, etc.)

sebastiaanveld commented 5 years ago

@marinofaggiana I just ran into the same issue. I was in airplane-mode when I shot some movies (.mov) which queued up for uploading in the Activity screen message status showing "Transfer aborted'. I just duplicated:

Environment: NC IOS App 2.22.8.11 NC 15.0.0

fileuploadaborted

mattf commented 5 years ago

fyi, for error code 413 (payload too large), i find that nc ios app 2.22.8.11 (from testflight) will retry the transfers

marinofaggiana commented 5 years ago

Hi everyone try the 2.22.8 (13), I don't know if it repair this issue but I have found a little bug

spantaleev commented 5 years ago

How can one test that version? It's some build released on TestFlight?

instantlinux commented 5 years ago

I am able to reproduce this as well. I was moving nextcloud to a new host, forgot to update the buffer-size params, and now have about 100 photos in limbo. This bug should be easy to reproduce: install nextcloud behind a nginx reverse-proxy, set its proxy-body-size / client-body-buffer-size values below the size of typical photos, try to do an upload, then readjust the proxy to allow large-file uploads. The iOS app won't give you any option to retry the failed Error code 413 uploads.

Nextcloud for iOS 2.22.7.4 Nextcloud server 15.0.0

See also: nextcloud/desktop #925.

Xansala commented 5 years ago

The issue still remains with iOS 2.22.8.20 and it persists also with an update to server version 15.0.2 - there is no possibility to trigger manually a retry nor does the app seem to trigger it automatically (these fills are hanging there for weeks already). I have the same issue on my wife's iPhone too (both at latest iOS). Here is a screenshot from my phone how it looks like:

Edit: changed picture size

DrRSatzteil commented 5 years ago

I also get a variety of weird upload issues (locked ressources, server not responding, failed uploads aren't retried) especially when I'm trying to upload the whole camera roll from my phone. One major issue that I'm observing since the last versions is that photo uploads are either not retried at all or retried over and over again after the upload was completed (the file is already on the server but the app keeps on uploading it again and again). The funny thing is that the app keeps on doing this even when you delete the file from the phone (it still seems to be cached somewhere).

But there is something interesting I just found out today (maybe it helps to track down the issue): If I'm looking at the "Transfers" screen uploads keep on repeating over and over again and the queue does not get any shorter. However when I'm navigating to the folder where the uploads should be placed (I'm using subfolders in the photo directory) the uploads are working ok (still some weird errors every now and then but I'm able to upload all the files and failed uploads are retried and work eventually). This whole behaviour seems a bit weird but you may try if this "fixes" your issues as well.

marinofaggiana commented 5 years ago

Hi the new 2.22.9 is available for testing in TestFlight with several news for the transfer, please try this new version for make test on upload.

DrRSatzteil commented 5 years ago

Where can I find the invite for Testflight?

EDIT: Sorry, found it: https://github.com/nextcloud/ios/issues/513

marinofaggiana commented 5 years ago

@DrRSatzteil https://testflight.apple.com/join/GjNbfo2a

DrRSatzteil commented 5 years ago

Thanks!

I just restored 100 Photos from the "recently deleted" folder an the app instantly began to upload. All the files where uploaded successfully without any errors or unneccesary retries!

The App is still not super responsive while the upload is running (scrolling in the transfers list is kind of choppy) but it gets the job done. Looks pretty good!

marinofaggiana commented 5 years ago

@DrRSatzteil whats model of iPhone or iPad use you ?

DrRSatzteil commented 5 years ago

I used an iPhone 7 32 GB (MN8X2ZD/A). Nexcloud Server is version 15.0.2.

DrRSatzteil commented 5 years ago

To get a scenario similar to the one I had earlier today I restored even more pictures and started to reupload about 600 Photos. So far (uploaded about 150 pictures) without any of the issues I had this morning with 2.22.8.

Edit: Upload went very smoothly for all 600 files

user32000 commented 5 years ago

I've got two stuck uploads in iOS app version 2.23.1.4. The Transfers screen shows both files, but below that says "0 elements to upload". The app is set to store documents "On my iPhone". When the two files were created, the iOS device had a good Internet connection, but could not access the Nextcloud server (which sits on a private network). Returning to the private network later on, these files are now stuck, cannot be deleted in the iOS app, and there seems to be no way to trigger a new upload attempt.

Files I subsequently create in app while connected to the private network transfer immediately and as expected.

Xansala commented 5 years ago

Just wanted to leave a comment that with the latest iOS App the issue got resolved. Could upload more than 7000 pictues/videos smoothly.