Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image upload fails after removing the image one time (UNKNOWN_ERROR) #710

Closed
togglecode opened this issue Mar 3, 2017 · 12 comments
Closed
Labels

Comments

@togglecode
Copy link

Actual behaviour

  • Upload an image
  • Remove the image after upload
  • Upload same image again
  • Upload get's failed, and you will get the same error again even if you "retry" the upload

Expected behaviour

-upload should work even after removing and reuploading

Steps to reproduce

  1. upload image
  2. remove the image (from the App)
  3. Try to re-upload the image

Environment data

Android version: 6.0.0

Device model: Moto G3

Nextcloud app version: 1.4.1(stable) but I also tried it on master branch

Nextcloud server version: https://demo.nextcloud.com

Logs

Nextcloud log (data/nextcloud.log)

I/ServerNameIndicator: SNI done, hostname: demo.nextcloud.com
D/skia: --- SkImageDecoder::Factory returned null
D/GetRemoteUserInfoOperation: Successful response: {"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"enabled":"true","quota":{"free":135740416,"used":7074735,"total":142815151,"relative":4.95,"quota":-3},"email":null,"displayname":"admin"}}}
D/ExistenceCheckRemoteOperation: Existence check for https://demo.nextcloud.com/testcloud/remote.php/webdav/Photos/ targeting for  existence finished with HTTP status 200
D/UploadFileOperation: Checking name collision in server
D/OwnCloudClient #60: REQUEST HEAD /testcloud/remote.php/webdav/Photos/IMG_20170209_154333058_HDR.jpg
D/ExistenceCheckRemoteOperation: Existence check for https://demo.nextcloud.com/testcloud/remote.php/webdav/Photos/IMG_20170209_154333058_HDR.jpg targeting for  existence finished with HTTP status 404(FAIL)
I/RefreshFolderOperation: Checked admin@demo.nextcloud.com/testcloud/Photos/ : not changed
V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg with status:UPLOAD_IN_PROGRESS and result:UNKNOWN (old:/storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg status:UPLOAD_IN_PROGRESS result:-1)
V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg with status=UPLOAD_IN_PROGRESS
D/UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg
D/UploadsStorageManager: notifyObserversNow
D/RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
E/UploadFileOperation: Upload of /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg to /Photos/IMG_20170209_154333058_HDR.jpg: Operation finished with HTTP status code -1 (fail)
D/FileDisplayActivity: Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
D/OwnCloudClient #61: REQUEST GET /testcloud/ocs/v1.php/apps/files_sharing/api/v1/shares
D/UploadsStorageManager: updateDataseUploadResult uploadResult: com.owncloud.android.lib.common.operations.RemoteOperationResult@7fa80b2 upload: com.owncloud.android.operations.UploadFileOperation@48b3803
V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg with status:UPLOAD_FAILED and result:UNKNOWN (old:/storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg status:UPLOAD_IN_PROGRESS result:-1)
V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg with status=UPLOAD_FAILED
D/UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20170209_154333058_HDR.jpg
D/UploadsStorageManager: notifyObserversNow
D/FileUploader: NotifyUploadResult with resultCode: UNKNOWN_ERROR

@mario
Copy link
Contributor

mario commented Mar 3, 2017 via email

@togglecode
Copy link
Author

Oh that's good to hear @mario . May I ask how I can test it? because now it throws me an OC exception as JSONException: No value for quota.

@mario
Copy link
Contributor

mario commented Mar 3, 2017 via email

@togglecode
Copy link
Author

well, the demo server is on version 11.0.1.2

@mario
Copy link
Contributor

mario commented Mar 3, 2017

OK. So ... https://play.google.com/store/apps/details?id=com.nextcloud.client&hl=en

But you need to subscribe to a beta version, and version should be 1.14.2 RC1 ;)

@togglecode
Copy link
Author

togglecode commented Mar 3, 2017

oh... but commit f0bbb4b is 1.4.2 RC1 and it gives me this:

D/OwnCloudClient #2: REQUEST GET /abcdtest/ocs/v1.php/cloud/user
D/GetRemoteUserInfoOperation: Successful response: {"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"id":"admin","display-name":"admin","email":null}}}
E/GetRemoteUserInfoOperation: Exception while getting OC user information
                              org.json.JSONException: No value for quota
                                  at org.json.JSONObject.get(JSONObject.java:389)
                                  at org.json.JSONObject.getJSONObject(JSONObject.java:609)
                                  at com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation.run(GetRemoteUserInfoOperation.java:152)
                                  at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:136)
                                  at com.owncloud.android.authentication.AuthenticatorAsyncTask.doInBackground(AuthenticatorAsyncTask.java:84)
                                  at com.owncloud.android.authentication.AuthenticatorAsyncTask.doInBackground(AuthenticatorAsyncTask.java:41)
                                  at android.os.AsyncTask$2.call(AsyncTask.java:295)
                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                  at java.lang.Thread.run(Thread.java:818)
![device-2017-03-03-180547]

You can try it:

Server: https://demo.nextcloud.com/abcdtest
UN: admin
pw: admin

@togglecode
Copy link
Author

device-2017-03-03-180547

@mario
Copy link
Contributor

mario commented Mar 3, 2017

Are you building directly from source?

Try master then please :)

@togglecode
Copy link
Author

Yeah, I am on master, I mean I did a clean checkout/pull from master :D

@mario
Copy link
Contributor

mario commented Mar 3, 2017 via email

@mario
Copy link
Contributor

mario commented Mar 3, 2017

Thanks. shrug Dunno how this one slipped through.

@togglecode
Copy link
Author

That's the beauty of software engineering :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants