Library scan does not complete after creating then deleting a music library that has some albums. #6308

Open
opened 2026-02-07 03:26:10 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @alayham on GitHub (Sep 27, 2024).

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found here.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

Media scan times out after creating a music library, even if the library is deleted. there is no load on the server while the scan appears to run, and after the music library is deleted, the data should be the same as earlier and the scan usually takes seconds, but now it stops at 96.6%
If I leave it overnight, it appears to end or timeout, and if I start it again I get the same issue although no media files were changed. If I stop it in admin, I get the following in the logs

[INF] Attempting to cancel Scheduled Task "Scan Media Library"
[INF] Post-scan task cancelled: "ArtistsPostScanTask"
[INF] "Scan Media Library" Cancelled after 156 minute(s) and 17 seconds

This behavior seems either random or data related, if the media library contains ABBA albums, the scan succeeds. A single album by Celine Dion causes the issue

Reproduction steps

The issue appears to be either random or data related, but once I got it, It does not go away.
1- Create a music library and add a folder that contains music.
2- when the album are detected, run a full library scan

What is the current bug behavior?

The library scan stops and does not complete.

What is the expected correct behavior?

Even if the issue is caused by the data, User data should not be allowed to break library scans. Besides, removing the data does not fix the issue.

Jellyfin Server version

10.9.11+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

10.9.11

Specify the build version

10.9.11

Environment

- OS: Linux jellyfin 6.8.12-1-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-1 (2024-08-05T16:17Z) x86_64 GNU/Linux
- Linux Kernel:latest Proxmox kernel
- Virtualization: Debian lxc on Proxmon
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration: 
- GPU Model:
- Plugins: uninstalled many, but that had no effect on the issue.
- Reverse Proxy:
- Base URL:
- Networking:
- Storage: Data from an NFS mount.

Jellyfin logs

[INF] Attempting to cancel Scheduled Task "Scan Media Library"
[INF] Post-scan task cancelled: "ArtistsPostScanTask"
[INF] "Scan Media Library" Cancelled after 156 minute(s) and 17 seconds

FFmpeg logs

No response

Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @alayham on GitHub (Sep 27, 2024). ### This issue respects the following points: - [X] This is a **bug**, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found [here](https://jellyfin.org/contact/). - [X] This issue is **not** already reported on [GitHub](https://github.com/jellyfin/jellyfin/issues?q=is%3Aopen+is%3Aissue) _(I've searched it)_. - [X] I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue. - [X] I agree to follow Jellyfin's [Code of Conduct](https://jellyfin.org/docs/general/community-standards.html#code-of-conduct). - [X] This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one. ### Description of the bug Media scan times out after creating a music library, even if the library is deleted. there is no load on the server while the scan appears to run, and after the music library is deleted, the data should be the same as earlier and the scan usually takes seconds, but now it stops at 96.6% If I leave it overnight, it appears to end or timeout, and if I start it again I get the same issue although no media files were changed. If I stop it in admin, I get the following in the logs ``` [INF] Attempting to cancel Scheduled Task "Scan Media Library" [INF] Post-scan task cancelled: "ArtistsPostScanTask" [INF] "Scan Media Library" Cancelled after 156 minute(s) and 17 seconds ``` This behavior seems either random or data related, if the media library contains ABBA albums, the scan succeeds. A single album by Celine Dion causes the issue ### Reproduction steps The issue appears to be either random or data related, but once I got it, It does not go away. 1- Create a music library and add a folder that contains music. 2- when the album are detected, run a full library scan ### ### ### What is the current _bug_ behavior? The library scan stops and does not complete. ### What is the expected _correct_ behavior? Even if the issue is caused by the data, User data should not be allowed to break library scans. Besides, removing the data does not fix the issue. ### Jellyfin Server version 10.9.11+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number 10.9.11 ### Specify the build version 10.9.11 ### Environment ```markdown - OS: Linux jellyfin 6.8.12-1-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-1 (2024-08-05T16:17Z) x86_64 GNU/Linux - Linux Kernel:latest Proxmox kernel - Virtualization: Debian lxc on Proxmon - Clients: - Browser: - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: - Plugins: uninstalled many, but that had no effect on the issue. - Reverse Proxy: - Base URL: - Networking: - Storage: Data from an NFS mount. ``` ### Jellyfin logs ```shell [INF] Attempting to cancel Scheduled Task "Scan Media Library" [INF] Post-scan task cancelled: "ArtistsPostScanTask" [INF] "Scan Media Library" Cancelled after 156 minute(s) and 17 seconds ``` ### FFmpeg logs _No response_ ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 03:26:10 +03:00
Author
Owner

