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

Uploading a picture twice fails #581

Closed
gitbensons opened this issue Jan 25, 2017 · 11 comments
Closed

Uploading a picture twice fails #581

gitbensons opened this issue Jan 25, 2017 · 11 comments

Comments

@gitbensons
Copy link

Actual behaviour

  • After sucessfully uploading a picture from the camera to a folder, when ever I try to upload the same picture again to another folder it fails with "Hochladen fehlgeschlagen"

Expected behaviour

  • Upload should succeed

Steps to reproduce

  1. Create folder "Folder1"
  2. Open "Folder1" and upload a camera picture eg. "Picture1", upload succeeds
  3. Create another folder inside "Folder1", name it "Folder2"
  4. Open "Folder2" and try to upload camera picture "Picture1"
  5. Upload fails

Environment data

Android version: 6.0.1

Device model: Nexus 5x

Stock or customized system: CyanogenMod 13.0-20161222

Nextcloud app version: 1.4.0

Nextcloud server version: 11

@AndyScherzinger
Copy link
Member

Could reproduce it, thanks @gitbensons

Other scenario, have auto upload activated, take a picture have it uploaded by the auto upload and then afterwards manually upload it to a (different) folder. Will also directly fail.

@tobiasKaminsky
Copy link
Member

Is there an error message?

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jan 29, 2017

not in the UI, I didn't check this issue with ADB connected :(

Well, the Upload view say error I think, but that's it.

@AndyScherzinger
Copy link
Member

@tobiasKaminsky only thing I see in the log file:

01-30 19:14:58.430 2949-2985/com.nextcloud.client D/ExistenceCheckRemoteOperation: Existence check for http://myserver/remote.php/webdav/Folder1/IMG_20160917_104116.jpg targeting for  existence finished with HTTP status 404(FAIL)
01-30 19:14:58.438 2949-2985/com.nextcloud.client V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg with status:UPLOAD_IN_PROGRESS and result:UNKNOWN (old:/storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg status:UPLOAD_IN_PROGRESS result:-1)
01-30 19:14:58.440 2949-2985/com.nextcloud.client V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg with status=UPLOAD_IN_PROGRESS
01-30 19:14:58.462 2949-2985/com.nextcloud.client D/UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg
01-30 19:14:58.463 2949-2985/com.nextcloud.client D/UploadsStorageManager: notifyObserversNow
01-30 19:14:58.469 2949-2985/com.nextcloud.client E/UploadFileOperation: Upload of /storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg to /Folder1/IMG_20160917_104116.jpg: Operation finished with HTTP status code -1 (fail)
01-30 19:14:58.471 2949-2985/com.nextcloud.client D/UploadsStorageManager: updateDataseUploadResult uploadResult: com.owncloud.android.lib.common.operations.RemoteOperationResult@824503e upload: com.owncloud.android.operations.UploadFileOperation@5dd3e9f
01-30 19:14:58.476 2949-2985/com.nextcloud.client V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg with status:UPLOAD_FAILED and result:UNKNOWN (old:/storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg status:UPLOAD_IN_PROGRESS result:-1)
01-30 19:14:58.477 2949-2985/com.nextcloud.client V/UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20160917_104116.jpg with status=UPLOAD_FAILED

Weird thing, I can even upload a file in one folder, then delete it and then try to upload it again.... It'll fail (!)

@AndyScherzinger
Copy link
Member

Also calling @mario to the rescue. 🚒

@tobiasKaminsky
Copy link
Member

I used app with latest master and I cannot reproduce it on NC11 or NC-master...

@tobiasKaminsky
Copy link
Member

Now tested it also with the 1.4.0 as thread starter...
Maybe it depends on file size? I used a rather small (40kb) "test" image.

@tobiasKaminsky
Copy link
Member

Indeed, it happens to me if I upload a much larger (4mb) file.

@tobiasKaminsky
Copy link
Member

okay. :/
I now that it is my fault, I have implemented #159 in a not correct way.
I will fix it tomorrow.

@mario
Copy link
Contributor

mario commented Feb 13, 2017

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Feb 13, 2017

As this is merged in #nextcloud/android-library/33 I close this issue.

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

No branches or pull requests

4 participants