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 doesn't work #2834

Closed
ghost opened this issue Jul 18, 2018 · 91 comments
Closed

Auto upload doesn't work #2834

ghost opened this issue Jul 18, 2018 · 91 comments

Comments

@ghost
Copy link

ghost commented Jul 18, 2018

Actual behaviour

  • When I add or enable a folder in the auto upload list, nothing gets uploaded. In this case, I have a bunch of .md files with notes which I want to be automatically uploaded to the folder 'Notes' in my Nextcloud. They do not get uploaded and no error is shown.

Expected behaviour

  • Files should be uploaded/synchronized

Steps to reproduce

  1. Set up a folder to automatically upload in the android client

Environment data

Android version: 7.1.2

Device model: Sony Z1 Compact

Stock or customized system: AICP Android (based on LineageOS)

Nextcloud app version: 3.2.1

Nextcloud server version: 13.0.4

@jirikeller
Copy link

Same here on Gemini PDA. The proof that the problem is solvable is an application for Dropbox called DropSync (greetings to my hometown Prague,CZ ;-) ) - MetaCtrl have autosync applications for Dropbox, MEGA storage, Google drive, MS OneDrive and Box.
If I add a file to synced folder, it is seamlessly uploaded. Fullstop. This is expected behaviour.
Should I really ask a third-party developer to add appliaction for FOSS project or is NC team capable to fix the code at least after a year ?!

@ghost
Copy link
Author

ghost commented Jul 22, 2018

@jirikeller My current solution is the syncthing application. I have synced notes (and a lot of additional folders) on all my devices now - except on my nextcloud.

@ghost ghost closed this as completed Jul 22, 2018
@ghost ghost reopened this Jul 22, 2018
@jirikeller
Copy link

@Apfelgriebs - thanks for marvellous tip ! Unfortunately this is not really "optimal" solution, however fully works - the only limitation is that the devices have to "meet" online from time to time, however this is easily solved by having one instance of syncthing. And actually, on some desktop one may sync syncthing even with nextcloud ;-)

@moulip
Copy link

moulip commented Jul 26, 2018

I don't get it. Why is this feature so randomly functional? Last time I was told to remove Nextcloud app from any power optimizations, which I did and fixed the issue, but since 2 updates it does not work anymore on my S9+.
I think I will revert to owncloud to see if things get better over there.

@jmhunter
Copy link

jmhunter commented Jul 29, 2018

For what it's worth - I am having the same issues at the moment. Galaxy S9+, and for a while now Nextcloud has not been auto-uploading all photos.

Sometimes it will detect that a new photo exists; but more often it won't.

The upload part is fine, but the detection part doesn't seem to be reliable for some reason.

I'm using the standard camera app, I haven't really changed any settings and I don't have a SD card; Nextcloud app on phone is version 3.2.1, and I have excluded it from the "put to sleep if running in background" functionality on the phone.

Not sure what I can do in terms of debugging on the phone (is there anything I can do with logcat or similar??) but hopefully these details of the problem I'm seeing will help.

@AndyScherzinger
Copy link
Member

@mario @tobiasKaminsky do you know anything steps that would provide further information to gain some insight on why auto upload doesn't seem to work for the mentioned devices like Sony Z1 compact, Samsung Galaxy S9+ and Gemini PDA?

@gerroon
Copy link

gerroon commented Aug 1, 2018

Auto upload is broken with Samsung S7 Android 8.0. Disabling battery optimization did not help either. I made sure all the upload folders are properly selected. It does not seem to watch for changes.

@AndyScherzinger
Copy link
Member

@mario @tobiasKaminsky are you aware of any general issues regarding Samsung Galaxy S issues regarding auto upload issues?

@gerroon
Copy link

gerroon commented Aug 1, 2018

@AndyScherzinger

I have another device with LineageOS 14.1 and auto uploads works perfectly fine.

@AndyScherzinger
Copy link
Member

I have another device with LineageOS 14.1 and auto uploads works perfectly fine.

@gerroon yeah, I also run Lineage 15.1 and it works fine, also worked fine before with the OEM Android OS version... :/

@gerroon
Copy link

gerroon commented Aug 1, 2018

It actually used work to on that S7 until couple months ago, it probably broke after the damn system updates couple months ago

@jmhunter
Copy link

jmhunter commented Aug 1, 2018

I would love to help with any debugging I can (using either my S9+, or my S7 Edge which I still have). Both seem to have the same issue at the moment, i.e. new photos I take do not get detected by the auto upload functionality. If I 'Share...' the photos and send them to Nextcloud, the actual upload works fine.

Both phones are on Android 8.0.0 ("Samsung Experience 9.0").

@AndyScherzinger
Copy link
Member

@mario any debugging hints for @jmhunter ? :)

@klm46
Copy link

klm46 commented Aug 16, 2018

Also same issue again and again! It's a shame, this is one of the most important feature and you guys struggle on that for years. We have 2 devices, Huawai P10 Pro, Galaxy S7+ - both not working!

@moulip
Copy link

moulip commented Aug 16, 2018 via email

@rwat1
Copy link

rwat1 commented Aug 17, 2018

I FOUND A SOLUTION GUYS.... @moulip @klm46 @jmhunter @gerroon @Apfelgriebs @jirikeller @mario

Hi all, I'm a iPhone-to-Android convert, and have Samsung S9+ (yesterday activated!). As other in this thread mention, I also had which had huge problems with auto-upload detection..... but I fixed it !! 👍

My steps:

Edit: Added this pre-cursor 1st step instruction on 8/17/18:
"To ensure that 100% erased NC app, cache, certificates, serving settings (because Data settings persist after re-install), I did the following: "Settings" > "Device Maintenance" (to get to storage) > "Storage" > "Apps" > "NextCloud" > "Storage" (should say like 45mb/64GB used or something) > "Manage Storage" > "CLEAR DATA". (Optional: You can also click "Clear Cache" option, I just did Clear data, which is prob the same."

I deleted my NC account from NC app, completely deleted NC app, reinstalled from Google Play store.

I deleted the customized Gallery app from f-droid. (If you don't have Gallery app from F-droid, then ensure you are using the original plain vanilla Gallery app, no other gallery app as it may interfere)

Then Start NC app, go through usual process of Logging into account, giving permissions to app to read/write access, you know, the vanilla process of getting Set-up again on NC app.

Next, I went to Power Saver settings, and I added NC to "Unmonitored Apps" where they won't put to sleep. Instructions: "Device Management" > "Battery" (on bottom left corner) > " Unmonitored Apps" (e.g. select apps that won't be put to sleep) > Add NC app to this list > Click Done/Save. Maybe this helped too, but I closed all other applications and put them to sleep so only NC running.

Reboot NC app (e.g. close it then re-open it as fresh instance)

Take a photo from camera app. This 1st photo won't upload, because we haven't turned on "Auto-upload" yet, so go to "Auto-Upload" section (your 1st photo should appear here), then turn on the upload button (i.e. turn on the button so it turns from grey to blue signfying enable upload for Photos, Screenshots or Video), and verify the correct folder configuration for destiination as you wish. THEN take a 2nd photo with camera app, and this should immediately be detected and uploaded :)

Now I got the auto-upload to work on my Samsung S9 Plus running latest software (as of 8/17/18).
YAAAYYYY. It uploads instantly after taking picture, the Auto-Upload detects it immediately, no need forced scan. Holy moly... wow.

@jmhunter
Copy link

jmhunter commented Aug 17, 2018

Thanks @rwat1, very glad you have had success!

