-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regular crash with "Not implemented" toast, app nearly unuseable #525
Comments
Ok so just adding an if statement around |
For some reason I feel like I have fixed this before, but idk. Thank you for the detailed info, it really helps out a lot 😁 |
Describe the bug
When scrolling on my feed, the app sometimes encounters toots that it cannot parse. When it does, it just crashes with a toast that says "Not implemented". When this happens, I have no other choice but to wait a few days for the toot to go "out of sight".
As a comparison, Tusky doesn't crash, but deems the whole timeline unparseable and displays an error view in place of the whole timeline, that makes their app basically useless.
The crash is caused by a NPE here, where
s.createdAt
is actually null (see crash log below)moshidon/mastodon/src/main/java/org/joinmastodon/android/api/CacheController.java
Line 132 in 5427b21
This value is null because the
@RequiredField
annotation was commented out by upstream Megalodon, for some dubious reason I cannot understand, since the possibility of a null value is apparently not handledmoshidon/mastodon/src/main/java/org/joinmastodon/android/model/Status.java
Lines 48 to 49 in 5427b21
To reproduce
I have no idea how to reproduce it, it's probably specific to my instance. If you can somehow manually create a status object with a missing
createdAt
, it might work?Possible solution
A better solution (compared to crashing or treating the whole timeline as invalid) would be to ignore unparseable toot objects, or deal with missing fields in a more error-tolerant way, or even have a special "cannot parse toot" view in the timeline with a button to view the toot online.
Does this happen in the official app?
No, because they didn't comment out the
@RequiredField
annotation like Megalodon does. However, it doesn't handle the error properly either and the whole timeline isn't rendered at all (like Tusky).Version
Moshidon version: v2.3.0+fork.107.moshinda-play
Crash log
The text was updated successfully, but these errors were encountered: