Android client instant upload not working - How to debug?


I’m using Nextcloud 28.0.3 (self-hosted) and Android App 3.28.0 (but the same error happened on previous versions of server and client) and for some time the “Instant upload” feature stopped working. At this moment I have more than 500 photos and videos constantly failing to upload. From time to time one or two do upload.

The error on the client is always “Server not found” and it happens after the upload reaches 100%.

I can’t find anything on the client nor the server logs.

The server does not complain about anything, except that I’m using 32bit php and that I’m using sqlite for file locking, which may be slow (but I’m not willing to install Redis right now).

How should I debug this?

Same here. The android upload doesn’t work anymore. Always: Update failed.

The only way to know for certain would be to get logs. You can either get them via adb (here’s how) or install a Dev edition of the client thne try reproducing the behavior in it (the Dev edition provides the logs inside via Settings->Logs).

My speculative guess is you may have encountered this, which was fixed in the just released v3.28.1 patch release (which doesn’t look like it’s made its appearance in the Google Play Store, but is downloadable).

So for whatever reason, Nextcloud app file permissions got removed. Going into Android permissions and allowing Nextcloud app access to all files solved the upload errors.

Hmm, not my case. Sometimes, and I’m mean VERY rarely one photo or video gets uploaded.

Also, I downloaded and installed the client from f-droid store.

Will try this tomorrow. Thanks.

So, after a long time I decided to take a look at this again and finally decided to read some OWASP security warnings/errors.
After some time I ended changing the file “/etc/modsecurity/crs/nextcloud-setup.conf” to include the following line:
SecRuleRemoveById 980120 980130 920350 911100 949110 920420 913100 920450 920280

I had tried this before in some other modsecurity config file and it didn’t work. But this one worked and I can upload all files now.

Be warned that this probably creates some security issues, but I’ll review that later.

PS: I had a nextcloud exceptions config file, but it had syntax errors and I decided to ignore it.