nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.16k stars 1.75k forks source link

New Autoupload feature kills battery #780

Closed maybeageek closed 1 year ago

maybeageek commented 7 years ago

Actual behaviour

-After the rewrite of the autoupload feature, autoupload stopped working. Configuring it new, working as expected. However, it kills the battery in a matter of hours. 100% to 1% in 3-5h. This didn't happen in the previous version

Expected behaviour

-Tell us what should happen Battery should last longer

Steps to reproduce

Environment data

Android version: 6.0.1 (Samsung A3 2017, Stock) 7.1.1 (Galaxy S4 - LineageOS) Device model:

Stock or customized system:

Nextcloud app version: newest. Nextcloud server version: 11.0.2

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here
DigitalElement99 commented 7 years ago

Same issue

SigLinJo commented 7 years ago

Hi. I'm experiencing similar symptoms on my Cat S60 running Android 6.0.1. Ever since I upgraded to the latest version of the Nextcloud Android app (1.4.2) the highest battery consumer each day has been nextcloud. I have multiple folders selected for auto upload, maybe that can influence it?

DigitalElement99 commented 7 years ago

I personally experienced that problem with just one folder selected, the main camera folder.

tobiasKaminsky commented 7 years ago

Do you have enabled nextcloud sync on android system settings -> accounts -> nextcloud?

maybeageek commented 7 years ago

Do you have enabled nextcloud sync on android system settings -> accounts -> nextcloud?

no, this setting is disabled for me.

SigLinJo commented 7 years ago

It was disabled for me too. I just activated it now and will report back if there is any change in a day or two. Thanks for looking in to this! Love what you are doing with the app! To be able to upload from more folders is amazing!

snicke commented 7 years ago

Same issue. Samsung Galaxy S7 Edge with Android 7.0. The samsung system is identifying Nextcloud every day as the only app draining the battery and ask me if I want to put it in sleep mode.

CroneKorkN commented 7 years ago

Autoupload drains my battery, too. Stock 7.0 on Galaxy S6.

Doloros commented 7 years ago

Hi, Same issue here : Nextcloud draining battery on Galaxy s7 android 7.0. The samsung system is identifying Nextcloud every day as the only app draining the battery and ask me if I want to put it in sleep mode.

mario commented 7 years ago

Dear users,

thank you for your patience. After lots of work, we’re super excited to be able to give you a test version with new auto upload implementation. Keep in mind we will only accept bugs related to Auto Upload in this APK, as other things might be broken.

https://cloud.nextcloud.com/s/ftZraTruRQjTe0R

This is a dev APK so it will not overwrite your existing play store/f-droid APK unless you’re already running dev version. Also, you might need to remove your existing dev version before installing this one.

Explanation of the current functionality:

All and any testing is more than appreciated, especially with large and ever-going files like Videos. (like, try to record a 30 min video).

Let me know if you’ve got any questions.

Cheers, Mario

aPollO2k commented 7 years ago

I installed this dev app. But now my auto upload has stopped working. I enabled The sync in the android account settings. Not working. I taken some photos and videos. Switched off the phone and waited a bit. But it does not upload anything :(

tobiasKaminsky commented 7 years ago

@aPollO2k which version have you installed? There is now a release candidate for the upcoming version available at beta channel on google play store: https://play.google.com/apps/testing/com.nextcloud.client

Please try this one as this includes the latest fixes.

shanness commented 6 years ago

I'm having the same issue, and am running 2.0.0 (seems beta and production versions are the same, I wasn't upgraded after joining the testing program).

I'm getting constant warnings it's draining over 1% of my battery per hour. And the only thing I want the android app for is auto uploading my pics.. Any update on a fix for this?

olenz commented 6 years ago

I also must confirm, since 3.0.1, upload seems to drain battery. Problem with android 8.1 on Nexus 6p.

mario commented 6 years ago

Upload or the notification that's persistently there?

zdichev commented 6 years ago

@olenz same on Samsung s8

msundin commented 6 years ago

