Android: Autoupload not working in Andorid 7

Created on 31 Jan 2017  ·  75Comments  ·  Source: nextcloud/android

Actual behaviour

-Take a Photo. Wait for upload. Die...

Expected behaviour

-Take a Photo. Looking how it loads up. Be happy. :)

Steps to reproduce

  1. Install NextCloud App (even with Beta)
  2. Take a Photo.
  3. Wait for upload, which never happens... :(

Environment data

Android version:
Android 7.0 Patchlevel, 1. December 2016

Device model:
Honor 8, no root.

Stock or customized system:
Nothing customized. No Root. Just a simple Phone. (But also happened on my Nexus 5x with Android 7)

Nextcloud app version:
Nextcloud Beta Version 20170130

Nextcloud server version:
Nextcloud 11.0.0

Surely this issue is reported already, but I couldn't find it. So please feel free to merge / close. But please, do something about this issue soon! Thanks a lot!

pr exists

Most helpful comment

Glad this is working, thanks folks!

There will be some changes tomorrow to auto-upload so please test it as well.

I will close this ticket now, but please feel free to re-open it if issues crop up again.

All 75 comments

Have you configured AutoUpload the right way?
Can you test a 3rd party camera app? (there are some vendors that cause some problems with their stock camera)

Yes, I configured it right away. I double checked now. Everything as I think it should.
I tried the following Cam Apps:
a) Build-In Camera
b) Google Camera (Extra App from Google-Play Store)
c) Perfectly Clear App

None of these triggered an upload. :(

Same problem with Galaxy S7 7.0.
No upload action after taking a picture, neither taking a screenshot.
upload is only working when i copy a picture manually to "/storage/emulated/0/DCIM/Screenshots with a file-manager.
there is also no action when the build in camera-app uses the SD-CARD as storage.
tested with nextcloudapp beta 20170130

Nice points! I have my pictues on the SD-Card, too! Screenshots have never been uploaded. Also, the upload is not triggered, if I copy the image somewhere. Upload just never starts.

Confirm that, no autoupload at nextcloud android app beta 20170130 at SGS7.

Seems to be double of #498 (link)

@KekcuHa SGS7 has only Android 6 though, right?

@mario
No, since last week 7.0 is rolled out by Vodafone Germany on SGS7

@mario, no, SGS7 now on Android 7.0 as been already pointed by @bekl101
The same situation (no autoupload at beta client) at LG G Pro2 running on Android 5.0.1.

Thanks for letting me know - there is SGS7 among my phones, but no Android 7 yet on it. Anyway, I'm looking into the issues. As for now, AutoUpload is only on 7 (we hope to bring it to 5 and 6), and 4,5,6 use InstantUpload (older version).

That being said, AutoUpload does have it's issues that I'm currently correcting.

is there a temporary workaround to sync photos taken on my mobile with the nextcloud server until the Autoupload problem is fixed?
@mario
if you need logs from the beta let me know.

Same issue with LG G5 Android 7.0 Nextcloud Beta 20170130

Hello,

it looks like I've determined the root cause of the problem, but I have to figure out how/if it's easy to fix or not.

Thank you for your patience!

Can confirm.. verizon galaxy s7 android 7.0 beta 2 Nov 22 build.. autoupload is ENTIRELY broken and does not function with any camera app or storage location. Please fix. Thanks for the awesome dev work!

So it seems that the problem is bigger than we thought - some phones (Galaxy ones in particular) just don't emit the right information that we need to make autoupload work. As such, we need to rethink how we're gonna handle uploads in the future and pave a way to true two-way sync.

Hi Mario,
for my Side, I don't need a two-way-sync on my phone. I just would love to have a Picture Upload. Maybe this can be reviewed in a first way?
If I can help for this somehow, let me know.

I have strong reasons to believe the Auto upload will be fixed soon as I am working on rewriting our upload service, and will be brought to Android 5.x and 6.x as well. 4.x can be expected, but I do now know when - until then, Instant upload can be used there (when it works(.

Fix ready (https://github.com/nextcloud/android/pull/615), we'll hopefully have it in beta soon!

Few issues with the fix, working on it!

*** CAUSE OF ERROR ***

java.lang.IllegalStateException: Apps may not schedule more than 100 distinct jobs
at android.os.Parcel.readException(Parcel.java:1701)
at android.os.Parcel.readException(Parcel.java:1646)
at android.app.job.IJobScheduler$Stub$Proxy.schedule(IJobScheduler.java:158)
at android.app.JobSchedulerImpl.schedule(JobSchedulerImpl.java:42)
at com.owncloud.android.services.FileAlterationMagicListener.onFileCreate(FileAlterationMagicListener.java:103)
at org.apache.commons.io.monitor.FileAlterationObserver.doCreate(FileAlterationObserver.java:379)
at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:345)
at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:304)
at org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:182)
at java.lang.Thread.run(Thread.java:761)

*** DEVICE INFORMATION **
Brand: Verizon
Device: heroqltevzw
Model: SM-G930V
Id: NRD90M
Product: heroqltevzw

*** FIRMWARE ***
SDK: 24
Release: 7.0
Incremental: G930VVRU4ZPKC

Unrecoverable crash screen appears every 10 seconds! Even on reboot.. guess clear program data?

Working on a new beta. Hopefully Tuesday.

On Sun, 5 Feb 2017 at 05:02, daymr notifications@github.com wrote:

Unrecoverable crash screen appears every 10 seconds! Even on reboot..
guess clear program data?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/nextcloud/android/issues/612#issuecomment-277495980,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAWsk54iq-WHRJu6pwXDxtfEDXGbvvqks5rZUnYgaJpZM4Ly8dK
.

I have also that crashscreen on SGS 7 nougat with beta 170204:

************ CAUSE OF ERROR ************

java.lang.IllegalStateException: Apps may not schedule more than 100 distinct jobs
at android.os.Parcel.readException(Parcel.java:1701)
at android.os.Parcel.readException(Parcel.java:1646)
at android.app.job.IJobScheduler$Stub$Proxy.schedule(IJobScheduler.java:158)
at android.app.JobSchedulerImpl.schedule(JobSchedulerImpl.java:42)
at com.owncloud.android.services.FileAlterationMagicListener.onFileCreate(FileAlterationMagicListener.java:103)
at org.apache.commons.io.monitor.FileAlterationObserver.doCreate(FileAlterationObserver.java:379)
at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:345)
at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:304)
at org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:182)
at java.lang.Thread.run(Thread.java:762)

