-
-
Notifications
You must be signed in to change notification settings - Fork 888
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
[Bug]: couldnt_find_object remote post #4526
Comments
Are you authenticated to lemmy.world when making that request? |
Yes |
You need to fetch using the fedilink which is https://slrpnk.net/post/7531569 |
@Nutomic Unfortunately I don't have the fedilink in this scenario. I am adding deep linking to Voyager, so a user taps the share button in a browser for an arbitrary post, and Voyager gets the URL that the browser shares from the browser share sheet - nothing else. The current workaround I am using for voyager is to parse the URL with regex, extract the post ID, and then make a request for the post on the instance. Then I get the However this is not ideal because:
Hopefully that helps explain my roadblocks, let me know if I can clarify anything else. |
Actually the latest Lemmy version includes a feature so that the link generates a redirect to the proper fedilink. For some reason its not working on lemmy.world, but you can try on lemmy.ml:
I hope this helps you, and lemmy.world admins can probably fix it on their instance somehow. If it doesnt help I need some more details what you want to do exactly, like an issue link in your repo. |
@Nutomic I looked a bit more, and I think this problem only arises if you try to Given instance
Some concrete examples: For the following URL https://lemmy.ml/post/13045952 (fedilink = https://lemmy.ca/post/17208090)
For the following URL https://lemmy.world/post/12992114 (fedilink = https://slrpnk.net/post/7531569)
Note: It is important that the URL attempted to resolve is remote. Resolving the fedilink on its own instance works. Example: TLDR Attempting to resolve a remote post on its own instance fails. |
Right, in case of a local url it will search directly in the database Why dont you use my previous suggestion and follow the redirect instead? Ie do |
Hey, sorry for the delay!
The main goal for me is to avoid connecting to arbitrary servers for user privacy reasons. While your suggestion may work great for servers/native clients, when doing your suggestion on the web, web clients are forced to follow the 308 response code and make another request at the destination (fedilink) server. Unfortunately it is impossible for web clients to abort following redirects and read the So your suggestion does technically work for the web (client will follow redirects and then you can get the final It is also fragile for web clients since they must follow redirect: the fedilink server must be up and running, configured properly (allow CORS). (I found out that lemmy.world CORS is misconfigured for this request, so I will need to follow up with them. Its possible that other instances are misconfigured as well, so this request can be a bit fragile on web clients.) |
Requirements
Summary
When trying to call resolve_object from lemmy.world with the following URL:
https://lemmy.world/post/12992114
I get
{"error":"couldnt_find_object"}
Steps to Reproduce
I thought this would be resolved by #4073, but maybe that addresses something else?
Technical Details
None
Version
0.19.3
Lemmy Instance URL
lemmy.world
The text was updated successfully, but these errors were encountered: