Skip to content

Auto-upload fails with connection error #2278

Closed

Description

@tribut

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

Activity

  1. TeaspoonDD commented on Mar 4, 2018

    @TeaspoonDD

    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.

  2. tribut commented on Mar 4, 2018

    @tribut
    MemberAuthor

    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.

  3. prlj13 commented on Mar 4, 2018

    @prlj13

    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.

  4. mist0706 commented on Mar 4, 2018

    @mist0706

    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

  5. enoch85 commented on Mar 5, 2018

    @enoch85
    Member

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

  6. mario commented on Mar 5, 2018

    @mario
    Contributor

    Hopefully yes @enoch85 :)

  7. wouterverduin commented on Mar 5, 2018

    @wouterverduin

    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 :)

  8. xXSTrikeXx commented on Mar 5, 2018

    @xXSTrikeXx
    Contributor

    @wouterverduin @tribut try out latest 3.0.3

  9. enoch85 commented on Mar 5, 2018

    @enoch85
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions