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

Automatic Upload Issue on Nextcloud Android Client (v3.30.6) - Android permissions lost after update #14199

Open
4 tasks done
webneo82 opened this issue Dec 18, 2024 · 40 comments

Comments

@webneo82
Copy link

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

Update the Nextcloud Android client to version 3.30.6.

Take new photos using the device’s camera or receive media via apps like WhatsApp.

Check the "Automatic Upload" settings under the app settings.

Grant permissions again when prompted by Android.

Observe that media files created or received before re-granting permissions are not uploaded, while new files are uploaded as expected.

Expected behaviour

All photos and media, including those created or received before permissions are re-granted, should be uploaded to the Nextcloud server according to the configured "Automatic Upload" settings.

Actual behaviour

The "Automatic Upload" settings for folders appear unchanged in the app after the update.

Android prompts for required permissions again after the update, despite these permissions being previously granted.

Granting permissions again does not resolve the issue for media created prior to the update; only new media is added to the upload queue and successfully uploaded.

Android version

14

Device brand and model

Samsung A- and S- series

Stock or custom OS?

Stock

Nextcloud android app version

3.30.6

Nextcloud server version

30.0.0.4

Using a reverse proxy?

No

Android logs

No response

Server error logs

Additional information

Proposed Solution

Investigate why permissions are being reset or re-requested after the update.

Ensure that media created or received before permissions are re-granted is properly detected and uploaded.

Include a migration or re-scan step after updates to avoid loss of sync for existing files.

@FelixBuehler
Copy link

I have the same issue regarding the not auto uploading photos and a new request for permissions, but after I re-grant them, the auto upload still isn't working. It's all set, but nothing happens.

The last image uploaded for me was on 16th December. I have Google Auto Update enabled, I don't know which exact version did change then. Right now it's 3.30.6.

@Mabashi8
Copy link

I have the same exact issue one two of my devices running on android app version 3.30.6 too

@YourWishes
Copy link

Same issue. I have a Galaxy Fold 3, I was actually unable to grant permission, the interface to grant permissions had locked up entirely. I manually went into settings and granted permissions and now the auto upload settings can see the files, but is not auto uploading them.

@kolAflash
Copy link

kolAflash commented Dec 19, 2024

Same here. (FP3+, /e/OS-2.1-202406, Android-13)

Any workaround?
I've tried this but it didn't help:

appops set --uid com.nextcloud.client MANAGE_EXTERNAL_STORAGE allow
pm grant com.nextcloud.client android.permission.WRITE_EXTERNAL_STORAGE

Downgrade worked (maybe only possible on rooted devices):

wget 'https://github.com/nextcloud/android/releases/download/stable-3.30.5/gplay-release-30300590.apk'
adb install -d -r gplay-release-30300590.apk

@Beer17HWAM
Copy link

Installed the version from the fdroid store and it's working again.

@JanisPlayer
Copy link

JanisPlayer commented Dec 19, 2024

I simply gave the app all the permissions in the settings. And then I manually uploaded all the files that weren't uploaded automatically. The new files would then at least be uploaded after a while, but the ones he didn't upload can unfortunately only be uploaded manually afterwards.

Show image how to change the settings

Image

@wvxx
Copy link

wvxx commented Dec 20, 2024

Having the same problem, last photos uploaded on December 16th. Manual upload works fine, automatic does not work at all.
Reinstalling 3.30.6 from F-Droid did not bring any improvement, downgrade to 3.30.5 made auto-upload work again.

@mike1703
Copy link

I simply gave the app all the permissions in the settings. And then I manually uploaded all the files that weren't uploaded automatically. The new files would then at least be uploaded after a while, but the ones he didn't upload can unfortunately only be uploaded manually afterwards.
Show image how to change the settings

Setting permissions worked for me as well but files that have been created before updating the permissions (and not uploaded already) are not uploaded now

@izzy
Copy link

izzy commented Dec 22, 2024

My client also stopped uploading after the Update(Galaxy A55, Android 14, GPlay). I didn't notice until today when I noticed nothing had been uploaded for a week by complete chance.

Granting the client permissions did not alleviate the issue.

Uninstalling and then reinstalling from GPlay made the client upload the photos taken since granting the permissions to the point of reinstallation, but neither subsequent photos nor photos taken between the update and granting the permissions were uploaded.

Reinstalling from F-Droid loses all settings. After Logging in, choosing full access to all data and setting up the folders for auto-upload, the client will start reuploading every file present and then work again just fine(at least for now).

I'm honestly not happy with having to install a third party app store and then reinstall and reconfigure the whole app just to get the one feature I'm using the app for working again.

@tuxArg
Copy link

tuxArg commented Dec 22, 2024

This happened to me too. Even after reinstalling and giving full permissions I notice that photos and videos metadata are removed before uploading, so I'm missing all location data of auto uploaded files. I think it's the same issue, so I'm not opening another one.

@tuxArg
Copy link

tuxArg commented Dec 23, 2024

Ok, I've been investigating this. I think the problem is commit 8094755 that removed MANAGE_EXTERNAL_STORAGE permission as it states "MANAGE_EXTERNAL_STORAGE not possible for gplay flavor anylonger".
If this is the case I think that Nextcloud should:

@sidsingh78
Copy link

Nextcloud Android App version 3.30.6
Phone: Google Pixel 9 Pro
Android Version: 15
NC Server Version 30.0.4 Stable (AIO docker)

I have the exact same issue + a new issue with losing GPS EXIF data.

  1. Auto Upload stopped working after Dec 18th. (possibly after app update from Google Playstore). I did noticed the app again asked for permissions to my files which I granted.
  2. EXIF Location/GPS data gets stripped from pictures when uploading manually or auto upload.

To resolve issue 1 with auto upload, I tried clearing app cache and it did not work. so I uninstalled and reinstalled the App from Play store and granted All permissions again to photos and videos. The auto upload is working now.

Issue 2 is still unresolved. The Nextcloud app is removing the GPS coordinates while uploading the pictures Manually or by Auto Upload. I use Memories app and I do not see the GPS location data in the picture details. The default Google Photos app on phone shows the location data associated with the pictures.

There were no changes or updates done on my NC Server.

@idle-user
Copy link

Same issue.

  • Last upload was Dec 16
  • App lost permissions and had to regrant them after an update
  • No photos from the gap from 16th to the date permissions were granted are being uploaded

This app seriously needs a re-sync option so we can manually have it catch-up. We shouldn't have to re-install it or mess with permissions/cache/app-data in hopes to trigger the sync.

@tuxArg
Copy link

tuxArg commented Dec 23, 2024

