[SOLVED] Android App: Account Disappears

Recently I lost the ability to log into my seafile server on my android nougat phone. When I enter my account info, server URL etc, it doesn’t give me an error it just returns to the list of accounts, having added nothing. It appears on the list of devices, on the server adminpanel though.

I’ve tried clearing data, reinstalling the app and all that. Odd thing is that if I try another user it works fine?

Server is up-to-date, app is up-to-date.

1 Like

I have the same problem, post if fixed.

Is it possible for you to try on another phone that has never had the Seafile app, such as a family member? If it works there, then we know it’s something on the phone. If it does not, the problem resides on the server side. That will help narrow it down.

I’m having a similar issue, had it several times, and seems to be related to the android app not the server. Let me describe what happened to me in two phones.

  • Moto 5Gs Plus (stock Android up to date).
  1. Installed seafile and created the account with no issues.
  2. Inserted a new SD card and formatted as internal with apps migration.
  3. Rebooted phone and the credentials were lost, the account has disappear from accounts list on the setup, and the app prompts to add a new one, being unable to create a new account. which appends to let you input the server and account data but when to tap on “Add Account” does nothing, closing the app or promtping you to input the account data again. If you check on the phone’s account list, no account is created neither.

The olny work around, was to reset to factory.

  • Lenovo Vibe 5K (AOKP flashed)
  1. It were working flawlessly but added an SD as internal storage and happened the same issue that with the other phone.

then … I reseted to “factory” like before.

  1. This time I when directly to install f-droid then yalp to install seafile from the appstore, since f-droid version does not synchronize. Added a few apps more, setup all the accounts and downloaded required soft by other apps … nothing wrong, so far, I was able to synchronize files with the phone … reboot again just to check if everything went ok … Seafile once again with issues.

Had installed a few apps to check logs while the app is running but nothing is thrown into the logs.

On the server side there are no errors neither, maybe it’s an issue with how Nougat handles the apps when you add an SD as internal storage.

[UPDATE]: I have clear all the app’s data and cache, moved back to the internal storage (not de SD formated as internal) … app still failing in the same way. Actually is one of the first things that tried when it happened the first time … but with the same results.

[UPDATE II]: Tried installing the f-droid app, just to check if that one can create the user account in the phone, but had the same issue.

Ok, I’m trying to understand your procedure a little better. Maybe a bug.

  • You install Seafile on a phone without SD card. It works fine.
  • You reboot it. It works fine.
  • You insert an SD card. The Seafile account disappears after reboot.

Is that correct?

Yes, for the first phone. For the second phone, the SD is already installed and formated as internal, the app works until the phone is rebooted, then I have to go back to factory to get it working again. No matters if I clean app’s cache and data nor if I reinstall it neither, the only way to get it working again is a factory reset.

It’s been a while since I used an SD card in a phone, but I do remember an option somewhere in the settings to enable or disable individual apps from accessing the SD card. You might try disabling it for Seafile, if that option is still available.

Are you also able to add another account with out issues? Like I mentioned, I can add other accounts but not my own.

Have you removed your old devices fom your account?

I’ve done some further research on the matter. There have been other people with the same issue with other programs, albeit it’s been a while since it’s been a common issue. The problem appears to be related to how Android operates by design. If it sees orphaned sync accounts, it will delete them. This typically happens when an app either runs from or needs access to a folder on the SD card. Since the SD card is not initialized until after boot, those folders are not accessible, and therefore, Android views those accounts as orphaned.

With that being said, you’ve installed Seafile on your internal storage, so it technically should not affect you. The only folder I can think of that the Seafile app may need access to that may be on the SD card is the photos folder. Do you have photo syncing turned on in the Seafile app?

What you said makes sence, and yes I have the photo syncing turned on.

But, let me try the following (just reseting to factory the phone with AOKP) … as soon as I get the phone empty, I will install f-droid, then YALP (no GAPPS) and then the seafile client from the G-Play Store (the one on f-droid has sync issues). With no account added yet, will check if the app is on the internal storage or the SD. If its in the SD will move to internal and then reset the phone, add the new account and reset it again.

Will keep you posted on any findings.

Well … that worked very well :grinning:

The issue happens when the app gets installed directly on the SD like wthess said. The SD does not get mounted on time when Android start checking for orphaned sync accounts, a notable thing is that once this happens you can’t add the account again. Didn’t check if that happens adding other accounts after the first one disappears.

1 Like

Well, from my point of view, it’s not a Seafile Client issue, but it can handle this situation to avoid this issue.

Maybe you can force the app installation on the internal storage, in example, DAVDroid install directly on the internal storage.

Thanks a lot for the support.

1 Like

You are correct… It’s an Android issue. Thank you for being willing to try, and also for reporting it back here. It confirms it, and may help others in the near future. And, you are welcome any time. Adding [SOLVED] to the title, btw.

Other applications suffer from the same issue. See https://github.com/nextcloud/android/issues/2032.
The workaround is to ensure the application is never installed on the SD card. Even if the app manifest mark the app ans internal storage only (android:installLocation="internalOnly") the application can still ends up in the SD if formated as “internal memory”. The only option to be safe is to not use the SD card as internal memory :frowning:.
If that happens, there is an option to not have to whipe the phone clear detailed in the linked Github issue. But it requires downloading the system’s account database from the phone in recovery, removing the still present be unusable entry and pushing the db back to the phone.

1 Like