************ DEVICE INFORMATION ***********
Brand: samsung
Device: herolte
Model: SM-G930F
Id: NRD90M
Product: heroltexx

************ FIRMWARE ************
SDK: 24
Release: 7.0
Incremental: G930FXXU1DPLT

170206 should fix it.

crashscreen after installing 170206 with a previous app version (170204) installed.
after removing 170204 and installing 170206 no crashscreen.
autoupload tested with a few new piktures seems to work as expected.

I tried Nextcloud 20170206 beta and still have no auto upload on my Phone. I didn't had crashes in earlier versions... Just no Auto Upload at all.

That sounds strange @jamfx - have you configured this in the Auto Upload screen?

Yes, where else could this be configured?

really strange, after successfull testing a few hours ago. Now i took a pikture and nothing happens. Nothing changed. Mobile rebooted an now AutoUpload works again, like nothing went wrong before.
Maby a powersafe problem in Nougat?

Hmm, shouldn't it start uploading when I get back to the Nextcloud App? I will have a look at the power savings. And will get back to you.

No, it uses the doze mode. So the upload is "registered" to the android job scheduler. And if android decides to execute the job the file will be uploaded.

@tobiasKaminsky
thanks for the explanation. Mh, maybe i didn´t wait long enough. Normally it took about 10-20 seconds before upload starts. I will test it tomorrow morning again and give you a response if it works or not

If it does not, please wait for another round of improvements :)
On Mon, 6 Feb 2017 at 20:07, bekl101 notifications@github.com wrote:

@tobiasKaminsky https://github.com/tobiasKaminsky
thanks for the explanation. Mh, maybe i didn´t wait long enough. I will
test it tomorrow morning again and give you a response if it works or not


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/nextcloud/android/issues/612#issuecomment-277780348,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAWshkP35asjEW0xIENtqM5ODCtN8NGks5rZ29-gaJpZM4Ly8dK
.

i´m not in a hurry. I´m happy that this feature will work again.
great work
Hopefully Issue #476 can be fixed too

Even if I wait about 5 Minutes it doesn't start. Although the picture is shown in the auto upload preview, where I can select the folders.
I double checked the Battery Saving Settings and the app is not on the "close" list.

Tested again, without changing anything. works as expected.

@bekl101 I did the following:
Downloaded the latest version (20170207) this morning. Just switched on Auto Upload. Took a Picture, waited. Nothing happened. BUT after a about 10 seconds the upload started! So it worked somehow. I will try to confiugure my other settings (i.e. default Path of App, subfolders on auto upload...) and will leave another comment here. A BIG THANKS FOR YOUR WORK! <3 :1st_place_medal:

PS: I did configure my settings now. Everything works like charme!!!! :100: :+1: :1st_place_medal: Thanks a lot man! Please push this into the stable App. Thanks! :) You did it!

Okay, hold on once more. I found another bug in this Version. It starts uploading the picture TWICE! So first upload goes through, but second upload fails. The App just recognizes the picture twice and tries to upload both pictures with the same name. So second upload fails.

Hello, there will be another version tomorrow with bugfixes. Once it's out, please delete the current beta and install the new one :)

@mario Nice! Just drop me a line to test it again! So far I will use the "buggy" App. I prefere to use this and delete the "double" upload, than having none... :)

Yea, well ... the "other" upload of the same image won't work anyway due to a different bug :p cc @tobiasKaminsky

clean installed 20170207 upload works. but possible onother bug.
first i used the default place to store picture uploads (SoforUpload/Camera) it work correct (exept known double upload).
Afterwards i changed the destination to another folder on my NC, took a picture and it was transfered to the default place again.
Uninstalled and new installed, i changed the path before taking a picture, than changed target folder but this had no effect . The pictures were stored in the first selected place

At sgs7 nougat with 20170207 instant upload now works to the SofortUpload folder :-)

@bekl101 known bug, will hopefully be fixed by the time 20170208 lands :)

ok, if you know it .
@mario sorry for OT
do you know something about the problem saving files for offline use to sd-card on a SGS7?

@bekl101 what issue number? I can test this directly since I have that phone :)

Folks, new build coming up tomorrow!

@mario

612

You can see that the file is downloadet to a temp directoy but no move to card afterwards.

tested 20170208 after clean install.
Autoupload seems to work , no doble uploads like yesterday.
but i didn´t find a log file in the app, on filesystem i found it in storage/6331-6230/Android/data/com.nextcloud.beta/files/nextcloud_log/log.

after saving setting for Autoupload Screenshots errormessage pops up "Nextcloud beta beendet restart app",
second try "Nextcloud beta wird wiederholt beendet App schließen"
Enable AutoUpload for screenshots with defaults by clicking the cloud icon, success, upload works

This Version (20170208) works for me! No double Uploads and Uploads start quite quickly. Nice! Thanks a lot! :100: :1st_place_medal:

@jamfx
do you see the log within the app?
sync seems to be stable

As far as I can see, nope... sorry, no logs.

@bekl101 what does "Nextcloud beta wird wiederholt beendet App schließen" means?

@bekl101 I just noticed you linked me to this issue, instead of the one relevant for SD card? :)

That means, there comes a popup which told you that the application stops working several times and will be closed
i don´t know if @jamfx has the same problem. He confirmed only that the app shows no logfile.

Niiice! :) Will investigate.

As for logs ... dunno, my code shouldn't affect logs at all.

you´re right #476 is the right issue.
sorry for confusing you :)

its strange, because in the version 20170207 and before the logfile was display correct in the app

Hello,
on sgs7 nougat 20170208 works for me. Autouploads are working an no double uploads...
Thank You! 👍

The logs window in the app is empty, but the currentLog.txt has 143 kb

Glad this is working, thanks folks!

There will be some changes tomorrow to auto-upload so please test it as well.

I will close this ticket now, but please feel free to re-open it if issues crop up again.

Sorry for re-opening. When we can count with Version 1.4.2?

@RogerSik RC1 soon hopefully :)

@mario
short question to Autoupload.
Is it correct that when i activate "delete file after upload" the taken picture is stored on my NC, in the folder on my local SD-Card and the original file in DCIM is deleted?
If yes maby i have a small issue. Everything works but the file is not deleted.

@bekl101 if you choose "delete file after upload" there should be no file left on the device after a successful upload. It is the same as uploading it and then delete the local copy AND the original file.

@tobiasKaminsky it doesn't do that. Can you look into it tomorrow please, if you have the time?

ok, so it wasn´t my fault.
Same problem if you choose "move file to app folder"
The new picture wasn´t moved to app folder. It stays only in the DCIM folder. But the NC app shows it as synced in the app folder

Is the source file on an external storage? I remember that this can lead to problems where the file cannot be deleted and fails silently. This would explain why both is not working as the file needs to be deleted in both cases.

Yes, source is an external storage (sd-card). Later i can test with pictures saved to internal storage.

Changed camera target to internal storage, everything works as expected

Same problem Android 7.0 on HUAWEI P8 LITE 2017 (Auto upload does not work)

What version @Wikinaut ?

All should be fixed in beta.

Android Nextcloud 1.4.1

Cool. Should be fixed in beta and 1.4.2 so worry not :)

@mario I compiled the beta, but the App-PIN entry does not work when trying to contact my instance in the 1.4.2RC1 version.... and so I cannot contact my server with this beta version..... :-1:
(filed as #702 )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JSoko picture JSoko  ·  3Comments

ikke-t picture ikke-t  ·  3Comments

AndyScherzinger picture AndyScherzinger  ·  3Comments

JSoko picture JSoko  ·  3Comments

daywalk3r666 picture daywalk3r666  ·  3Comments