nilsbraden / ttrss-reader-fork

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

Crash when selecting new articles section #448

Closed s-fritsch closed 3 years ago

s-fritsch commented 3 years ago

With version 1.96.3 from f-droid on a device with lineageOS 17.1 (based on android 10) , whenever I select the top level "neue Artikel" (german, not sure what the english text it) section, ttrss-reader crashes with:

04-03 18:46:32.898 20578 20578 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ac1794e 04-03 18:46:32.902 20578 20578 I j : Error reporting disabled, invalid installation. 04-03 18:46:32.916 20578 20578 I f : Tablet layout: true, minSize: 91, maxSize: 1741, displaySize: 1832, isVertical: true 04-03 18:46:32.916 20578 20578 W FeedHeadlineActivity: displayFeed() has been called, newArticleId: -3, direction: 0 04-03 18:46:32.921 20578 20578 I f : Tablet layout: true, minSize: 91, maxSize: 1741, displaySize: 1832, isVertical: true 04-03 18:46:32.921 20578 29973 E SQLiteLog: (1) no such column: a.score 04-03 18:46:32.922 20578 29973 E SQLiteLog: (1) no such column: a.score 04-03 18:46:32.923 20578 20578 D n : GetNetworkType: Type = 3 (0 = none, 1 = mobile, 2 = metered, 3 = wifi) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: FATAL EXCEPTION: ModernAsyncTask #2 04-03 18:46:32.924 20578 29973 E AndroidRuntime: Process: org.ttrssreader, PID: 20578 04-03 18:46:32.924 20578 29973 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground() 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at c.n.b.d$c.done(:4) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteException: no such column: a.score (code 1 SQLITE_ERROR): , while compiling: SELECT a._id AS _id, a.feedId, a.title, a.isUnread AS unread, a.updateDate, a.isStarred, a.isPublished, a.note, f.title AS feedTitle FROM articles a, feeds f WHERE a.feedId=f._id AND a.updateDate>1617295592922 AND a.isUnread>0 AND (a.score is null or a.score>=0) ORDER BY a.updateDate DESC LIMIT 1000 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:986) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:593) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:61) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1443) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1382) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at g.e.d.f.a(:5) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at org.ttrssreader.model.ListContentProvider.query(:7) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.content.ContentProvider.query(ContentProvider.java:1214) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.content.ContentProvider.query(ContentProvider.java:1307) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.content.ContentProvider$Transport.query(ContentProvider.java:267) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:944) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:880) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at c.h.b.f.R(:2) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at c.n.b.a.f(:5) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at c.n.b.a$a.a(:1) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at c.n.b.d$b.call(Unknown Source:18) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 04-03 18:46:32.924 20578 29973 E AndroidRuntime: ... 3 more 04-03 18:46:32.948 20578 29973 I Process : Sending signal. PID: 20578 SIG: 9 04-03 18:46:32.970 4545 4934 I ActivityManager: Process org.ttrssreader (pid 20578) has died: fore TOP 04-03 18:46:32.971 4545 4595 I libprocessgroup: Successfully killed process cgroup uid 10119 pid 20578 in 0ms 04-03 18:46:32.972 4295 4295 I Zygote : Process 20578 exited due to signal 9 (Killed) 04-03 18:46:32.990 4545 4587 W ActivityManager: setHasOverlayUi called on unknown pid: 20578

Except for the new articles section, it seems to work fine.

Any idea, how to find out why it thinks "Error reporting disabled, invalid installation"?

On a different device running on grapheneos (based on aosp 11) with the same ttrss-reader version using the same ttrss server and account, it works fine.

nilsbraden commented 3 years ago

Can you please try a fresh installation? For some reason it seems like some devices did not get their database updated and don't have the column "score" so it crashes when selecting articles by score for the fresh feed.

The invalid installation info is because the app is signed with a different key, f-droid ships their own builds and since they often are way behind Iwas tired of getting so many mails for old bugsthat were fixed half a year ago. So I decided to enable bug reports by mail only for my own builds and only for the newest one or two versions.

s-fritsch commented 3 years ago

If I install 1.96.3 fresh, it crashes again. If I install 1.96.1 or 1.96.2 fresh from f-droid it works. If I then upgrade to 1.96.3, it keeps working. Maybe something with creating the DB on new installs is broken in 1.96.3?

wommel commented 3 years ago

Same issue with new install 1.96.3 and 1.96.4 from Google.

fschlich commented 3 years ago

Selecting "reset database" from Settings does not help with this issue.

However, I can confirm that a fresh install of 1.96.2 from FDroid makes this issue go away, and it stays absent after upgrading to 1.96.3.

Subsequently uninstalling 1.96.3 from FDroid and then installing 1.96.4 from Play Store brings it back though. I notice that finishing the installation takes a long time. At that point, logcat has

05-13 17:13:52.288  1517  1937 V BackupManagerService: restoreAtInstall pkg=org.ttrssreader token=4 restoreSet=38135cb7ee800e43
nilsbraden commented 3 years ago

Release is due tomorrow, hope this fixes it.