nilsbraden / ttrss-reader-fork

An Android-Client for the self-hosted Tiny Tiny RSS feedreader
https://www.nilsbraden.de/TTRSS-Reader/
152 stars 41 forks source link

Error message "Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ #355

Closed busybit closed 6 years ago

busybit commented 7 years ago

I'm not able to establish a connection to my TT-RSS instance. (API is enabled). On startup I get the error: "Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ No Exception-Cause available". Server is Tiny Tiny RSS v17.4 (153cb6d) Client is Version 1.92.0 from Play store. Android 7.1.2

Tiny Tiny RSS (TRIAL) from Andrew Dolgov works fine with the same server settings.

nilsbraden commented 6 years ago

The data returned from the server contains non JSON data and cannot be parsed correctly. Please follow the steps in the wiki to manually call the server API and see what it returns.

feurich commented 6 years ago

I had the same error and in my case an Apache RewriteRule caused the problem. I used the Terminal and took a look at what curl -d '{"op":"login","user":"YourUsernameHere","password":"YourPwdHere"}' http://yourdomain.here/tt-rss/api/ was putting out (Thanks to Nils for this hint!). In my case the server returned plain HTML and no JSON at all. After fixing the rewrite, the app is working now. HTH someone.