Still draining the battery on Galaxy S7 Edge. Taking 10% of the battery usage in the current use cycle for instance according to battery usage stats. No other app even close. Screen and Android System only processes using more battery (16 and 13% respectively).

screenshot_20180412-163024

screenshot_20180412-162647

gubagu commented 6 years ago

Same here

msundin commented 6 years ago

Any progress on this? Unfortunately I need to uninstall and stop using the app. Draining my battery very fast. The same with my partners phone.

stale[bot] commented 5 years ago

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!

r2p2 commented 5 years ago

Nextcloud is draining my battery too.

Rayn0r commented 5 years ago

Same problem here... I am using Wakelock Detector on a Stock ROM of a Galaxy S7 to monitor battery usage.

3h45m after turning on my phone, the Nextcloud app was active for 35m11s. No other app is remotely close to the Nextcloud app's runtime. The second app in line ran for 36s during that time. The battery is down to 87% while the phone was sitting idle on my desk.

edit The phone battery was at 100% when it was turned on.

tobiasKaminsky commented 5 years ago

I am testing right now with a S5 Neo with Wakelock Detector if and how often our app requests wakelock.

tobiasKaminsky commented 5 years ago

@Rayn0r this is strange. According to our code we do not acquire wake lock if the device is at least Lollipop (Android 5.0).

What exactly is it in WakeLock Detector?

Rayn0r commented 5 years ago

I let the phone sit on my desk this morning again. This is a screenshot of the CPU Wakelock: image

msundin commented 4 years ago

Still draining the battery on Galaxy S7 Edge. Taking 10% of the battery usage in the current use cycle for instance according to battery usage stats. No other app even close. Screen and Android System only processes using more battery (16 and 13% respectively).

screenshot_20180412-163024

screenshot_20180412-162647

Any update on this? Now, almost 2 years later, I'm on a Galaxy S10 with Android 10 and Nextcloud auto upload is still (!) draining the battery pretty much like in the picture above. I auto upload both camera images, videos etc. but also custom folders like WhatsApp images. I have the setting to only auto upload when charging and on wifi, still Nextcloud is draining my battery all day long. Why? It should only be activated when plugged in and on wifi.

