gotosocial
gotosocial copied to clipboard
[bug] Empty public timeline
Describe the bug with a clear and concise description of what the bug is.
The public timeline endpoint is returning an empty array :(
What's your GoToSocial Version?
v0.13.0-rc1
GoToSocial Arch
amd64
What happened?
The federated timeline was empty on the client. Went to the console and saw the request was returning 200 []
.
What you expected to happen?
Some posts to show up (at least mine?). I am federating with other instances.
How to reproduce it?
Maybe you can try to go to https://filipesm.eu and test it?
Anything else we need to know?
It was still happening on the previous version (v0.12).
Related, but closed: https://github.com/superseriousbusiness/gotosocial/issues/2163
Hmmmmm, bugger. Which client are you using? In the console, do you see any Link headers in the response?
@tsmethurst I'm using Phanpy. Yes the header gives back a Link to follow! Should I print the full response here?
For some reason this is solved! Ahah At least in my case. I will close it. If it happens again, I'll reopen :)
Well, I think it's not fixed fixed, it's just that now probably there are statuses available in your public timeline. It may recur again later. I think this is basically the same issue as https://github.com/superseriousbusiness/gotosocial/issues/2273
Hmmm that seems plausible. I will try to post logs here next time it happens :)
Yeah, I think it's very likely the same root issue we've been having on alpha.polymaths.social. I thought Phanpy was one of the clients handling it correctly but don't actually use it myself so that may have been incorrectly reported to me.
But I don't understand how this is client reporting because the array came empty, when it shouldn't have
So what's happening (assuming I'm understanding everything correctly, which is not always the case 😅) is that that page of the timeline is empty (since all posts that would've been on the page were filtered out by some condition), but the link
headers tell clients where the next page is, which does have content (probably). Some clients will properly realize that and continue to the next page.
The issue is that Mastodon apparently doesn't return blank pages like GtS does, so clients often ignore the link
header (which is the technically-correct documented way of paging) and instead just page based on what posts have been loaded, in which case a blank page gets interpreted as the end of the timeline.
I think I did that explanation correct. XD
Another relevant issue: https://github.com/superseriousbusiness/gotosocial/issues/2213
@benjaminbhollon that does make sense. But why would GtS return empty pages? Especially the first?
My understanding of the API is there's a single endpoint for public timelines, then a query parameter to filter that down to specifically the local timeline, so perhaps if there's a page where none of the posts were the local timeline?
I'm not closely acquainted enough with the codebase to know for sure.
In which case it boils down to the issue I reported that tobi linked, where to fix the common treatment of the API by clients we'd do some kind of mechanism to eliminate empty pages.
That's correct @benjaminbhollon
Going to close this now since we mitigated it here: https://github.com/superseriousbusiness/gotosocial/pull/2784
At some point we'll switch the federated + local timeline code to use internal/timeline
anyways, which will entirely avoid the codepath that was causing this issue.