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

Nexcloud Android "Account" disappears after reboot, when nextcloud app has been moved to sdcard, sdcard formatted as internal storage (Android 6.0) #1814

Closed
michaelof opened this issue Nov 27, 2017 · 15 comments

Comments

@michaelof
Copy link

Actual behaviour

Took me a while to narrow down...

As Nextcloud's Android account are disappearing reproducible after each phone reboot, I have to "grant access" and enter server name and login credentials after each reboot. Somewhat annoying ;-)

Expected behaviour

  • Server name and Login credentials should be asked once and stored permanently. Android "account" type "Nextcloud" should "survive" reboots/shutdowns.

Steps to reproduce

maybe a "prerequisite" for this bug, don't know: My smartphone is encrypted.

Small internal storage (8GB), so 32GB sdcard added.
pre-req 1: sdcard formatted as internal storage !
pre-req 2: install nextcloud app
pre-req 3: "Change storage" for Nextcloud app from "Internal storage" to sdcard.

Again: sdcard is formatted as internal storage, all above done with native Android functionality.

  1. start nexcloud app
  2. enter server name and login credentials

all I need is working fine at this moment
remark: I can see an Android "account", type "Nextcloud", in my smartphone's system settings from this point on.

  1. reboot
  2. Android "account" type "Nextcloud" is gone. Start at step 1 :-(

IMPORTANT: This bug ONLY happens, when Nextcloud app has been "Change storage"-'d from "Internal storage" to sdcard. Which, in fact, is a necessity for smartphones with low internal memory. Esp. for Apps like the nextcloud app, which needs usually lot of smartphone's storage for offline synching etc.

REMARK: I found this bug also for other apps, as long as they're using Android "accounts", like German "Onleihe" App (which also need mass storage on the phone for downloaded media, and the German XING social network app. So I'm highly interested if this an app bug or maybe an Android bug.

Environment data

Android version:
6.0 Marshmallow

Device model:
Lenovo C2 aka K10a40

Stock or customized system:
Stock

Nextcloud app version:
2.0.1 (F-Droid version)

Nextcloud server version:
12.0.3

Logs

Web server error log

not applicable
Insert your webserver log here
not applicable

Nextcloud log (data/nextcloud.log)

not applicable

Insert your Nextcloud log here
not applicable

@uweplonus
Copy link

It looks like I have the same or a similar problem.

I have a Nokia 5 (Android 7.1.2) and have also added an SD-Card as internal memory and the memory is encrypted.

What is even worse is that I cannot add an account for Nextcloud...

Please search the bug and fix it.

If you need help (log files/debugging) please advise. I can help debugging the application if needed.

@tobiasKaminsky
Copy link
Member

I remember that this is somehow an android bug: if you have an app on external sdcard (used as internal storage) it can happens that the account is lost.
For a workaround you can try to install the NC app on real internal storage, but then in settings move the data folder to "external" sdcard, so you have your big data on the sdcard.

@uweplonus
Copy link

@tobiasKaminsky I cannot select the storage place during installation. But I found another interesting thing: My user account, that does not work contains an "@" sign. I added now a second user without "@" sign and this user seems to work properly. I'll monitor this for the next few days.

@tobiasKaminsky
Copy link
Member

@uweplonus I tried to reproduce this with latest master and NC13 on an emulator and could not reproduce it.
Maybe you want to try out our dev version (you can install it in parallel):
https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md#dev-release

@uweplonus
Copy link

uweplonus commented Dec 19, 2017

@tobiasKaminsky Is this the same dev version as deployed at F-Droid?

@AndyScherzinger
Copy link
Member

@uweplonus yes, that is the same version 👍

@michaelof
Copy link
Author

Tested with DEV version (20171212), and unfortunately the bug is also there. Account is gone after reboot :(

@michaelof
Copy link
Author

DEV version from F-Droid, forgot to mention

@uweplonus
Copy link

Tested now with dev 20171219 and the account is also gone...

@lars-vom-mars-x
Copy link

see also #2032

@stale
Copy link

stale bot commented May 10, 2019

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 May 10, 2019
@uweplonus
Copy link

I do not have this problem anymore (using 3.5.0)

@stale stale bot removed the stale label May 10, 2019
@michaelof
Copy link
Author

michaelof commented May 10, 2019

As said, this issue is reproducible for me for any release since I've opened this issue up to the current 3.6.0 release.

I agree to some of the previous posters, this behaviour for sure is an android bug, as same issue for all apps depending on android's "accounts" mechanism.

Funny as it is, Firefox for Android is the ONLY app I'm aware off which is able to deal with this bug: Android's account created by Firefox (Used for SYNC) is also dropped after reboot, but automatically recreated by Firefox after first start. So Firefox seems to store credentials somewhere, in parallel. Funny for me, as Firefox, because of not only this bug about Adoptable Storage, per definition offers no option to use external storage (anymore). Although they can handle it! So I personally scripted that whenever a new Apk is released, I'm downloading it, extract the manifest, change the storage_location, ...

In summary: Would be cool if NC app could workaround the account bug the same way than Firefox Sync. But not that important, as the auto-upload functionality now works more reliable.

@quamis
Copy link

quamis commented May 13, 2019

I've changed my phone since this was reported, and now it's installed in the main storage, but the data is stored in the sdcard. This issue isn't happening in this configuration. (Android 9)

@stale
Copy link

stale bot commented Jun 10, 2019

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 Jun 10, 2019
@stale stale bot closed this as completed Jun 24, 2019
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

6 participants