Only way to stop the battery drain is:

  1. Enable battery optimization for the Nexcloud app in Android (i.e. don't let Nextcloud run in the background) but then the auto upload obviously never starts when you plug in the charger.
  2. Disable auto upload

I think the solution here is to find the issue in the code that makes the Nextcloud app check for uploadable items all the time (keeping the phone awake) even if it should only do so when charging according to the user settings. In pseudo code just to clarify what I'm meaning:

If (notCharging && onlyAutoUploadWhileChargingUserSetting) {
    skipCheckForFilesToAutoUpload = true;
}

Then the battery should probably not drain.

Ra72xx commented 4 years ago

I can't believe this bug is still open after three years. Every now and then I try the Nextcloud app, and always I give it up because it kills the battery (several Samsung phones running LineageOS). However, the only WebDAV sync alternative (FolderSync) for Android is kind of dead, so the need for a client gets more urgent.

As mentioned above, even using restrictive conditions for upload does not help, as Nextcloud seems to start nevertheless if any media is changed on the configured folders.

I would even go with a periodic sync or a manual sync (controllable e.g. by Tasker) if it is not possible to restrain the battery usage of the app itself.

kem-a commented 4 years ago

Looks like guys are short handed if even after three years bug is still open :( 47% battery drain in a day. For now I see - only one option:

VietTralala commented 4 years ago

@xdaWhitealien

  • disable entirely autoupload and background tasks

I can't find such an option in the app. Can you explain how to do this?

  • use alternative sync app Can you recommend one?
tobiasKaminsky commented 3 years ago

How many files are getting uploaded? Roughly how many files do you have on your device? It might be that scanning takes too long.

I would need one person who is suffering from this, and is willing to test a few apks and give me logcat info.

stale[bot] commented 3 years ago

This bug report 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!

pankewen commented 3 years ago

Hello, I just instaled the latest app App on my Samsung Galaxy yesterday and experienced the issues described in this issue: mobile phone temperature was increasing and battery was empty after few hours. I like nextcloud, thanks for your efforts on spending time and effort on it. I am willing to support in any way to resolve this issue. Pls let me know, how I can help.

Ra72xx commented 3 years ago

This problem persists since years without any progress. I therefore gave up on this feature and disabled all auto sync functionality. I now use FolderSync Pro for syncing with my cloud. This app is also much more versatile concerning which folders to sync in which way.

tobiasKaminsky commented 3 years ago

Problematic is not only dev power, but also having such a weird device. On all our test devices there is no problem, also not in any device used by our colleagues, friends, etc.

Ra72xx commented 3 years ago

I had the problem on at least four different Samsung mainstream devices running LineageOS, which I don't consider weird :-). However, I personally am not bothered too much by this bug any longer, as using an alternative sync app for WebDAV is not only a workaround, but also provides much more options (custom folders to sync etc.).

arcane47 commented 3 years ago

Also running lineage, with a terrible battery drain. Much like the other posters, I have autoupload against large folder bases; camera folder (1k files), WhatsApp folder (many files, 8GB of data). Willing to test any APK.

Current workaround is to disable the app when not in use.

tobiasKaminsky commented 3 years ago

@arcane47 do you see many uploads? Is it getting better if you only have one auto upload?

arcane47 commented 3 years ago

@arcane47 do you see many uploads? Is it getting better if you only have one auto upload?

It doesn't upload many files daily. Whatever new photos, and WhatsApp media daily. You mention one auto upload, as in only one folder for autoupload? Not tested, but if that is what you are asking I can test.

kem-a commented 3 years ago

I will just reconfirm what I wrote in June. Current state - nothing have changed, insane battery drain persists, somewhere around 30% to 40%. My conditions: Sync two folders: Camera and Office lens. Last have around 10 files, Camera folder have over 2000 files. Phone: Samsung S9 Android version: 10 Kernel: 4.9.118 I haven't tested with latest app 3.15. Also, I'm not sure I could, because autoupload feature in last version is removed.

I have tested this on another phone Google Pixel 3 and battery drain issue is also there. Lastly, I'm using self hosted Nextcloud. It's up to date and running on Ubuntu, maybe issue is there, but I doubt that.

LSchober commented 3 years ago

I can confirm as well...massive battery drain persists. Active while in background: 4hr 3min -> 31% Battery Usage Sync two folders: Camera and Download-Folder Phone: Pixel 4a 5G Android version: 10 Nextcloud-Version: 3.15.0 (@AI-ien autoupload-feature is now in Nextcloud-Settings "Auto upload")

github-actions[bot] commented 3 years ago

This bug report 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!

LSchober commented 3 years ago

7663 corresponding issue.

jagjordi commented 3 years ago

Hello @tobiasKaminsky , thank you for your work with nextcloud, it is an amazing platform.

I am willing to try different APK and report the behaviors to help fix this issue.

I am suffering the same problem with autoupload feature, I use BetterBatteryStats app and I can see wakelocks that last for several hours. Other apps have just a few minutes of wakelocks.

Please let me know what other info you need from my side.

zyeborm commented 3 years ago

Confirming this on a note 20 Ultra 5g Multiple folders to upload. It was detecting all pictures as conflicts until I set it to skip existing. Now it's using about 30% battery a day

panomitrius commented 3 years ago

I'm using a Samsung S10E with Android 11 and Nextcloud client uses around 20-40% of battery a day with auto upload on a couple of folders turned on.

github-actions[bot] commented 3 years ago

This bug report 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!

Croydon commented 3 years ago

Hi! This is my generic reply for every issue which is still relevant and is on the edge of getting closed by a stale bot.

J4gQBqqR commented 3 years ago

IMG_20210805_184950

The number one battery drainer on my phone. Lineage OS 18.1, Nextcloud 3.16.1 Nothing synced, nothing turned on. All background use. Never opened it foreground.

github-actions[bot] commented 3 years ago

This bug report 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!

zyeborm commented 3 years ago

Hi! This is my generic reply for every issue which is still relevant and is on the edge of getting closed by a stale bot.