{"action":"created","issue":{"url":"https://api.github.com/repos/nextcloud/android/issues/2278","repository_url":"https://api.github.com/repos/nextcloud/android","labels_url":"https://api.github.com/repos/nextcloud/android/issues/2278/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/android/issues/2278/comments","events_url":"https://api.github.com/repos/nextcloud/android/issues/2278/events","html_url":"https://github.com/nextcloud/android/issues/2278","id":302078505,"number":2278,"title":"Auto-upload fails with connection error","user":{"login":"tribut","id":719105,"avatar_url":"https://avatars2.githubusercontent.com/u/719105?v=4","gravatar_id":"","url":"https://api.github.com/users/tribut","html_url":"https://github.com/tribut","followers_url":"https://api.github.com/users/tribut/followers","following_url":"https://api.github.com/users/tribut/following{/other_user}","gists_url":"https://api.github.com/users/tribut/gists{/gist_id}","starred_url":"https://api.github.com/users/tribut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tribut/subscriptions","organizations_url":"https://api.github.com/users/tribut/orgs","repos_url":"https://api.github.com/users/tribut/repos","events_url":"https://api.github.com/users/tribut/events{/privacy}","received_events_url":"https://api.github.com/users/tribut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-03-04T11:36:47Z","updated_at":"2018-03-05T13:46:35Z","closed_at":null,"author_association":"NONE","body":"### Actual behaviour\r\n\r\nFiles are \"stuck\" in the upload queue. The files exist, but when retrying the App reports a \"connection error\". From the device log:\r\n\r\n~~~~\r\n03-04 12:26:03.086  7438  7438 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg\r\n03-04 12:26:03.086  7438  7438 D UploadsStorageManager: notifyObserversNow\r\n03-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)\r\n03-04 12:26:03.101  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status=UPLOAD_IN_PROGRESS\r\n03-04 12:26:03.115  7438  8099 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg\r\n03-04 12:26:03.115  7438  8099 D UploadsStorageManager: notifyObserversNow\r\n03-04 12:26:03.138  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status=UPLOAD_IN_PROGRESS\r\n03-04 12:26:03.144  7438  8099 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg\r\n03-04 12:26:03.144  7438  8099 D UploadsStorageManager: notifyObserversNow\r\n03-04 12:26:03.179  7438  7438 D ExpandableUploadListAdapter: refreshView\r\n03-04 12:26:03.179  7438  7438 D ExpandableUploadListAdapter: loadUploadItemsFromDb\r\n03-04 12:26:03.181  7438  8099 E FileUploader: Error uploading\r\n03-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\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat com.owncloud.android.operations.UploadFileOperation.run(UploadFileOperation.java:374)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:145)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:149)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat com.owncloud.android.operations.common.SyncOperation.execute(SyncOperation.java:93)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat com.owncloud.android.files.services.FileUploader.uploadFile(FileUploader.java:1090)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat com.owncloud.android.files.services.FileUploader$ServiceHandler.handleMessage(FileUploader.java:1023)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat android.os.Looper.loop(Looper.java:148)\r\n03-04 12:26:03.181  7438  8099 E FileUploader: \tat android.os.HandlerThread.run(HandlerThread.java:61)\r\n03-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\r\n03-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)\r\n03-04 12:26:03.187  7438  8099 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg with status=UPLOAD_FAILED\r\n03-04 12:26:03.192  7438  8099 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20180301_162013346.jpg\r\n03-04 12:26:03.192  7438  8099 D UploadsStorageManager: notifyObserversNow\r\n03-04 12:26:03.193  7438  8099 D FileUploader: NotifyUploadResult with resultCode: HOST_NOT_AVAILABLE\r\n03-04 12:26:03.197  7438  8099 D FileUploader: Stopping command after id 114\r\n~~~~\r\n\r\nManually uploading the same file works.\r\n\r\n![screenshot_20180304-122427-censored](https://user-images.githubusercontent.com/719105/36945056-9a8dcf1a-1fa8-11e8-98e2-6465231ac861.png)\r\n\r\n### Expected behaviour\r\n\r\nFiles in the auto-upload queue should be uploaded.\r\n\r\n### Steps to reproduce\r\n\r\nUnclear. Apparently it due to the target folder not existing (see comment by @TeaspoonDD  below).\r\n\r\n### Environment data\r\nAndroid version: 6.0.1\r\n\r\nDevice model: Moto X Play\r\n\r\nStock or customized system: Stock\r\n\r\nNextcloud app version: 3.0.2\r\n\r\nNextcloud server version: 13.0.0"},"comment":{"url":"https://api.github.com/repos/nextcloud/android/issues/comments/370423554","html_url":"https://github.com/nextcloud/android/issues/2278#issuecomment-370423554","issue_url":"https://api.github.com/repos/nextcloud/android/issues/2278","id":370423554,"user":{"login":"xXSTrikeXx","id":1523741,"avatar_url":"https://avatars2.githubusercontent.com/u/1523741?v=4","gravatar_id":"","url":"https://api.github.com/users/xXSTrikeXx","html_url":"https://github.com/xXSTrikeXx","followers_url":"https://api.github.com/users/xXSTrikeXx/followers","following_url":"https://api.github.com/users/xXSTrikeXx/following{/other_user}","gists_url":"https://api.github.com/users/xXSTrikeXx/gists{/gist_id}","starred_url":"https://api.github.com/users/xXSTrikeXx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xXSTrikeXx/subscriptions","organizations_url":"https://api.github.com/users/xXSTrikeXx/orgs","repos_url":"https://api.github.com/users/xXSTrikeXx/repos","events_url":"https://api.github.com/users/xXSTrikeXx/events{/privacy}","received_events_url":"https://api.github.com/users/xXSTrikeXx/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T13:46:35Z","updated_at":"2018-03-05T13:46:35Z","author_association":"CONTRIBUTOR","body":"@wouterverduin try out latest 3.0.3"}}
{"actor":{"display_login":"xXSTrikeXx"}}