newsplus icon indicating copy to clipboard operation
newsplus copied to clipboard

tt-rss plugin seems to "forget" authentication details

Open jochenberger opened this issue 9 years ago • 15 comments

From time to time, refreshing a tt-rss subscription fails. When that happens, ERROR_AUTHENTICATION: NOT_LOGGED_IN is shown in a popup. The logcat shows

W/System.err( 9421): com.noinnion.android.reader.api.ReaderException$ReaderLoginException: NOT_LOGGED_IN
W/System.err( 9421):    at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.handleError(TtRssExtension.java:369)
W/System.err( 9421):    at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.parseFeedList(TtRssExtension.java:610)
W/System.err( 9421):    at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.getFeedList(TtRssExtension.java:576)
W/System.err( 9421):    at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.handleReaderList(TtRssExtension.java:379)
W/System.err( 9421):    at com.noinnion.android.reader.api.ReaderExtension$1.handleReaderList(ReaderExtension.java:154)
W/System.err( 9421):    at com.noinnion.android.reader.api.internal.IReaderExtension$Stub.onTransact(IReaderExtension.java:71)
W/System.err( 9421):    at android.os.Binder.execTransact(Binder.java:404)
W/System.err(32501): com.noinnion.android.reader.api.ReaderException$ReaderLoginException: ERROR_AUTHENTICATION: NOT_LOGGED_IN
W/System.err(32501):    at com.noinnion.android.newsplus.reader.provider.ReaderManager.checkError(ReaderManager.java:1069)
W/System.err(32501):    at com.noinnion.android.newsplus.reader.provider.ReaderManager.syncReaderLists(ReaderManager.java:1710)
W/System.err(32501):    at com.noinnion.android.newsplus.reader.provider.ReaderManager.sync(ReaderManager.java:1093)
W/System.err(32501):    at com.noinnion.android.newsplus.reader.provider.ReaderManager.syncEx(ReaderManager.java:1075)
W/System.err(32501):    at com.noinnion.android.newsplus.reader.service.SyncService.doSync(SyncService.java:197)
W/System.err(32501):    at com.noinnion.android.newsplus.reader.service.SyncService.access$000(SyncService.java:57)
W/System.err(32501):    at com.noinnion.android.newsplus.reader.service.SyncService$1.run(SyncService.java:139)
W/System.err(32501):    at com.noinnion.android.newsplus.extension.ExtensionHost$1.run(ExtensionHost.java:186)
W/System.err(32501):    at android.os.Handler.handleCallback(Handler.java:733)
W/System.err(32501):    at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err(32501):    at android.os.Looper.loop(Looper.java:136)
W/System.err(32501):    at android.os.HandlerThread.run(HandlerThread.java:61)

To fix it, I have to sign out of the tt-rss plugin, quit News+ via the recent apps, start it again and sign in. Then, it usually works again.

jochenberger avatar Sep 09 '14 17:09 jochenberger

Sometimes, the trace also contains

W/System.err( 9421): org.json.JSONException: Value <?xml of type java.lang.String cannot be converted to JSONObject
W/System.err( 9421):    at org.json.JSON.typeMismatch(JSON.java:111)
W/System.err( 9421):    at org.json.JSONObject.<init>(JSONObject.java:159)
W/System.err( 9421):    at org.json.JSONObject.<init>(JSONObject.java:172)
W/System.err( 9421):    at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.login(TtRssExtension.java:318)
W/System.err( 9421):    at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.handleReaderList(TtRssExtension.java:385)
W/System.err( 9421):    at com.noinnion.android.reader.api.ReaderExtension$1.handleReaderList(ReaderExtension.java:154)
W/System.err( 9421):    at com.noinnion.android.reader.api.internal.IReaderExtension$Stub.onTransact(IReaderExtension.java:71)
W/System.err( 9421):    at android.os.Binder.execTransact(Binder.java:404)

jochenberger avatar Sep 09 '14 17:09 jochenberger

could you try the latest beta v1.1.5beta http://noinnion.com/newsplus/updates/

On Tue, Sep 9, 2014 at 7:04 PM, jochenberger [email protected] wrote:

Sometimes, the trace also contains

W/System.err( 9421): org.json.JSONException: Value <?xml of type java.lang.String cannot be converted to JSONObject W/System.err( 9421): at org.json.JSON.typeMismatch(JSON.java:111) W/System.err( 9421): at org.json.JSONObject.(JSONObject.java:159) W/System.err( 9421): at org.json.JSONObject.(JSONObject.java:172) W/System.err( 9421): at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.login(TtRssExtension.java:318) W/System.err( 9421): at com.noinnion.android.newsplus.extension.ttrss.TtRssExtension.handleReaderList(TtRssExtension.java:385) W/System.err( 9421): at com.noinnion.android.reader.api.ReaderExtension$1.handleReaderList(ReaderExtension.java:154) W/System.err( 9421): at com.noinnion.android.reader.api.internal.IReaderExtension$Stub.onTransact(IReaderExtension.java:71) W/System.err( 9421): at android.os.Binder.execTransact(Binder.java:404)

— Reply to this email directly or view it on GitHub https://github.com/noinnion/newsplus/issues/80#issuecomment-55002446.

noinnion avatar Sep 09 '14 22:09 noinnion

Sorry, I don't install packages from untrusted sources. I'll report back if I have issues with the next stable release.

jochenberger avatar Sep 10 '14 06:09 jochenberger

Still broken in the new version.

jochenberger avatar Oct 02 '14 17:10 jochenberger

When that happens, downloading offline content for already synced items still works. The error only occurs when trying to fetch new items.

jochenberger avatar Oct 05 '14 07:10 jochenberger

That usually happens at least once a day.

jochenberger avatar Oct 14 '14 16:10 jochenberger

sorry for the late reply. I will try to fix it.

On Tue, Oct 14, 2014 at 6:41 PM, jochenberger [email protected] wrote:

That usually happens at least once a day.

— Reply to this email directly or view it on GitHub https://github.com/noinnion/newsplus/issues/80#issuecomment-59076264.

noinnion avatar Oct 22 '14 14:10 noinnion

I have the same issue (already saw it couple of times every few days when I try to read feeds using News+). Hope you can fix it.

moneytoo avatar Oct 22 '14 14:10 moneytoo

Hello Noinnion,

I also have that error. I think, the problem might be the "single user mode" in combination with an authentication plugin set in the ttrss config.php and by using your ttrss api plugin... Later this day I will try to remove the authentication plugins from the config.php. THIS should ONLY be done, if you are using another methode of protection (like htaccess).

Greetings

Kasara avatar Nov 28 '14 07:11 Kasara

Still an issue in 2.0.0.

jochenberger avatar Jan 15 '15 17:01 jochenberger

I experienced this issue on CyanogenMod rom but it worked fine (and still does) on stock rom (Samsung Galaxy S5).

moneytoo avatar Jan 15 '15 17:01 moneytoo

I'm actually using CyanogenMod. What about you @Kasara? I still wonder why TtRssExtension tries to parse an XML (sub?)string to JSON.

jochenberger avatar Jan 15 '15 17:01 jochenberger

Hi Jochen,

it is possible to have access to your account? I could not reproduce the issue so it would be good to test it on your account. If it is ok, send me an email

On Thu, Jan 15, 2015 at 6:50 PM, jochenberger [email protected] wrote:

I'm actually using CyanogenMod. What about you @Kasara https://github.com/Kasara? I still wonder why TtRssExtension tries to parse an XML (sub?)string to JSON.

— Reply to this email directly or view it on GitHub https://github.com/noinnion/newsplus/issues/80#issuecomment-70128913.

noinnion avatar Jan 16 '15 14:01 noinnion

Frankly spoken, I'm not a big fan of that idea. What about catching the exception and logging more of the XML string, like the first max(200, string.length() chars? Maybe that'll help us to understand what's happening and how an XML string is ending up in the JSON parser in the first place.

jochenberger avatar Jan 26 '15 16:01 jochenberger

I tried to have a look myself, but when I try to import the tt-rss extension project in eclipse, I get a manifest error:

error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.Sherlock.Light').

jochenberger avatar Feb 03 '15 17:02 jochenberger