[GH-ISSUE #60] [Bug]: System.ArgumentException: Guid can't be empty (Parameter 'id') #44

Closed
opened 2026-03-23 20:35:19 +00:00 by mirror · 8 comments
Owner

Originally created by @Jurrer on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-jf-plugin/issues/60

Originally assigned to: @DarkFighterLuke on GitHub.

I've read the documentation

  • I'm running the latest version of tubearchivist-jf-plugin.
  • I'm running the latest version of TubeArchivist.
  • I have read the how to open an issue guide, particularly the bug report section.
  • I have searched for both closed and open already existing issues about the problem I am reporting.

Operating System

Docker

Your Bug Report

Describe the bug

When playing any movie outside TubeArchivist library, Jellyfin container exits with an error
System.ArgumentException: Guid can't be empty (Parameter 'id')

Issue was introduced in the latest release exactly here.

I was able to fix it by reverting these two lines back.
Not sure what is the impact of my fix, but at least Jellyfin container is not crashing when playing movies.

Steps To Reproduce

  • Fresh jellyfin docker install
  • Fresh TubeArchivist docker install
  • Add library with TA media + add a library with some movies
  • TA media plays fine
  • Movie starts playing, but the Jellyfin container is in a crashloop until movie stops playing
  • Error below

Expected behavior

Relevant Jellyfin log output

[2025-09-28 23:26:12.604] [FTL] [41] Main: Unhandled Exception
System.ArgumentException: Guid can't be empty (Parameter 'id')
   at Emby.Server.Implementations.Library.LibraryManager.GetItemById(Guid id)
   at Jellyfin.Plugin.TubeArchivistMetadata.Plugin.OnPlaybackProgress(Object sender, PlaybackProgressEventArgs eventArgs)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Anything else?

No response

Originally created by @Jurrer on GitHub (Sep 29, 2025). Original GitHub issue: https://github.com/tubearchivist/tubearchivist-jf-plugin/issues/60 Originally assigned to: @DarkFighterLuke on GitHub. ### I've read the documentation - [x] I'm running the latest version of tubearchivist-jf-plugin. - [x] I'm running the latest version of TubeArchivist. - [x] I have read the [how to open an issue](https://github.com/tubearchivist/tubearchivist/blob/master/CONTRIBUTING.md#how-to-open-an-issue) guide, particularly the [bug report](https://github.com/tubearchivist/tubearchivist/blob/master/CONTRIBUTING.md#bug-report) section. - [x] I have searched for both closed and open already existing issues about the problem I am reporting. ### Operating System Docker ### Your Bug Report ## Describe the bug When playing any movie outside TubeArchivist library, Jellyfin container exits with an error System.ArgumentException: Guid can't be empty (Parameter 'id') Issue was introduced in the latest release exactly [here](https://github.com/tubearchivist/tubearchivist-jf-plugin/compare/v1.3.6...v1.3.7#diff-4c1026650550da3ffd1fe5f3f0df3f69edaac2b6a314c2b9b379b0fe3d20a768R178-R179). I was able to fix it by reverting these two lines back. Not sure what is the impact of my fix, but at least Jellyfin container is not crashing when playing movies. ## Steps To Reproduce - Fresh jellyfin docker install - Fresh TubeArchivist docker install - Add library with TA media + add a library with some movies - TA media plays fine - Movie starts playing, but the Jellyfin container is in a crashloop until movie stops playing - Error below ## Expected behavior - ### Relevant Jellyfin log output ```shell [2025-09-28 23:26:12.604] [FTL] [41] Main: Unhandled Exception System.ArgumentException: Guid can't be empty (Parameter 'id') at Emby.Server.Implementations.Library.LibraryManager.GetItemById(Guid id) at Jellyfin.Plugin.TubeArchivistMetadata.Plugin.OnPlaybackProgress(Object sender, PlaybackProgressEventArgs eventArgs) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() ``` ### Anything else? _No response_
Author
Owner

@mattkduran commented on GitHub (Oct 17, 2025):

Throwing my two cents in on this, can confirm that this issue occurs with 1.3.7.0 -- the only workaround is to disable the plugin before attempting to watch a movie.

While this section is definitely where the issue arises from from the stack trace, the core problem is further up.

It doesn't look like we do any type checking for the objects when we trigger OnPlaybackProgress or OnWatchedStatusChange. The plugin just assumes that if anything is changing status for those two, then they should be synced back to TubeArchivist. I think this is probably failing for Movies but not for tv shows or music is because both tv shows and music have a similar hiearchy when it comes to directory structure.

Youtube or TV show library:
Collection → Series → Season → Episode

Movies:
Collection → Movie

Music:
Collection → Artist → Album → Track

So what we should do is implement a type check to validate the following:

  • Is the item an episode? (rules out movies and music)
  • Does it have a GUID attached to it? (further limits this to only episodes)
  • Which library is this in?

Honestly, even the last one would probably solve this -- if it's only from the library associated with the plugin, then trigger the sync methods

<!-- gh-comment-id:3416409142 --> @mattkduran commented on GitHub (Oct 17, 2025): Throwing my two cents in on this, can confirm that this issue occurs with `1.3.7.0` -- the only workaround is to disable the plugin before attempting to watch a movie. While [this section](https://github.com/tubearchivist/tubearchivist-jf-plugin/compare/v1.3.6...v1.3.7#diff-4c1026650550da3ffd1fe5f3f0df3f69edaac2b6a314c2b9b379b0fe3d20a768R178-R179) is definitely where the issue arises from from the stack trace, the core problem is further up. It doesn't look like we do any type checking for the objects when we trigger `OnPlaybackProgress` or `OnWatchedStatusChange`. The plugin just assumes that if anything is changing status for those two, then they should be synced back to TubeArchivist. I think this is probably failing for Movies but not for tv shows or music is because both tv shows and music have a similar hiearchy when it comes to directory structure. ``` Youtube or TV show library: Collection → Series → Season → Episode Movies: Collection → Movie Music: Collection → Artist → Album → Track ``` So what we should do is implement a type check to validate the following: - Is the item an episode? (rules out movies and music) - Does it have a GUID attached to it? (further limits this to only episodes) - Which library is this in? Honestly, even the last one would probably solve this -- if it's only from the library associated with the plugin, then trigger the sync methods
Author
Owner

@mattkduran commented on GitHub (Oct 17, 2025):

@Jurrer I made a PR here that should fix this -- I'll probably also introduce some additional type checks in another PR to enhance this further

https://github.com/tubearchivist/tubearchivist-jf-plugin/pull/62

<!-- gh-comment-id:3417402618 --> @mattkduran commented on GitHub (Oct 17, 2025): @Jurrer I made a PR here that should fix this -- I'll probably also introduce some additional type checks in another PR to enhance this further https://github.com/tubearchivist/tubearchivist-jf-plugin/pull/62
Author
Owner

@Jurrer commented on GitHub (Oct 17, 2025):

@mattkduran
Yeah, I agree with your suggestion and PR, BUT
Shouldn't we first and foremost verify that TA plugin is only working with the library that we defined in plugin config?

Additional type checks should only be needed if someone created wrong type of library in Jellyfin imo.

PS. Thanks for providing a fix for the others

<!-- gh-comment-id:3417414922 --> @Jurrer commented on GitHub (Oct 17, 2025): @mattkduran Yeah, I agree with your suggestion and PR, BUT Shouldn't we first and foremost verify that TA plugin is only working with the library that we defined in plugin config? Additional type checks should only be needed if someone created wrong type of library in Jellyfin imo. PS. Thanks for providing a fix for the others
Author
Owner

@mattkduran commented on GitHub (Oct 17, 2025):

@Jurrer Yup, agreed! This first PR is just to get a fix -- figured it'd be faster to have a minimal fix on there.

This PR limits the scope of the playback method to only the tubearchivist library:
https://github.com/tubearchivist/tubearchivist-jf-plugin/pull/63

Figured it better to keep them separate since one builds on top of the other

<!-- gh-comment-id:3417419740 --> @mattkduran commented on GitHub (Oct 17, 2025): @Jurrer Yup, agreed! This first PR is just to get a fix -- figured it'd be faster to have a minimal fix on there. _This_ PR limits the scope of the playback method to only the tubearchivist library: https://github.com/tubearchivist/tubearchivist-jf-plugin/pull/63 Figured it better to keep them separate since one builds on top of the other
Author
Owner

@DarkFighterLuke commented on GitHub (Oct 21, 2025):

Hi, please check if the problem has been solved with the latest major release (v1.4.0).

<!-- gh-comment-id:3429683939 --> @DarkFighterLuke commented on GitHub (Oct 21, 2025): Hi, please check if the problem has been solved with the latest major release (v1.4.0).
Author
Owner

@bashman83 commented on GitHub (Oct 22, 2025):

I spoke a bit soon. Clearly didn't have everything ticked correctly. As it's now doing it in both jellyfin instances I'm running

<!-- gh-comment-id:3430790952 --> @bashman83 commented on GitHub (Oct 22, 2025): I spoke a bit soon. Clearly didn't have everything ticked correctly. As it's now doing it in both jellyfin instances I'm running
Author
Owner

@bashman83 commented on GitHub (Oct 23, 2025):

I spoke a bit soon. Clearly didn't have everything ticked correctly. As it's now doing it in both jellyfin instances I'm running

Good news @DarkFighterLuke it's working perfectly normal for me with the new plugin. Blame operator error.
On another note, while I've gotten v1.4.1 installed, I was unable to download this through the repository. Not sure if there is an issue or not, but thought I'd let you know.

<!-- gh-comment-id:3438989473 --> @bashman83 commented on GitHub (Oct 23, 2025): > I spoke a bit soon. Clearly didn't have everything ticked correctly. As it's now doing it in both jellyfin instances I'm running Good news @DarkFighterLuke it's working perfectly normal for me with the new plugin. Blame operator error. On another note, while I've gotten v1.4.1 installed, I was unable to download this through the repository. Not sure if there is an issue or not, but thought I'd let you know.
Author
Owner

@DarkFighterLuke commented on GitHub (Oct 23, 2025):

On another note, while I've gotten v1.4.1 installed, I was unable to download this through the repository. Not sure if there is an issue or not, but thought I'd let you know.

Maybe it was just the delay that GitHub has in updating raw files (in this case the raw manifest.json that is used by Jellyfin repository).

I'm really happy that it works now 💯

<!-- gh-comment-id:3439027476 --> @DarkFighterLuke commented on GitHub (Oct 23, 2025): > On another note, while I've gotten v1.4.1 installed, I was unable to download this through the repository. Not sure if there is an issue or not, but thought I'd let you know. Maybe it was just the delay that GitHub has in updating raw files (in this case the raw manifest.json that is used by Jellyfin repository). I'm really happy that it works now 💯
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tubearchivist/archived-tubearchivist-jf-plugin#44
No description provided.