To recover exif functionality we need to re-enable MANAGE_EXTERNAL_STORAGE permission, which must be allowed by google play (but could be included now in f-droid build) or add ACCESS_MEDIA_LOCATION (I don't know if all exif metadata can be read with this) or another workaround.
I think media autouploading should support original file upload, not just the exif-trimmed android version.

@harryr85
Copy link

Nextcloud Android App version 3.30.6
Phone: Samsung S21FE
Android Version: 14

Same issue here.
Media files (jpg, png) may be uploaded manually.
But all other file types can't even be seen/selected for upload. There go my backups. :-((

@mikeage
Copy link

mikeage commented Dec 24, 2024

Same here. (FP3+, /e/OS-2.1-202406, Android-13)

Any workaround? I've tried this but it didn't help:

appops set --uid com.nextcloud.client MANAGE_EXTERNAL_STORAGE allow
pm grant com.nextcloud.client android.permission.WRITE_EXTERNAL_STORAGE
Downgrade worked (maybe only possible on rooted devices):

wget 'https://github.com/nextcloud/android/releases/download/stable-3.30.5/gplay-release-30300590.apk'
adb install -d -r gplay-release-30300590.apk

The app no longer requests MANAGE_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE, so I wasn't able to grant that permission, but downgrading to 3.30.5 work just fine on my (non-rooted) Xiaomi Redmi 10.

@HPPinata
Copy link

This is due to the Google Team in charge of the Play-Store not allowing the Nextcloud App to access all files.
They weren't allowed to publish ANY updates until they removed that permission, see #14099. Instead they have to use the Android media Subsystem that can still access files everywhere, but is limited to only media files and read only access at that.

The only way to make things work again is to uninstall the Play-Store Version, install the F-Droid alternative AppStore https://f-droid.org/ and then install the Nextcloud App from there.
In that Version full storage access isn't (arbitrarily at best, maliciously at worst) forbidden by Google.

EXIF (Location, Date, other Tags, etc.) do work with the F-Droid Version, but it is necessary to do a full uninstall and then install from F-Droid. Just force updating over the existing installation doesn't appear to be enough.

@tuxArg
Copy link

tuxArg commented Dec 24, 2024

The only way to make things work again is to uninstall the Play-Store Version, install the F-Droid alternative AppStore https://f-droid.org/ and then install the Nextcloud App from there. In that Version full storage access isn't (arbitrarily at best, maliciously at worst) forbidden by Google.

This is not actually accurate as v3.30.6 build for f-droid doesn't access all files too. To make it work now, we should downgrade to v.3.30.5 (not possible to downgrade with gplay afaik) until a f-droid build is available asking this permission again.

@HPPinata
Copy link

I installed the 3.30.6 Version from F-Droid around an hour ago and it asked for that permission on startup and EXIF, etc. Worked fine after.
It was a fresh install after a clean uninstall of the Google play version (so no prior state) and I should be able to provide some screen recordings this evening once I have a separate test device at my disposal.
No Idea how it behaves on updates though

@tuxArg
Copy link

tuxArg commented Dec 24, 2024

I think you are right. Looking at the #14099 there is some check if it's a gplay build or not.

@zyphlar
Copy link

zyphlar commented Dec 24, 2024

This sucks, friends. Makes me want to root my phone, turn off all automatic updates, and live out my life never upgrading anything ever.

Imagine if you went to your parent's house for a holiday but they hadn't checked on your family photo albums in a few years and it turns out that actually they're all gone now. Sorry, the memories got lost in a snafu between PhotoAlbum™ and Zoogle®. Reliably syncing and archiving files is, like, the NextCloud app's whole purpose. I can't even use Memories as they've removed that feature.

Guess I'll uninstall, downgrade, and revisit this in the new year... surely there could've been a better way to handle this.

@HPPinata
Copy link

HPPinata commented Dec 24, 2024

This sucks, friends. Makes me want to root my phone, turn off all automatic updates, and live out my life never upgrading anything ever.

Imagine if you went to your parent's house for a holiday but they hadn't checked on your family photo albums in a few years and it turns out that actually they're all gone now. Sorry, the memories got lost in a snafu between PhotoAlbum™ and Zoogle®. Reliably syncing and archiving files is, like, the NextCloud app's whole purpose. I can't even use Memories as they've removed that feature.

Guess I'll uninstall, downgrade, and revisit this in the new year... surely there could've been a better way to handle this.

They tried to resolve that issue with Google for over 5 months. See #13871.
Yes this sucks, but if you can't even push bug fixes, let alone new features at some point you have to cave in...
At least on Android there is the option to use F-Droid even without having to root. But I agree this could have been communicated more clearly even if a more elegant solution has been locked out by Google.

@zyphlar
Copy link

zyphlar commented Dec 24, 2024

No offense to the team, I know it's thankless work and Google makes updates awful. I just wish something like NextCloud notifications worked (I get a popup saying NOTIFICATION and then open the app and there's no notifications lol? I'm sure that's another known issue) and it was possible for the team to use that feature to warn users.

Unfortunately I think the default experience will be lots of people thinking their photos or files are being backed up, and they just haven't been, and they won't realize until they open the app. Most people won't realize any possible fix, either, because they don't know how to find this Git repo or issue. (Google led me to old forum posts first, etc)

@mikeage
Copy link

mikeage commented Dec 25, 2024

I installed the 3.30.6 Version from F-Droid around an hour ago and it asked for that permission on startup and EXIF, etc. Worked fine after. It was a fresh install after a clean uninstall of the Google play version (so no prior state) and I should be able to provide some screen recordings this evening once I have a separate test device at my disposal. No Idea how it behaves on updates though

Just to be clear, did automatic uploads work for you with 3.30.6 from F-Droid? For me, it did not seem to trigger any automatic uploads, but 3.30.5 (naturally) did.

@HPPinata
Copy link

I installed the 3.30.6 Version from F-Droid around an hour ago and it asked for that permission on startup and EXIF, etc. Worked fine after. It was a fresh install after a clean uninstall of the Google play version (so no prior state) and I should be able to provide some screen recordings this evening once I have a separate test device at my disposal. No Idea how it behaves on updates though

Just to be clear, did automatic uploads work for you with 3.30.6 from F-Droid? For me, it did not seem to trigger any automatic uploads, but 3.30.5 (naturally) did.

I had no issues after installing the 3.30.6 version from F-Droid.
It worked exactly as I expected the "old" 2.29.2 version from gplay to work before anything broke (except maybe push notifications from my server as they rely on Google services iirc.)
Of course I had to set my auto uploads up from scratch again as a clean uninstall/reinstall cycle to switch over deletes all prior settings.

@mikeage
Copy link

mikeage commented Dec 25, 2024