I am almost certain I had already done the Power Saving setting, i.e. told the phone not to put NC to sleep. (although there's a small chance that after uninstalling & reinstalling, I forgot to re-enable it again).. so I don't think that's the whole answer.

I will try deleting my account from NC app first, before uninstalling this time.

I don't know how it does it (as I thought that when an app was uninstalled, all its data was gone) but even when I uninstall NC from Play Store and reinstall it, my account data (or at least, the definitions of which folders to auto-upload, and how - plus my history of previous auto-uploaded files) persists! :( So I will try your trick of deleting the account from within the app, first.

My next step was to use an older version of NC client from F-Droid, actually (My gallery app is stock / standard) but I will try this first and report back - thanks!

Update: That didn't work for me.

  • When deleting account from within app, uninstalling app, reinstalling app and then re-logging in to my account - my auto upload settings (which phone folders to upload from; where to send them; whether to upload on wifi only; etc. as well as history of uploads) re-appeared when I logged in.

  • Took a photo, it didn't get detected as ready for upload.

  • 'Force Close' Nextcloud app, then took another photo - still didn't get detected for upload.

Update to update:

  • I tried installing the app from F-Droid - same version, 3.2.1.
  • This worked perfectly first time
  • There were no settings in the app when I ran it, i.e. no auto upload settings and no history of previous uploads
  • I therefore wonder if the issue is in some way related to bad / corrupt settings information, coupled with this data being persisted even through a complete uninstall/reinstall of the app via Google Play
  • I haven't had this issue yet with my F-Droid installed app.. but will update if/when that happens in the future :)

@rwat1
Copy link

rwat1 commented Aug 17, 2018

@jmhunter

Edit: Glad it eventually worked out!

Per your mention about data-setting persisting after reinstalling, YES! I forgot to include this step:

Oh, I'm stupid. I forgot to include this one critical step, because like you said, data-persists after reinstalling NC app.

To ensure that 100% erased NC app, cache, certificates, serving settings, I did the following:

"Settings" > "Device Maintenance" (to get to storage) > "Storage" > "Apps" > "NextCloud" > "Storage" (should say like 45mb/64GB used or something) > "Manage Storage" > "CLEAR DATA". (Optional: You can also click "Clear Cache" option, I just did Clear data, which is prob the same.

This ensure that all the "Settings, Database, Server certificates from NextCloud's data will be deleted permanently, Downloaded Files will be kept untouched".

THEN you can go delete account from NC, then delete NC app, then reinstall from Google Play or Fdroid. :)

I'm super happy you got it running!! I'm definitely 100% sure it's about data-settings persistent after reinstall and corrupt settings. That's why a "Clear Data" before deleting app/reinstall helped me, and that's why when you installed a brand new version of NC, you got fresh clean settings, and it worked :)

@gerroon
Copy link

gerroon commented Aug 17, 2018

Well I was using the nc-dev version which was not working, then installed the nc release from scratch from fdroid still did not work. These are 2 different apps and they do not share the same accounts, or data etc.

@rwat1
Copy link

rwat1 commented Aug 17, 2018

@gerroon
After you cleared data (steps above), delete NC app, reinstall it, did you did you add NC app to list of "Unmonitored apps to prevent sleep" ?

@gerroon
Copy link

gerroon commented Aug 17, 2018

I did not need to delete the NC app, I was installing it the first time, that was my point.

I have both NC dev version (which was th one I was uising originally) and the release version (installed to see if the Dev version was broken with the uploads) side by side. They do not share the same data/account space as far as I can tell.

Yeah I disabled the battery optimisation stuff too,

@moulip
Copy link

moulip commented Aug 17, 2018 via email

@jmhunter
Copy link

@rwat1 , thank you.

I forgot to include this one critical step, because like you said, data-persists after reinstalling NC app.

To ensure that 100% erased NC app, cache, certificates, serving settings, I did the following:

"Settings" > "Device Maintenance" (to get to storage) > "Storage" > "Apps" > "NextCloud" > "Storage" (should say like 45mb/64GB used or something) > "Manage Storage" > "CLEAR DATA". (Optional: You can also click "Clear Cache" option, I just did Clear data, which is prob the same.

This ensure that all the "Settings, Database, Server certificates from NextCloud's data will be deleted permanently, Downloaded Files will be kept untouched".

I have to say, I have never had any success using the Clear Data option. I haven't really looked into it much - but I am certain it has never worked for me.

I had never seen an app-specific 'Clear Data' option in an Android app, before Nextcloud - so I don't know if there is an alternative way of clearing application data - but I do know that uninstalling the app, or choosing 'Clear Data', hasn't been successful for me in the past, and the configuration data still persists. I don't know if anyone knows of another mechanism to clear the Nextcloud application's data?

A new instance of the application (installed via F-Droid, rather than Google Play) is working fine for me at the moment, for what it's worth.

My working theory is that something in the configuration data for the application is causing the auto upload detection function to fail - and since this configuration data persists after a clear data / uninstall / reinstall cycle, it continues to fail to work.

@moulip
Copy link

moulip commented Aug 19, 2018

@jmhunter, Like I said in my last comment, you can use the NC clear data settings, uninstall it and then reboot.
That way I was successful in getting rid of all the remaining settings.

@rwat1
Copy link

rwat1 commented Aug 19, 2018

I'm glad it works for you guys 👍

@gerroon You can follow these instructions to Clear NC Data settings as moulip and I did and try reinstalling (with "unmonitored app no sleep")

"Settings" > "Device Maintenance" (to get to storage) > "Storage" > "Apps" > "NextCloud" > "Storage" (should say like 45mb/64GB used or something) > "Manage Storage" > "CLEAR DATA". (Optional: You can also click "Clear Cache" option, I just did Clear data, which is prob the same. Then Moulip said to: "REBOOT" then reinstall app.

@gerroon
Copy link

gerroon commented Aug 19, 2018

@rwat1

What I am saying is that I should not even have a clear data problem, because this was a fresh new copy of the Nc app release. All that stuff is a concern if you already installed it before.

I can give this a try for sure.

@mmeinesz
Copy link

mmeinesz commented Nov 5, 2019

I switched from Samsung A5 phone to a relatively recent Google Pixel phone - and magic: now it works fine. The new phone uses Android 10 (not 100% sure).

@CSchaefer70
Copy link

Thx for the info re Pixel phone... I'm still on the Samsung SM-N950U with Verizon as the carrier. I wonder if Samsung has some throttle control within the phone? The NextCloud upload failure with larger files is not unique to the connection; i.e. failure occurs with WiFi or Cellular. What is different about the Goggle Pixel Phone? The only difference I see on my phone is Android V9 vs your v10. Interesting. The app "FolderSync" continues to work perfectly.

@meika
Copy link

meika commented Nov 29, 2019

What a thread! Foldersync eh?

@CSchaefer70
Copy link

Yes. Foldersync seems to manage the file size... (chuck size?); no problems. I don't understand where NextCloud android client manages the protocol. Very sad... mostly loving NextCloud.

@2p31-1
Copy link

2p31-1 commented Dec 3, 2019

Still not works on S9

@feutl
Copy link

feutl commented Dec 3, 2019

I know, not very helpful but my S9+ works for quite some time now. Also the other phones I am using Nextcloud with, some other Samsung and Xperia Phones

@rwat1
Copy link

rwat1 commented Dec 6, 2019

It broke on my Xiaomi 9T running Android 10.

So I fixed it by clearing cache, clearing data, removing account from NC app, uninstalling NC app, and re-installing, setting up.

YAY!

@stale
Copy link

stale bot commented Jan 3, 2020

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Jan 3, 2020
@jeancf
Copy link

jeancf commented Jan 4, 2020

Still not working.

@stale stale bot removed the stale label Jan 4, 2020
@CSchaefer70
Copy link

Yeah... still doesn't work for me either. FolderSync working.

@rwat1
Copy link

rwat1 commented Jan 4, 2020

The issue has never been fixed or addressed, why is stalebot attempting to close this thread?

@CSchaefer70
Copy link

Well, don't blame the bot. Still, yes, I wish someone would give me the code to change. The solution must be a simple code change. I just don't know where to look. I'm not a programmer but interested in technology. I also admire NextCloud and love the solution as a document management tool. I use the "Next" app on my Android. Everything works for me except the upload limit. So sad.

@stale
Copy link

stale bot commented Feb 1, 2020

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Feb 1, 2020
@stale stale bot closed this as completed Feb 16, 2020
@peterp772000
Copy link

FolderSy

According to Google Play, Foldersync doesn't support Nextcloud. How did you get it to sync with Nextcloud?

@CSchaefer70
Copy link

Correct. FolderSync is standalone from NextCloud. I use it to upload then let NextCloud sync naturally. My problem is withe in initial upload which consistently fails on my Samsung Note8. Otherwise NextCloud is great!

@peterp772000
Copy link

I think I've found the solution. In Android go to Settings -> Accounts & Sync -> Nextcloud -> Sync.

Nextcloud synced all files after I enabled this option.

@CSchaefer70
Copy link

Hey thx for the info peterp772000... I checked my Android and the sync was turned "OFF". However, even after turning "ON" there is no change. I still receive "Not Acceptable" when attempting files over about 8mb. I'll play more and try clearing cache and reset/repower to see if I can effect a change. If there is a change you'll be the second person to know! Thank you again.

@meika
Copy link

meika commented Mar 10, 2020

thanks peterp772000 givign it a go, was that always there, or at least since this thread started?

@moulip
Copy link

moulip commented Mar 10, 2020 via email

@feutl
Copy link

feutl commented Mar 10, 2020

I started a discussion about the "sync" feature some time ago in the forum
https://help.nextcloud.com/t/what-is-settings-accounts-nextcloud-sync-for/36548/7

Perhaps we can - once again - try to clarify this, but as far as I have understood. The Sync Feature just helps to keep a background sync working, instead of the App put as a foreground process or have some special battery optimizations turned off.
It is like gmail and others which sync in the background without having the app in foreground or optimized, but they need to register their sync behavior internally.

I realized that this is also draining quite some battery, but perhaps this has already changed.

Anyhow, the forum discussion is open and should be restarted

@peterp772000
Copy link

peterp772000 commented Mar 11, 2020

Hi Meika, I'm using Android 9 which has been out since mid 2018 so I'm guessing that feature has been there since this thread started.

@nicbou
Copy link

nicbou commented May 5, 2020

There are dozens of these threads, many of which are over 2 years old. How can such a core feature remain broken for this long?

I have the same issue. Fresh install of the app (3.11) on a Samsung S9, fresh install of Nextcloud on Ubuntu.

Nothing gets queued up for upload. There are no errors. It just doesn't do anything. It worked for about an hour, until I tried to change the upload destination.

@feutl
Copy link

feutl commented May 6, 2020

There are dozens of these threads, many of which are over 2 years old. How can such a core feature remain broken for this long?

I have the same issue. Fresh install of the app (3.11) on a Samsung S9, fresh install of Nextcloud on Ubuntu.

Nothing gets queued up for upload. There are no errors. It just doesn't do anything. It worked for about an hour, until I tried to change the upload destination.

I do have a Samsung S9 as well, for more then a year now (or even longer) and for this time period, after fixing the Battery Optimization dilemma of Android, it just works flawless.
I do ask myself, what they could do, that people like you, having those issues could overcome them.

Even the phones of my parents, sister, wife and others using my NC instance do work without issues (about 15 devices from different brands), as soon as you have the battery optimization thing handled on the different phones and after updating the OS.

The only issue I have, some times, is a app which stops working in the background or pictures not moved to the internal app folder after the upload.
I do also have different settings, upload in WIFI, upload in WIFI with power plugged in etc.

So any ideas, except complaining in quite a harsh form? Giving some more insights on what and how?
I assume that most people have the feature just working, and what you see here are quite some people, you are right, but I assume also a minority. So try to help instead.

@feutl
Copy link

feutl commented May 6, 2020

I started a discussion about the "sync" feature some time ago in the forum
https://help.nextcloud.com/t/what-is-settings-accounts-nextcloud-sync-for/36548/7

Perhaps we can - once again - try to clarify this, but as far as I have understood. The Sync Feature just helps to keep a background sync working, instead of the App put as a foreground process or have some special battery optimizations turned off.
It is like gmail and others which sync in the background without having the app in foreground or optimized, but they need to register their sync behavior internally.

I realized that this is also draining quite some battery, but perhaps this has already changed.

Anyhow, the forum discussion is open and should be restarted

This are the 2 posts answering the question about the sync option in the android account settings, it makes sense for me

@nicbou
Copy link

nicbou commented May 6, 2020

I have been hammering at this problem for a bit longer. Here is a recap of what happened, what I did and what worked.

I turned on auto upload for a few directories, then changed the destination directory. The uploads kept going to the old directory, so I pressed the 'X' button in the uploads tab. It seems as if it completely removed these files from the upload queue, forever. Toggling the auto-upload settings, changing the destination folder, restarting the phone, restarting the app and clearing the app cache had no effect.

New photos would still get uploaded, but old ones would not.

The solution was to reinstall the app, and reconfigure everything. It definitely was not a battery issue.

After a reinstall, I encountered the battery saving issues you have mentioned. This separate problem was solved by changing the phone settings. This is something I'm happy to live with, as long as all the files make it to the server eventually.

I apologise for my harsh tone. It was issue in a troublesome 10 hour Nextcloud setup marathon. I was promised the moon, but couldn't get the only feature I cared about to work. Still, lashing out at the maintainers definitely was uncalled for.

@feutl
Copy link

feutl commented May 6, 2020

@nicbou
Would also not say that communication is always perfect from the NC team, even would I say that NC is perfect (or clients or apps) but sometimes it is just hard / impossible to reproduce an issue.

As for me, I am nor sure why sometimes (rarely) some pics which do get uploaded are not moved to the apps directory. I have now way to debug this behavior nor reproduce it consistently. Makes it hard for everyone to fix it - sadly.

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