purifetchi / Toki

A C# Fediverse server.
GNU Affero General Public License v3.0
47 stars 1 forks source link

Toki fails to parse activities related to PeerTube videos. #24

Closed purifetchi closed 2 months ago

purifetchi commented 2 months ago

Receiving a Like or an Announce for a PeerTube Video object from any other instance results in the inbox job failing, because we don't support deserializing Video objects yet.

We should probably try to create a Note out of a Video, that just contains the title and the link to watch it.

System.Text.Json.JsonException: Unknown definition for ASObject parsing!
   at Toki.ActivityStreams.Serialization.ASObjectConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in /opt/toki/Toki/Toki.ActivityStreams/Serialization/ASObjectConverter.cs:line 66
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at Toki.ActivityPub.Resolvers.ActivityPubResolver.Fetch[TAsObject](ASObject obj)
   at Toki.ActivityPub.Posts.PostManagementService.FetchFromRemoteId(String remoteId, Int32 threadDepth) in /opt/toki/Toki/Toki.ActivityPub/Posts/PostManagementService.cs:line 639
   at Toki.ActivityPub.Jobs.Federation.InboxHandlerJob.HandleLike(ASLike like, User actor) in /opt/toki/Toki/Toki.ActivityPub/Jobs/Federation/InboxHandlerJob.cs:line 323
   at Toki.ActivityPub.Jobs.Federation.InboxHandlerJob.HandleActivity(String objectJson) in /opt/toki/Toki/Toki.ActivityPub/Jobs/Federation/InboxHandlerJob.cs:line 60
   at InvokeStub_TaskAwaiter.GetResult(Object, Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
purifetchi commented 2 months ago

closed in 890f6d1c911cb0a5324e584b3a38134713dec096