I think I may have been mistaken, as I just updated one, and then another, and both were fine. Thanks for confirming!

@hw-hass23
Copy link

  1. EXIF Location/GPS data gets stripped from pictures when uploading manually or auto upload.

There is a difference noticable on my Poco X5 Pro (Xiaomi HyperOS 1.0.9, Android 14):

  • When sharing photos to the Nextcloud App from the stock gallery, I was able to get the GPS intact after disabling "Safe Sharing" in the gallery settings.
  • Nextcloud Automatic Photo Upload on the other hand always gets the GPS data zeroed out - which is bad, we need a solution for this.

@HPPinata
Copy link

  1. EXIF Location/GPS data gets stripped from pictures when uploading manually or auto upload.

There is a difference noticable on my Poco X5 Pro (Xiaomi HyperOS 1.0.9, Android 14):

* When sharing photos to the Nextcloud App from the stock gallery, I was able to get the GPS intact after disabling "Safe Sharing" in the gallery settings.

* Nextcloud Automatic Photo Upload on the other hand always gets the GPS data zeroed out - which is bad, we need a solution for this.

Was this with the gplay version or a freshly installed F-Droid version that had MANAGE_EXTERNAL_STORAGE granted?

@hw-hass23
Copy link

hw-hass23 commented Dec 26, 2024

Was this with the gplay version or a freshly installed F-Droid version that had MANAGE_EXTERNAL_STORAGE granted?

GPlay

ACCESS_MEDIA_LOCATION Android permission might help Nextcloud auto upload in accessing the unredacted EXIF with GPS intact.

@BluePixel4k
Copy link

FYI, the ACCESS_MEDIA_LOCATION permission will be added in the future: #14247

But in general, this bug is a little off topic in relation to the initial post.

@Wikinaut
Copy link
Contributor

same here.

This issue

EXIF Location/GPS data gets stripped from pictures when uploading manually or auto upload.

should be filed separately, in my view.

@stefan-franz
Copy link

Same problem here: Upload any files - Upload Option: Source only readable.
And upload doesn't work. Don't know why.
Android 11 and Android 15

@HPPinata
Copy link

Same problem here: Upload any files - Upload Option: Source only readable. And upload doesn't work. Don't know why. Android 11 and Android 15

With the Google Play version you can now only upload media files. To be able to upload any files or get the previously established behavior you need to use the F-Droid version of the app at least until this permission issue is resolved by Google (if they ever choose to do so)

@smb500
Copy link

smb500 commented Jan 2, 2025

Hi,

I'm glad to find this here... yesterday I used my day to find out why my documents are not uploaded in my Nextcloud. (my workaround was downgrade to GPlay App 3.30.5). Missing EXIF was new to me, thanks.

I will go to the F-Droid version now. Is there no way to give a direct APK download here? And a notification inside the app when an update is availible on github?

I could be useful to inform all users about that problem with Google.

@HPPinata
Copy link

HPPinata commented Jan 2, 2025

There's an APK download in the releases section https://github.com/nextcloud/android/releases, but you'll have to check for updates manually.
Doing the update logic inside the app (especially if package managers are readily available) is pretty outdated and unnecessary.

@nextgen-networks
Copy link

Auto Upload works again with the "nextcloud dev" version from F-Droid appstore released 2024-12-28.

@rotanid
Copy link

rotanid commented Jan 5, 2025

@nextgen-networks with the fdroid version it always worked! even without "dev".

@alperozturk96
Copy link
Collaborator

This seems to be the same issue. Is it okay to continue with the provided link. @webneo82

#14334

@webneo82
Copy link
Author

webneo82 commented Jan 10, 2025

It seems to be the same problem. However, it is not clear from the other ticket whether the permissions have only been lost because of the app update. The problem is simply that after the app update, the Nextcloud client no longer automatically has permission in Android to perform automatic uploads according to the settings. If you go to the corresponding settings, you can grant the Nextcloud client the authorization again by an automatic query and the automatic upload works again as it was defined in the settings. However, the data created in between the update and the re-setting of the authorizations is missing in the automatic upload. It cannot be that in environments with many smartphones such fatal errors lead to people having to start reassigning permissions and then uploading the data manually. I still have the problem that not all users have done this.

@tobiasKaminsky
Copy link
Member

This is handled via our next release, 3.30.8 RC1
It is currently in review and will be soon available for Beta users.
Please sign up to it, to check it and provide feedback.

More explanation can be found in #14409

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