Tusky icon indicating copy to clipboard operation
Tusky copied to clipboard

searching a Pixelfed url enters an infinite loop

Open strk opened this issue 8 months ago • 4 comments

Detailed description

When I search https://pixelfed.social/xxx

while using a photofed.world account I get an infinite stream of duplicated results.

I had the impression I reported this already and that the issue was fixed but could not find that report.

Note I tried the same search from Phanpy and it worked fine.

Steps to reproduce the problem

It's described above

Debug information

Tusky 28.0

Device:

motorola moto g(10) Android version: 11 SDK version: 30

Account:

@[email protected] Version: 3.5.3 (compatible; Pixelfed 0.12.5)

strk avatar May 03 '25 21:05 strk

Yes we reported that to Pixelfed but the fix is not yet released https://github.com/pixelfed/pixelfed/issues/5875 https://github.com/pixelfed/pixelfed/blob/dev/CHANGELOG.md

connyduck avatar May 04 '25 05:05 connyduck

Yes we reported that to Pixelfed but the fix is not yet released pixelfed/pixelfed#5875 https://github.com/pixelfed/pixelfed/blob/dev/CHANGELOG.md

It also looks it can be prevented by client, because Phanpy doesn't have this problem

strk avatar May 04 '25 07:05 strk

Ok so I went down that rabbit hole, here is what I found:

When searching and requesting a number of results, Mastodon sometimes returns less than the requested amount. I have no idea why but it is easy to observe. https://mastodon.social/api/v2/search?q=test&type=statuses&resolve=true&limit=20&offset=0 requests 20 posts, but gets returned 17.

Now Tusky goes ahead and requests the next page with offset=17. Phanpy on the other hand requests the original page size as offset offset=20 (Tusky uses 20 pagesize and Phanpy 40, but that is not the point). I think Tusky is corrrect here, because when I compare the results, Tusky shows me more results, while Phanpy misses a few, right between pages. (cc @cheeaun that might be interesting for you) I also tried to check what the Mastodon.social frontend does, but seems like it will stop pagination altogether when the results are less than the requested limit. I will have to check that further.

Regarding the PIxelfed bug, it just so happens that Pixelfed v0.12.5 stops returning the same result at higher offsets, so Tusky sends offset=1 and gets the duplicate, Phanpy sends offset=40 and does not get it.

So Tusky works correctly with Mastodon search results and we will not change Tusky code just to workaround a Pixelfed quirk that already has a fix.

connyduck avatar May 04 '25 13:05 connyduck

https://github.com/mastodon/mastodon/issues/34601

connyduck avatar May 04 '25 13:05 connyduck