Android: Keeps finding the same folder as "new" and asking for battery whitelisting

Created on 11 Sep 2019  Â·  18Comments  Â·  Source: nextcloud/android

Actual behaviour

The app keeps "finding" the same folder although it is already configured. I see a popup message, asking me to act on it. If I swipe it away, it will appear again after a while.

Also: It don't know if this is related or a separate issue, but it also keeps asking me to disable battery optimizations when configuring a folder, even though the app is whitelisted.

I'll add screenshots of everything relevant.

Expected behaviour

Don't ask me to configure already configured folders and recognize that it is whitelisted in the battery optimizations already.

Steps to reproduce

  1. Install
  2. Have files in folders

Environment data

Android version: 9 (Lineage OS 16.0)
Device model: Samsung Galaxy S5
Stock or customized system: Custom, Lineage OS
Nextcloud app version: 3.7.2
Nextcloud server version: 16.0.4.1

Let me know if you need more information, I'll try to provide everything I can.

Screenshots:

![image](https://user-images.githubusercontent.com/1719781/64699873-067c9b80-d4a6-11e9-83ae-59afd436c617.png) ![image](https://user-images.githubusercontent.com/1719781/64699894-12685d80-d4a6-11e9-8e8e-4f2a63773893.png) ![image](https://user-images.githubusercontent.com/1719781/64699837-f4026200-d4a5-11e9-905c-640b7a1b2b66.png) ![image](https://user-images.githubusercontent.com/1719781/64699861-febcf700-d4a5-11e9-9cf5-9862cd45fc02.png)

approved bug pr exists

All 18 comments

+1

+3: Samsung Tab S2 running Android 7, Samsung S8+ running Android 8, Samsung Tab S5e running Android 9 - all have this behaviour.

To reproduce: delete all pictures from the camera folders that you set up for auto upload, then take a picture... the picture will NOT be uploaded, and you have to re-save the autoupload settings and get the "disable battery saving" popup.

This bug is making the app nearly unusable for me, is there any other information I can provide to help fix it?

@tobiasKaminsky any idea why this might be happening?

Any news on this?

No, I have no idea why this is happening :-(
We do store the folder list and only ask for every account for the first time only…

Do you have root? Then you could go to /data/data/com.nextcloud.client/databases/ and have a look at filelist, which is our database.
In it there is a table "arbitrary_data" that contains a global / media_folders value.
Can you post this value? It should contain the folders that are already marked as known.

Shall we add a browser for the provider in ETM?

This will help a lot if the problem is also happening with dev version :+1:

from my observations there is a sure way to trigger this: delete all pictures from your device (after all you synced them into your nextcloud...), then take a new one.
bang, "detected a new media folder". it seems that the client basically only remembers folders until they get emptied out.

also: marking a "newly found" folder as synced does not actually sync what is in there - only what is new after that... so that one new photo that triggered this is not even synced.

it seems that the client basically only remembers folders until they get emptied out.

This is indeed the root cause! Thanks for pointing this out.
I fixed this for folders that were already set up, but not for those that never were set up.

also: marking a "newly found" folder as synced does _not_ actually sync what is in there - only what is new after that... so that one new photo that triggered this is not even synced.

This is a separate issue, which we can only fix reliable once there is a server side file collision detection (based on checksums).

...are you saying this is fixed?? briliant! release? when? /me hops

also: marking a "newly found" folder as synced does _not_ actually sync what is in there - only what is new after that... so that one new photo that triggered this is not even synced.

This is a separate issue, which we can only fix reliable once there is a server side file collision detection (based on checksums).

4625 :)

This is a separate issue, which we can only fix reliable once there is a server side file collision detection (based on checksums).

Can you point us to an issue/PR where we can track the development of this? :)

...are you saying this is fixed?? briliant! release? when? /me hops

This will be in next maintenance release.
There is an APK file in PR #4623 , which you can install in parallel to your existing Nextcloud app.
(is available once CI is done)

Here is the APK: #4623 (comment)

I can confirm this to be fixed with that binary.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

markbryanduncan picture markbryanduncan  Â·  3Comments

ezaquarii picture ezaquarii  Â·  3Comments

Tie-fighter picture Tie-fighter  Â·  3Comments

AndyScherzinger picture AndyScherzinger  Â·  3Comments