fbarthelery/geekttrss

App won't start after entering auth info

Closed this issue · 7 comments

  1. install the app from Play Store
  2. type in your login credentials, as follows:
    Server: https://api-e6d55325d25b6c51394bdb26873052da.glissando.sandcats.io
    Username: s
    Password: s
    Http Username: s
    Http Password: 3EDlvGJEjKUFKefmaSeEv-K-8btOVShA8HzRTANLiW_
  3. Press Login

EXPECTED:
App should connect to the server successfully. (I have set up this instance of tiny-tiny-rss inside sandstorm for you to test with.)

ACTUAL:
App exits and cannot be restarted. You must wipe its data using the android system settings to continue. Logcat says:

AccountAuthenticator: getAuthToken(Account {name=s, type=com.geekorum.ttrss},session_id)
AccountAuthenticator: retrofit2.HttpException: HTTP 401 Unauthorized
AccountAuthenticator:  at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:12)
AccountAuthenticator:  at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:2)
AccountAuthenticator:  at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:13)
AccountAuthenticator:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
AccountAuthenticator:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
AccountAuthenticator:  at java.lang.Thread.run(Thread.java:761)
InputDispatcher: setInputWindows
ActivityThread: SVC-Destroying service com.geekorum.ttrss.accounts.AuthenticatorService@ff47ffd
AccountManager: Unable to get auth token
AccountManager: android.accounts.AuthenticatorException: getAuthToken failed
AccountManager:        at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2220)
AccountManager:        at android.accounts.AccountManager.-wrap0(AccountManager.java)
AccountManager:        at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:2056)
AccountManager:        at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
AccountManager:        at android.os.Binder.execTransact(Binder.java:570)

Also, not sure if this is related, but after wiping the account details from the android app settings menu, and relaunching the app, I'm not able to edit the Server Url or Username box. It seems to somehow have preserved my old value (in light-grey), but clicking in the box gives me no cursor to type. The password I can type.

Actually... I tried three times and very carefully entered my information, and I'm still seeing this behavior, so I may have assumed too much about the cause of the problem. I am connecting to ttrss hosted on sandstorm, so I need http basic auth, and I don't need a username/password. I put in dummy values since I couldn't press the Login button without them.

Monitoring the backend, I see that the app got as far as sending a POST to /api:

{"user":"s","password":"s","op":"login"}

to which the server replied 200 OK:

{"seq":0,"status":0,"content":{"session_id":"<redacted>","api_level":14}}

After this, the app exits and the server hears nothing further. Future attempts to launch the app cause it to auto-exit with no network traffic reaching TTRSS. (It's possible that some network traffic is bouncing off the sandstorm layer, if the app is not sending the correct HTTP Authorization header.)

Thank you for the detailed issue and the test account.

There is an issue with Http authentication. I'm going to fix it and published a new beta later today. So if you are not already, I suggest you join the beta channel

Thanks for the investigation and prompt response! I signed myself up for the beta.

I just released version 1.5.2 to beta. It should be available soon.

You will probably have to remove your account in the Android settings (or just uninstall and reinstall the application).

Let me know if there is still something wrong

Thanks! As soon as it shows up in the market I'll try it out. (Unless I can download the .apk from somewhere else?)

Got the new versivon.
It works great!
Thanks!