@Hello-World-Traveler commented on GitHub (Jan 6, 2025):

 [ERR] Error in "IMVDb"
System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.results[2].discogs_id | LineNumber: 35 | BytePositionInLine: 30.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'Null' as a number.
   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType)
   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.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& 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.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)
   --- 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.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.ImvdbClient.GetResponseAsync[T](String url, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.ImvdbClient.GetSearchResponseAsync(ArtistInfo searchInfo, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetMetadata(ArtistInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, Boolean replaceData, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
 Post-scan task cancelled: "ArtistsPostScanTask"
 "Scan Media Library" Cancelled after 20 minute(s) and 58 seconds

Not sure if it's the plugin IMVDb.

@Hello-World-Traveler commented on GitHub (Jan 6, 2025): ``` [ERR] Error in "IMVDb" System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.results[2].discogs_id | LineNumber: 35 | BytePositionInLine: 30. ---> System.InvalidOperationException: Cannot get the value of a token type 'Null' as a number. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType) 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.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& 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.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) --- 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.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken) at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.ImvdbClient.GetResponseAsync[T](String url, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.ImvdbClient.GetSearchResponseAsync(ArtistInfo searchInfo, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetMetadata(ArtistInfo info, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, Boolean replaceData, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken) ``` ``` Post-scan task cancelled: "ArtistsPostScanTask" "Scan Media Library" Cancelled after 20 minute(s) and 58 seconds ``` Not sure if it's the plugin IMVDb.
Author
Owner

@jellyfin-bot commented on GitHub (May 7, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (May 7, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@Hello-World-Traveler commented on GitHub (May 7, 2025):

Is this still a bug?

@Hello-World-Traveler commented on GitHub (May 7, 2025): Is this still a bug?
Author
Owner

@joswart commented on GitHub (Jun 11, 2025):

I am seeing the same issue on my system. Not using the IMVDb.

@joswart commented on GitHub (Jun 11, 2025): I am seeing the same issue on my system. Not using the IMVDb.
Author
Owner

@jellyfin-bot commented on GitHub (Oct 10, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Oct 10, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@jajaX commented on GitHub (Oct 25, 2025):

Hello,
This problem is still ongoing.
I'm seeing a lot of errors like this in my logos even though I uninstalled IMVDb !

Error in "IMVDb"
System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.results[11].discogs_id | LineNumber: 143 | BytePositionInLine: 30.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'Null' as a number.
   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType)
   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.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& 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.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, T& value, 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, T& value, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.ImvdbClient.GetResponseAsync[T](String url, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.ImvdbClient.GetSearchResponseAsync(ArtistInfo searchInfo, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken)
   at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetMetadata(ArtistInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, Boolean replaceData, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
@jajaX commented on GitHub (Oct 25, 2025): Hello, This problem is still ongoing. I'm seeing a lot of errors like this in my logos even though I uninstalled IMVDb ! ``` Error in "IMVDb" System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.results[11].discogs_id | LineNumber: 143 | BytePositionInLine: 30. ---> System.InvalidOperationException: Cannot get the value of a token type 'Null' as a number. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType) 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.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& 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.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, T& value, 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, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken) at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.ImvdbClient.GetResponseAsync[T](String url, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.ImvdbClient.GetSearchResponseAsync(ArtistInfo searchInfo, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken) at Jellyfin.Plugin.IMVDb.Providers.ImvdbArtistProvider.GetMetadata(ArtistInfo info, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, Boolean replaceData, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6308