Instant Upload fails with "Unknown error"

When Instant Upload attempt to upload a new picture, it will fail after 35-40% progress with "Unknown error". No corresponding log message is recorded on the server.

Steps to reproduce
1. Take a new picture with the Camera application.

Expected behaviour
Instant Upload should send the picture to the OwnCloud server without an error.

Actual behaviour
The upload aborts between 35 and 40% with "Unknown error". Retry is not successful.

Mobile client configuration
Client OS: Android 6.0.1 (Nexus 5, stock)
Client version: 2.2.0

Server configuration
Operating system: CentOS 6.8
Web server: nginx 1.10.1
Database: MySQL 5.5.38
PHP version: 5.6
ownCloud version: 9.1.2
Updated from an older ownCloud or fresh install: Upgrade, unsure of original version
ownCloud log (data/owncloud.log):

Additional Notes
The desktop client works as expected for syncing. Web also works for both desktop and mobile. I can download files from the server without any incident. The camera directory has been set appropriately to accommodate changes in the latest client. I previously ran my server with IPv4 and IPv6 addresses and dropped IPv6 support to work around issue #616. I've also recently changed my server certificate from StartSSL to LetsEncrypt and verified the SSL server both in browser and using

The Same problem.

Mobile client configuration
Client OS: Android 6.0.1 (OnePlus2)
Client version: 2.2.0

Server configuration
Hosted in Dreamhost with LetsEncrypt certificate

I have changed the php version from 5.6 to 7.0 in my shared hosting and now the uploads are already working correctly.

Thanks for reporting. Some logs would be helpful in this case to find out the source of the problem.

Also, in this error the server side can be involved due to this error rate. If any of you can provide us a test account in your servers, it will also be helpful. You can address that info to with

Which camera app do you use? the default one?

Attaching the server-side log. I'll email with a test account you can use to play with it from your side.

I'm using the default Camera app provided by Google.

owncloud.log (17.6 KB)

Thank you for your reply. After reviewing the attached logs, it is possible that the server was being upgraded while the photo was taken and was being uploaded?

This is what we think has taken place, following the log:
1. A photo is taken and app starts the instant upload.
2. Server blocks the file for avoiding edition from other user.
3. Server goes into maintenance mode and starts the upgrading.
4. Upload aborts between 35 and 40% with "Unknown error" because server is already in maintenance mode.
5. Retry is not successful because server is not unblocking the file was being uploaded before the upgrade, and a duplicate key error is thrown.

We are currently working on showing a message to the user when maintenance mode is enabled, but it is not included in app final version yet.

1 Like

The test account you sent returns a credentials error when trying to login.

It's possible, but all subsequent attempts to upload different files (taken well after the last upgrade) also fail. This might explain one or two failures, but not the dozen or so that have piled up.

Try again. I reset the password to make sure it's correct. (KeePass kept on trying to autofill with my personal one.)

Thank you for the test account and this error report. We have just added it as an issue to the Owncloud Android repository. We will work on it, check out the link below for more information:

@elforesto, your setup is not typical. Could you give us more details about it?

In current tests, PUT requests are responding with a 502 status code - Bat gateway? Are you using a proxy server? Did you change its configuration recently?

Besides, the response body of the response doesn't fit the 502 status code , it includes a web page stating '405 - Method not allowed'; seems strange.

How do you access the web UI? At this moment, the URL is redirected to some kind of error/warning page from your host provider. Did you change the server configuration yesterday or today? Are the uploads from web UI, desktop or iOS still working?


That's a strange response. I'm using Webfaction as my host and did a manual install (unpack the archive and run scripts) rather than using any kind of control panel. I don't have any direct access to the nginx configuration as this is managed by the hosting provider. So far as I can tell, the .htaccess file is the stock one included in the archive.

Uploads are working fine from desktop clients (Win 10) and the web UI (Chrome on Win10 and Android Marshmallow). I haven't made any changes to the application for weeks.