tuskyapp / Tusky

An Android client for the microblogging server Mastodon
https://tusky.app
GNU General Public License v3.0
2.42k stars 388 forks source link

Link lookup ends up with wrong link #2804

Closed zell-mbc closed 1 year ago

zell-mbc commented 1 year ago

I have been using Tusky for a good week now and noticed that every now and then clicking on links in posts take me to the wrong internet address.

E.g.:

  1. Click a link in a post, which should go to www.patrion.com/…
  2. Land on the Mastodon profile of the European Commision? A bit like chat roulette I guess :-)

Here's a link to a raw video: https://cloud.zell-mbc.com/s/QbQ2xFzY2TajKgZ Most links work, some don't.

Edit: Forgot to mention that when I click that same link from a different client (browser, FediLab, etc.) the correct page opens.


connyduck commented 1 year ago

Is the account of the European commission involved or mentioned in this thread? Does it happen only in thread view or also in other places?

connyduck commented 1 year ago

Also, which instance are you on?

zell-mbc commented 1 year ago

Is the account of the European commission involved or mentioned in this thread? Does it happen only in thread view or also in other places?

Need to lookup this thread again to confirm, but would be surprised because it's been about a completely different subject.

Does it happen only in thread view or also in other places?

Don't know either, will test next time this happens

Also, which instance are you on?

My personal instance, Pleroma based

I have now installed Tusky on my mobile phone as well, so I can compare when this happens next time.

connyduck commented 1 year ago

What happens if you throw the link into the search of your instance? Thats what Tusky is doing do determine if it is a fedi link or not

zell-mbc commented 1 year ago

What happens if you throw the link into the search of your instance?

You mean the search at the top of the Tusky screen, the magnifier? If so, nothing is found, which is correct (?) because it's a URL and not a post/account/hashtag image

Does it happen only in thread view or also in other places?

It's happening on the main timeline as well as the thread view

Is the account of the European commission involved or mentioned in this thread?

No

Tusky on my mobile phone

Shows the same behaviour OnePlus 8 Pro, Android 12

And as far as my instance as potential reason for the failure is concerned, I am running Fedilab on that device as well, and there the link in that post works fine.

connyduck commented 1 year ago

Yes the post in question and the link are fine, that is definitely not the problem. I can think of two things that could cause such behavior 1) search returns wrong results when looking up the link 2) View recycling is wrongly implemented and the click listener of another link is invoked

But it looks like it is neither of those 🤔

zell-mbc commented 1 year ago

I'll "click a bit more" going forward, maybe I can identify a pattern. I know I had another post with the same issue but can't remember where this one took me to...

zell-mbc commented 1 year ago

I got another one, same effect. I klick on a link and end up with someone's profile. I can provide a video if it helps. https://cloud.zell-mbc.com/s/fBkTnfnXDnwJaPM

mothdotmonster commented 1 year ago

This happens to me frequently as well (server runs Akkoma.)

It seems to usually go to a link that has similar words in it?

An example of the error happening

connyduck commented 1 year ago

o_0 Which post, which server is this?

mothdotmonster commented 1 year ago

o_0 Which post, which server is this?

I posted a link to an archived version of someone's blog post which was 404'ing (https://archive.is/x9nzZ) onto my sever (moth.zone) and Tusky decided to send me to @anarchist_archive@kolektiva.social (https://kolektiva.social/@anarchist_archive) for some reason. Aside from both having the word "archive" there's no connection to either account. No clue why it happens, but it happens with a lot of other URLs too.

connyduck commented 1 year ago

Ok, so it is case 1) from above. Search on some non-Mastodon servers returns accounts when searching for urls and Tusky opens the first one. I can reproduce it with one of my test accounts. The solution is to check if the url of the found accounts matches the search before opening it. The relevant code is on BottomSheetActivity if someone wants to fix it.