Skip to content
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

App crashes upon trying to view edit history #3743

Closed
1 task done
nehemiagurl opened this issue Jun 12, 2023 · 8 comments · Fixed by #3747
Closed
1 task done

App crashes upon trying to view edit history #3743

nehemiagurl opened this issue Jun 12, 2023 · 8 comments · Fixed by #3747
Assignees

Comments

@nehemiagurl
Copy link

Trying to view the edit history of this post results in a crash.
Edit history is available when viewing on OP instance, but not when viewing remotely (see screenshot) which I assume is the source of the crash.
Screenshot_20230612-190544_Firefox


  • Tusky Version: 22.0

  • Android Version: 12

  • Android Device: Samsung Galaxy A12

  • Mastodon instance (if applicable): spore.social (posted), multiple (viewing)

  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.

@nikclayton
Copy link
Contributor

How are you getting to the post to view it remotely? If I search for it in Tusky and then get the edit history it works. It's fetching the edit history via mastodon.social at that point, so I assume mastodon.social has a copy of it by now (as the API requests to get the history use https://mastodon.social/api/v1/statuses/110522895377418614/history which is not the same status ID as in the link).

@nehemiagurl
Copy link
Author

So it seems the crash only happens on certain instances. I managed to reproduce on 433.world and tooot.im but not on toki.social where there was no crash.

In the case of the crashes - on tooot.im it simply appeared in my timeline and crashed upon trying to view the edit history (from that point on it crashes consistently regardless of how I reach it). I then opened the same post on 433.world using the "open as" button, where it again crashed upon trying to view history (and now crashes consistently regardless of how I reach it).
On toki.social I opened it via the search tool and not the "open with" button, and as mentioned there was no crash.

I do see boosts for the post from all three instances, which would suggest it was cached in all three before me opening it, but it is possible in toki the post was boosted before the edits and in the others not, or vice versa.

@nikclayton
Copy link
Contributor

To make sure I have this straight:

  1. You have different Mastodon accounts on at least tooot.im, 433.world, and toki.social
  2. You can sign in to all of those accounts in Tusky
  3. If, from one of those accounts, you go to the search interface, and search for the post by pasting in "https://spore.social/@tamarasiuda/110522895217050705", Tusky finds the post
  4. The post always shows as being edited
  5. On tooot.im and 443.world if you click the edit date/time on the post Tusky crashes. On toki.social if you click the edit date/time on the post it shows you the edits as expected

Is that right? If not, please can you write down a complete reproduction recipe.

I do see some crashes in the Play store when edits are being viewed. The crash indicates that when Tusky makes the API call to get back the list of edits the list has no entries.

This is one of those "can't happen if everyone is behaving as documented" bugs, as the only way to get to that code path is if the post definitely has edits, and the Mastodon API documentation for that API call (https://docs.joinmastodon.org/methods/statuses/#history) says:

Get all known versions of a status, including the initial and current states.

So at the very least this call should always return a list with 2 entries (1 is just about arguable if you called this on a status with no edits, but Tusky doesn't do that).

It should never return an empty list.

So I think this is a Mastodon bug (or a bug in a server that's implemented the Mastodon API badly). So I want to try and track down the exact bug so I can both work around it in Tusky and report it to the server authors.

@nikclayton nikclayton self-assigned this Jun 12, 2023
@ghost
Copy link

ghost commented Jun 12, 2023

Is that right?

100% correct.

@nikclayton
Copy link
Contributor

OK. 443.world appears to be down when I go to it, and tooot.im registration is by invitation only. Can you send me an invite ([email protected]) and I'll create an account there and see if I can reproduce. Thanks.

@nehemiagurl
Copy link
Author

Sent. I can also see if I can get you an invite to 433.world if that's needed.

@nikclayton
Copy link
Contributor

Thanks. I can repro this with a tooot.im account, looking in to what's going on now.

@nikclayton
Copy link
Contributor

OK, so this is mastodon/mastodon#25398, which I've just filed. I'll have a think about the best way to work around it.

nikclayton added a commit that referenced this issue Jun 15, 2023
This can happen if the edit history has not been propogated to the user's server.

If the edit history is missing then show an error with a link to the specifc Mastodon issue.

Fixes #3743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants