android icon indicating copy to clipboard operation
android copied to clipboard

This is just a workaround, not a real account authenticator - Error while trying to log in

Open togglecode opened this issue 10 years ago • 4 comments

Actual behaviour

So I had some issues with the owncloud account on android and I tried to clear all the App data via:

  1. going to "Phone"Settings -> Apps -> owncloud -> Storage -> Manage Space -> CLEAR DATA and then I ran the app again, and of course It asked me to log in. After I typed in all the login information following error occurred:

Expected behaviour

User can login again without any problems

Steps to reproduce

  1. Clear all App data and cache
  2. Remove owncloud account completely from Phone's Settings
  3. Try to login again

Environment data

Android version: 6.0

Device model: Moto G3

ownCloud app version: master branch commit 300d65501ab278846a4d42cb4e06466c444d1a54

ownCloud server version: 8.2

Logs

07-20 19:16:22.002 9870-9870/com.owncloud.android D/FileDisplayActivity: Got to start sync
07-20 19:16:22.003 9870-9870/com.owncloud.android D/FileDisplayActivity: Requesting sync for [email protected] at org.owncloud with new API
07-20 19:16:22.008 9870-9870/com.owncloud.android V/FileDisplayActivity: onResume() start
07-20 19:16:22.008 9870-9870/com.owncloud.android D/FileDisplayActivity: onResume() starting
07-20 19:16:22.109 9870-9870/com.owncloud.android V/FileDisplayActivity: onResume() end
07-20 19:16:22.352 9870-10420/com.owncloud.android D/SimpleFactoryManager: getClientFor(OwnCloudAccount ... : 
07-20 19:16:22.358 9870-10420/com.owncloud.android D/NetworkUtils: Searching known-servers store at /data/user/0/com.owncloud.android/files/knownServers.bks
07-20 19:16:22.367 9870-10420/com.owncloud.android D/OwnCloudClient #0: Creating OwnCloudClient
07-20 19:16:22.367 9870-10420/com.owncloud.android V/SimpleFactoryManager:     new client {[email protected], 21739198}
07-20 19:16:40.076 9870-10961/com.owncloud.android D/SimpleFactoryManager: getClientFor(OwnCloudAccount ... : 
07-20 19:16:40.076 9870-10961/com.owncloud.android D/OwnCloudClient #1: Creating OwnCloudClient
07-20 19:16:40.077 9870-10961/com.owncloud.android V/SimpleFactoryManager:     new client {[email protected], 143163594}
07-20 19:16:40.320 10968-10968/com.owncloud.android.workaround.accounts W/System: ClassLoader referenced unknown path: /data/app/com.owncloud.android.workaround.accounts-1/lib/arm
07-20 19:16:40.648 9870-10961/com.owncloud.android E/RemoteOperation: Error while trying to access to [email protected]
                                                                      android.accounts.AuthenticatorException: java.lang.UnsupportedOperationException: This is just a workaround, not a real account authenticator
                                                                          at android.accounts.AccountManager$AmsTask.internalGetResult(AccountManager.java:1932)
                                                                          at android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:1950)
                                                                          at android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:1948)
                                                                          at android.accounts.AccountManager.blockingGetAuthToken(AccountManager.java:1191)
                                                                          at com.owncloud.android.lib.common.accounts.AccountUtils.getCredentialsForAccount(AccountUtils.java:206)
                                                                          at com.owncloud.android.lib.common.OwnCloudAccount.loadCredentials(OwnCloudAccount.java:126)
                                                                          at com.owncloud.android.lib.common.SimpleFactoryManager.getClientFor(SimpleFactoryManager.java:62)
                                                                          at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:282)
                                                                          at java.lang.Thread.run(Thread.java:818)
                                                                       Caused by: java.lang.UnsupportedOperationException: This is just a workaround, not a real account authenticator
                                                                          at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2139)
                                                                          at android.accounts.AccountManager.-wrap0(AccountManager.java)
                                                                          at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1993)
                                                                          at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
                                                                          at android.os.Binder.execTransact(Binder.java:453)

togglecode avatar Jul 20 '16 17:07 togglecode

Well this is a really annoying bug since I am unable to even start the app now. Any suggestions would be appreciated.

togglecode avatar Jul 20 '16 17:07 togglecode

Try to uninstall ownCloud Jelly Bean Workaround app from your device, then login, the reinstall again OC JB app.

davivel avatar Jul 20 '16 17:07 davivel

@davivel hey thanks for your fast reply, this was giving me so much trouble, although I have to mention that previously I did try to clean the cache and data from ownCloud Jelly Bean Workaround app in the settings as well. After that I tried to unistall the owncloud App and I assumed the workaround would be uninstalled with it as well. Maybe there should be a way to unistall OR clear the data for both at once (?).

togglecode avatar Jul 20 '16 17:07 togglecode

The workaround app has no data at all. It's there only to grant that, in boot time, before the encrypted partition where paid apps are installed is mounted, there is at least one app claiming the usage of accounts of type org.owncloud ; otherwise the system thinks that the accounts are unused, and wipes them. This is a bug in Android that was fixed in Android 4.2 by Google, but remains in versions 4.2 and 4.3 of some vendors (we know about some Samsung and HTC devices suffering this). After the fix, the check for "abandonded accounts" is done after the encrypted partition is mounted.

As a side effect, if the workaround app is not always installed after the ownCloud app, it is considered by the system as the account manager of org.owncloud accounts, and requests for creating or updating accounts are driven to it, instead of to the OC app, even from the login activity of the OC app.

davivel avatar Jul 21 '16 06:07 davivel