[Issue]: Error in "MusicBrainz" #4615

Closed
opened 2026-02-07 01:00:37 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @jagiella on GitHub (Feb 9, 2023).

Please describe your bug

Since a few weeks scanning the music library is slow and frequently leads to crash and restart of the jellyfin server.

Jellyfin Version

Other

if other:

10.9.0

Environment

- OS: armbian 
- Virtualization: deb-package from unstable repository
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- Plugins: default plugins + Trakt
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

[2023-02-09 00:08:58.315 +01:00] [ERR] Error in "MusicBrainz"
System.UriFormatException: Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at System.UriBuilder.get_Uri()
   at MetaBrainz.MusicBrainz.Query.BuildUri(String path, String extra)
   at MetaBrainz.MusicBrainz.Query.<>c__DisplayClass706_0.<PerformRequestAsync>b__0()
   at MetaBrainz.MusicBrainz.Query.ApplyDelayAsync[T](Func`1 request, CancellationToken cancellationToken)
   at MetaBrainz.MusicBrainz.Query.PerformRequestAsync(String entity, String id, String extra, CancellationToken cancellationToken)
   at MetaBrainz.MusicBrainz.Objects.PagedQueryResults`3.PerformRequestAsync(CancellationToken cancellationToken)
   at MetaBrainz.MusicBrainz.Objects.PagedQueryResults`3.NextAsync(CancellationToken cancellationToken)
   at MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzArtistProvider.GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzArtistProvider.GetMetadata(ArtistInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @jagiella on GitHub (Feb 9, 2023). ### Please describe your bug Since a few weeks scanning the music library is slow and frequently leads to crash and restart of the jellyfin server. ### Jellyfin Version Other ### if other: 10.9.0 ### Environment ```markdown - OS: armbian - Virtualization: deb-package from unstable repository - Clients: - Browser: - FFmpeg Version: - Playback Method: - Hardware Acceleration: - Plugins: default plugins + Trakt - Reverse Proxy: - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell [2023-02-09 00:08:58.315 +01:00] [ERR] Error in "MusicBrainz" System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions) at System.Uri..ctor(String uriString) at System.UriBuilder.get_Uri() at MetaBrainz.MusicBrainz.Query.BuildUri(String path, String extra) at MetaBrainz.MusicBrainz.Query.<>c__DisplayClass706_0.<PerformRequestAsync>b__0() at MetaBrainz.MusicBrainz.Query.ApplyDelayAsync[T](Func`1 request, CancellationToken cancellationToken) at MetaBrainz.MusicBrainz.Query.PerformRequestAsync(String entity, String id, String extra, CancellationToken cancellationToken) at MetaBrainz.MusicBrainz.Objects.PagedQueryResults`3.PerformRequestAsync(CancellationToken cancellationToken) at MetaBrainz.MusicBrainz.Objects.PagedQueryResults`3.NextAsync(CancellationToken cancellationToken) at MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzArtistProvider.GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken) at MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzArtistProvider.GetMetadata(ArtistInfo info, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken) ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bugstale labels 2026-02-07 01:00:37 +03:00
Author
Owner

@gnattu commented on GitHub (Feb 9, 2023):

I'm using personal fork from master as well and also encounters this issue.

I ended up with commenting out artist search in MusicBrainzArtistProvider as I do not need it and here's the patch:

Subject: [PATCH] force disable buggy musicbrainz
---
Index: MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs
--- a/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs	(revision 073a064a8e27b33ae794d8cce7cda20fcb39f376)
+++ b/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs	(revision f7e0ccdca6b25894ed2f2a3104ee385ad3df084e)
@@ -72,23 +72,23 @@
             return GetResultFromResponse(artistResult).SingleItemAsEnumerable();
         }

-        var artistSearchResults = await _musicBrainzQuery.FindArtistsAsync($"\"{searchInfo.Name}\"", null, null, false, cancellationToken)
-            .ConfigureAwait(false);
-        if (artistSearchResults.Results.Count > 0)
-        {
-            return GetResultsFromResponse(artistSearchResults.Results);
-        }
-
-        if (searchInfo.Name.HasDiacritics())
-        {
-            // Try again using the search with an accented characters query
-            var artistAccentsSearchResults = await _musicBrainzQuery.FindArtistsAsync($"artistaccent:\"{searchInfo.Name}\"", null, null, false, cancellationToken)
-                .ConfigureAwait(false);
-            if (artistAccentsSearchResults.Results.Count > 0)
-            {
-                return GetResultsFromResponse(artistAccentsSearchResults.Results);
-            }
-        }
+        // var artistSearchResults = await _musicBrainzQuery.FindArtistsAsync($"\"{searchInfo.Name}\"", null, null, false, cancellationToken)
+        //     .ConfigureAwait(false);
+        // if (artistSearchResults.Results.Count > 0)
+        // {
+        //     return GetResultsFromResponse(artistSearchResults.Results);
+        // }
+        //
+        // if (searchInfo.Name.HasDiacritics())
+        // {
+        //     // Try again using the search with an accented characters query
+        //     var artistAccentsSearchResults = await _musicBrainzQuery.FindArtistsAsync($"artistaccent:\"{searchInfo.Name}\"", null, null, false, cancellationToken)
+        //         .ConfigureAwait(false);
+        //     if (artistAccentsSearchResults.Results.Count > 0)
+        //     {
+        //         return GetResultsFromResponse(artistAccentsSearchResults.Results);
+        //     }
+        // }

         return Enumerable.Empty<RemoteSearchResult>();
     }

If you do rely on this then you need a proper fix.

@gnattu commented on GitHub (Feb 9, 2023): I'm using personal fork from master as well and also encounters this issue. I ended up with commenting out artist search in `MusicBrainzArtistProvider` as I do not need it and here's the patch: ```patch Subject: [PATCH] force disable buggy musicbrainz --- Index: MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs --- a/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs (revision 073a064a8e27b33ae794d8cce7cda20fcb39f376) +++ b/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs (revision f7e0ccdca6b25894ed2f2a3104ee385ad3df084e) @@ -72,23 +72,23 @@ return GetResultFromResponse(artistResult).SingleItemAsEnumerable(); } - var artistSearchResults = await _musicBrainzQuery.FindArtistsAsync($"\"{searchInfo.Name}\"", null, null, false, cancellationToken) - .ConfigureAwait(false); - if (artistSearchResults.Results.Count > 0) - { - return GetResultsFromResponse(artistSearchResults.Results); - } - - if (searchInfo.Name.HasDiacritics()) - { - // Try again using the search with an accented characters query - var artistAccentsSearchResults = await _musicBrainzQuery.FindArtistsAsync($"artistaccent:\"{searchInfo.Name}\"", null, null, false, cancellationToken) - .ConfigureAwait(false); - if (artistAccentsSearchResults.Results.Count > 0) - { - return GetResultsFromResponse(artistAccentsSearchResults.Results); - } - } + // var artistSearchResults = await _musicBrainzQuery.FindArtistsAsync($"\"{searchInfo.Name}\"", null, null, false, cancellationToken) + // .ConfigureAwait(false); + // if (artistSearchResults.Results.Count > 0) + // { + // return GetResultsFromResponse(artistSearchResults.Results); + // } + // + // if (searchInfo.Name.HasDiacritics()) + // { + // // Try again using the search with an accented characters query + // var artistAccentsSearchResults = await _musicBrainzQuery.FindArtistsAsync($"artistaccent:\"{searchInfo.Name}\"", null, null, false, cancellationToken) + // .ConfigureAwait(false); + // if (artistAccentsSearchResults.Results.Count > 0) + // { + // return GetResultsFromResponse(artistAccentsSearchResults.Results); + // } + // } return Enumerable.Empty<RemoteSearchResult>(); } ``` If you do rely on this then you need a proper fix.
Author
Owner

@Bond-009 commented on GitHub (Feb 9, 2023):

This should have been fixed by #8833 which commit are you running?

@Bond-009 commented on GitHub (Feb 9, 2023): This should have been fixed by #8833 which commit are you running?
Author
Owner

@gnattu commented on GitHub (Feb 9, 2023):

The last commit I rebased on was 421b062ca4

And my tree does contain #8833. My MusicBranz Config page has a url set to https://musicbrainz.org

@gnattu commented on GitHub (Feb 9, 2023): The last commit I rebased on was 421b062ca423c292d33490f0286925f2f1a0c033 And my tree does contain #8833. My MusicBranz Config page has a url set to `https://musicbrainz.org`
Author
Owner

@jagiella commented on GitHub (Feb 11, 2023):

$ apt list jellyfin --installed
jellyfin-ffmpeg5/unbekannt,now 5.1.2-7-kinetic arm64  [installiert]
jellyfin-server/unbekannt,now 20230204.1-unstable arm64  [Installiert,automatisch]
jellyfin-web/now 20220906.1-unstable all  [Installiert,lokal]
jellyfin/unbekannt,now 10.8.9-1 all  [installiert]

Repo:

$ cat /etc/apt/sources.list.d/jellyfin.list
deb [arch=arm64] https://repo.jellyfin.org/ubuntu kinetic main unstable
@jagiella commented on GitHub (Feb 11, 2023): ```bash $ apt list jellyfin --installed jellyfin-ffmpeg5/unbekannt,now 5.1.2-7-kinetic arm64 [installiert] jellyfin-server/unbekannt,now 20230204.1-unstable arm64 [Installiert,automatisch] jellyfin-web/now 20220906.1-unstable all [Installiert,lokal] jellyfin/unbekannt,now 10.8.9-1 all [installiert] ``` Repo: ```bash $ cat /etc/apt/sources.list.d/jellyfin.list deb [arch=arm64] https://repo.jellyfin.org/ubuntu kinetic main unstable ```
Author
Owner

@jellyfin-bot commented on GitHub (Jun 12, 2023):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@jellyfin-bot commented on GitHub (Jun 12, 2023): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4615