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

[BUG] Can't send notifications - Cannot get the value of a token type 'Number' as a string. #255

Open
swiftbird07 opened this issue Jun 10, 2024 · 0 comments

Comments

@swiftbird07
Copy link

I’m experiencing an issue with sending notifications. While “SessionStart” notifications work as expected, other notification types fail to send. The problem occurs when Jellyfin attempts to send a notification to N8N using a generic destination.

Environment:

•	Jellyfin Version: 10.8.13
•	Deployment: Docker container
•	Plugin: Installed via Plugin Repo
•	Notification Destination: Generic (to N8N)
2024-06-10 22:18:51.238 +00:00] [INF] [24] Emby.Server.Implementations.ScheduledTasks.TaskManager: "IntervalTrigger" fired for task: "Webhook Item Added Notifier"
[2024-06-10 22:18:51.238 +00:00] [INF] [24] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queuing task "ItemAddedScheduledTask"
[2024-06-10 22:18:51.238 +00:00] [INF] [48] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Webhook Item Added Notifier"
[2024-06-10 22:18:51.238 +00:00] [INF] [48] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
[2024-06-10 22:18:51.239 +00:00] [INF] [48] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks
[2024-06-10 22:18:51.468 +00:00] [ERR] [11] Jellyfin.Plugin.Webhook.WebhookSender: Unable to send notification
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.Dictionary`2[System.String,System.String]. Path: $.RunTimeTicks | LineNumber: 0 | BytePositionInLine: 945.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'Number' as a string.
   at System.Text.Json.Utf8JsonReader.GetString()
   at System.Text.Json.Serialization.JsonDictionaryConverter`3.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TDictionary& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Jellyfin.Plugin.Webhook.Destinations.GenericForm.GenericFormClient.SendAsync(GenericFormOption option, Dictionary`2 data)
   at Jellyfin.Plugin.Webhook.WebhookSender.SendNotification[T](IWebhookClient`1 webhookClient, T option, Dictionary`2 itemData, Type itemType)

Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant