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 fetch content from PeerTube #2689

Closed
Kradyz opened this issue Feb 1, 2023 · 2 comments
Closed

Unable to fetch content from PeerTube #2689

Kradyz opened this issue Feb 1, 2023 · 2 comments
Labels
area: federation support federation via activitypub bug Something isn't working

Comments

@Kradyz
Copy link
Contributor

Kradyz commented Feb 1, 2023

Issue Summary

Attempting to fetch videos from PeerTube fails.

Steps to Reproduce

  1. Try to fetch any youtube from peertube by pasting the Url to the search bar

Technical details

Here are the relevant logs:

lemmy_1           | 2023-02-01T16:28:10.079521Z ERROR lemmy_server::api_routes_websocket: Error during message handling couldnt_find_object: error decoding response body: expected `,` or `}` at line 1 column 3026
lemmy_1           |    0: lemmy_apub::objects::post::verify
lemmy_1           |              at crates/apub/src/objects/post.rs:132
lemmy_1           |    1: lemmy_apub::fetcher::search::verify
lemmy_1           |              at crates/apub/src/fetcher/search.rs:132
lemmy_1           |    2: lemmy_apub::fetcher::search::search_query_to_object_id
lemmy_1           |              at crates/apub/src/fetcher/search.rs:17
lemmy_1           |    3: lemmy_apub::api::resolve_object::perform
lemmy_1           |            with self=ResolveObject { q: "https://tilvids.com/w/gDWVaqerFypYu6y1XjdoM3", auth: Some(Sensitive) }
lemmy_1           |              at crates/apub/src/api/resolve_object.rs:21

@Kradyz Kradyz added the bug Something isn't working label Feb 1, 2023
@Nutomic Nutomic added the area: federation support federation via activitypub label Feb 3, 2023
@Nutomic
Copy link
Member

Nutomic commented Feb 3, 2023

Very strange, if you search the Peertube channel first (https://tilvids.com/video-channels/thelinuxexperiment_channel in this case), then the video can be fetched without problems.

@Kradyz
Copy link
Contributor Author

Kradyz commented Feb 3, 2023

Strange indeed. Another strange but potentially relevant behaviour:

Searching the peertube channel first and then searching for the video will fetch the video, unless the video has set as a "Language" some language that includes spaces.

For example, attempting to fetch this video will fail regardless: https://bolitoglossa.com/w/eswbeZtw3aD9VAwvpEpFiA

I have tested switching to other languages with and without spaces, and this failure occurs only when there is a space. I also confirmed that it is not because lemmy lacks a particular language in its list.

The error that appears after having fetched the channel for videos set to languages that include spaces is the following:

lemmy_1           | 2023-02-03T20:18:24.314852Z ERROR lemmy_server::api_routes_websocket: Error during message handling couldnt_find_object: Record not found
lemmy_1           |    0: lemmy_apub::objects::post::from_apub
lemmy_1           |              at crates/apub/src/objects/post.rs:165
lemmy_1           |    1: lemmy_apub::fetcher::search::from_apub
lemmy_1           |              at crates/apub/src/fetcher/search.rs:155
lemmy_1           |    2: lemmy_apub::fetcher::search::search_query_to_object_id
lemmy_1           |              at crates/apub/src/fetcher/search.rs:17
lemmy_1           |    3: lemmy_apub::api::resolve_object::perform
lemmy_1           |            with self=ResolveObject { q: "https://bolitoglossa.com/w/eswbeZtw3aD9VAwvpEpFiA", auth: Some(Sensitive) }
lemmy_1           |              at crates/apub/src/api/resolve_object.rs:21

The sensitivity of the resolve_object action to spaces in the language entry makes me suspect that this is related to the parsing of the response. I will see if I can find something more concrete.

EDIT: This language problem occurs because the languages with spaces are assigned to three letter language codes, instead of two. I found a language with a single-word name for which a three letter code is used: Kotava, 'avk'. This video has been set to Kotava as a language and can therefore not be fetched: https://bolitoglossa.com/w/6bjY6UtxbwBoDPV7hHUi2d

Nutomic added a commit that referenced this issue Feb 4, 2023
- Other platforms can support additional language tags. Treat those
as None instead of throwing error
- deserialize_skip_error was implemented incorrectly and failed on
array values (LemmyNet/activitypub-federation-rust@6d9682f)
Nutomic added a commit that referenced this issue Feb 20, 2023
- Other platforms can support additional language tags. Treat those
as None instead of throwing error
- deserialize_skip_error was implemented incorrectly and failed on
array values (LemmyNet/activitypub-federation-rust@6d9682f)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: federation support federation via activitypub bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants