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

Auto-upload fails with connection error #2278

Closed
tribut opened this issue Mar 4, 2018 · 11 comments
Closed

Auto-upload fails with connection error #2278

tribut opened this issue Mar 4, 2018 · 11 comments
Labels

Comments

@tribut
Copy link

tribut commented Mar 4, 2018

Actual behaviour

Files are "stuck" in the upload queue. The files exist, but when retrying the App reports a "connection error". From the device log:

03-04 12:26:03.086  7438  7438 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg
03-04 12:26:03.086  7438  7438 D UploadsStorageManager: notifyObserversNow
03-04 12:26:03.101  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status:UPLOAD_IN_PROGRESS and result:UNKNOWN (old:/storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg status:UPLOAD_IN_PROGRESS result:-1)
03-04 12:26:03.101  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status=UPLOAD_IN_PROGRESS
03-04 12:26:03.115  7438  8099 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg
03-04 12:26:03.115  7438  8099 D UploadsStorageManager: notifyObserversNow
03-04 12:26:03.138  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status=UPLOAD_IN_PROGRESS
03-04 12:26:03.144  7438  8099 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg
03-04 12:26:03.144  7438  8099 D UploadsStorageManager: notifyObserversNow
03-04 12:26:03.179  7438  7438 D ExpandableUploadListAdapter: refreshView
03-04 12:26:03.179  7438  7438 D ExpandableUploadListAdapter: loadUploadItemsFromDb
03-04 12:26:03.181  7438  8099 E FileUploader: Error uploading
03-04 12:26:03.181  7438  8099 E FileUploader: java.lang.NullPointerException: Attempt to invoke virtual method 'long com.owncloud.android.datamodel.OCFile.getFileId()' on a null object reference
03-04 12:26:03.181  7438  8099 E FileUploader: 	at com.owncloud.android.operations.UploadFileOperation.run(UploadFileOperation.java:374)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:145)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:149)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at com.owncloud.android.operations.common.SyncOperation.execute(SyncOperation.java:93)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at com.owncloud.android.files.services.FileUploader.uploadFile(FileUploader.java:1090)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at com.owncloud.android.files.services.FileUploader$ServiceHandler.handleMessage(FileUploader.java:1023)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at android.os.Handler.dispatchMessage(Handler.java:102)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at android.os.Looper.loop(Looper.java:148)
03-04 12:26:03.181  7438  8099 E FileUploader: 	at android.os.HandlerThread.run(HandlerThread.java:61)
03-04 12:26:03.181  7438  8099 D UploadsStorageManager: updateDatabaseUploadResult uploadResult: com.owncloud.android.lib.common.operations.RemoteOperationResult@d7fbf32 upload: com.owncloud.android.operations.UploadFileOperation@e51d483
03-04 12:26:03.187  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status:UPLOAD_FAILED and result:NETWORK_CONNECTION (old:/storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg status:UPLOAD_IN_PROGRESS result:-1)
03-04 12:26:03.187  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status=UPLOAD_FAILED
03-04 12:26:03.192  7438  8099 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg
03-04 12:26:03.192  7438  8099 D UploadsStorageManager: notifyObserversNow
03-04 12:26:03.193  7438  8099 D FileUploader: NotifyUploadResult with resultCode: HOST_NOT_AVAILABLE
03-04 12:26:03.197  7438  8099 D FileUploader: Stopping command after id 114

Manually uploading the same file works.

screenshot_20180304-122427-censored

Expected behaviour

Files in the auto-upload queue should be uploaded.

Steps to reproduce

Unclear. Apparently it due to the target folder not existing (see comment by @TeaspoonDD below).

Environment data

Android version: 6.0.1

Device model: Moto X Play

Stock or customized system: Stock

Nextcloud app version: 3.0.2

Nextcloud server version: 13.0.0

@ghost
Copy link

ghost commented Mar 4, 2018

Same issue here. OnePlus5 Nextcloud 13.0.0 server, 3.0.2 app.

@TeaspoonDD
Copy link

Had the same issue. Samsung A5 2017 / Android 7.0 / App 3.0.2 / nextcloudpi v0.46.34 with Nextcloud 12.0.4

Made the month folder "03" in "SofortUpload" manually. The next picture auto upload worked fine.

@tribut
Copy link
Author

tribut commented Mar 4, 2018

Can confirm the workaround by @TeaspoonDD: After creating SofortUpload/2018/03 (but not SofortUpload/{Snapseed, WhatsApp Images}/2018/03 the two images that are supposed to end up in SofortUpload/2018/03 went through and the others did not.

@ghost
Copy link

ghost commented Mar 4, 2018

Confirmed; manually creating the monthly directory allows the uploads to proceed.

@prlj13
Copy link

prlj13 commented Mar 4, 2018

I'm having the same problem. I manually created the missing (monthly) directories, and then had to manually navigate and view the created directories in the app before the auto uploads started working again. I had manually created the directories in the nextcloud web interface, which alone doesn't fix the problem.

@mist0706
Copy link

mist0706 commented Mar 4, 2018

Same issue here on SGS8. Created folder manually in web interface (logging into console and creating the directory didn't work) and then visited the folder on on the phone.

Woth mentioning that the iphone app worked fine. It created the folder and everything

@enoch85
Copy link
Member

enoch85 commented Mar 5, 2018

I have the same issue. @AndyScherzinger @mario @tobiasKaminsky I suppose this will be fixed in 3.0.3?

@mario
Copy link
Contributor

mario commented Mar 5, 2018

Hopefully yes @enoch85 :)

@wouterverduin
Copy link

Would like to confirm and show what worked for me:
1: Manually create 03 folder
2: Navigate there in app
3: Take new picture

After step 3 it started to upload all other photo's aswell :)

@xXSTrikeXx
Copy link
Contributor

xXSTrikeXx commented Mar 5, 2018

@wouterverduin @tribut try out latest 3.0.3

@enoch85
Copy link
Member

enoch85 commented Mar 5, 2018

This is fixed in 3.0.3 just tested myself.

Please reopen if you think I'm wrong.

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

9 participants