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

"Unable to process URL" but I interact normally with the status (Takahe) #336

Open
astrojuanlu opened this issue Nov 24, 2023 · 5 comments
Labels
bug Something isn't working takahe

Comments

@astrojuanlu
Copy link

Describe the bug
A clear and concise description of what the bug is.

  • Which site: dev.phanpy.social AND phanpy.social
  • Which instance: Tested from social.juanlu.space and masto.ai (Mastodon) as well as takahe.mercadosocial.madrid (Takahe)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Search'
  2. Type https://takahe.mercadosocial.madrid/@triskelapps/posts/250830476567844560/
  3. Click 'Look up'
  4. See error

However,

  • I liked and boosted the update when it came just normally from Phanpy,
  • From my Mastodon official client I can "open it on Mastodon" normally

Expected behavior
The post behaves like any other.

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS Sonoma
  • Browser: Firefox
  • Version: 120.0

Additional context

@astrojuanlu
Copy link
Author

cc @AlbertoMoreta

@astrojuanlu
Copy link
Author

Also cc @andrewgodwin

@cheeaun cheeaun added bug Something isn't working takahe labels Nov 24, 2023
@andrewgodwin
Copy link

This is probably just Takahē not replicating the Mastodon search API behaviour entirely right - if I know what the mistake is, we can fix it on our side.

@cheeaun
Copy link
Owner

cheeaun commented Nov 25, 2023

I'm fixing this. Few notes:

  1. This may sound confusing but "Look up" doesn't actually "resolve" the URL. @astrojuanlu you could press 'Enter' instead of clicking "Look up" which will perform a search (with Mastodon search API on your logged-in instance, NOT remote) that resolves that URL to your current logged-in instance.
  2. What "Look up" actually does is extracting the ID from the URL and call the API straight to remote. It's faster but assumes that the remote instance have Mastodon API compatibility. To extract the ID, there's a bunch of regexes but Phanpy, as of now, didn't include one for Takahē post URLs.
  3. On my local machine, I've added a regex for Takahe post URL pattern, but calling it to remote seems to return 401 — so I guess it's either Takahē requires all (Mastodon-compat) API endpoints to have auth or instance admin sets it that way.
    Screenshot 2023-11-25 at 9 35 54 AM

@andrewgodwin I don't think there's a bug on Takahē side unless the 401 is unintentional.

On my side, I'll add extra (regex) handling for Takahē and an extra fallback in case the remote API returns 401 or some error 🙏

@astrojuanlu
Copy link
Author

This may sound confusing but "Look up" doesn't actually "resolve" the URL. @astrojuanlu you could press 'Enter' instead of clicking "Look up" which will perform a search (with Mastodon search API on your logged-in instance, NOT remote) that resolves that URL to your current logged-in instance.

Thanks, that was indeed a bit confusing. Wondering if the action could be displayed in the dropdown too for clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working takahe
Projects
None yet
Development

No branches or pull requests

3 participants