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

FindReleasesAsync Problem #1

Closed
RolandoKRC opened this issue Apr 4, 2020 · 5 comments
Closed

FindReleasesAsync Problem #1

RolandoKRC opened this issue Apr 4, 2020 · 5 comments
Assignees

Comments

@RolandoKRC
Copy link

Good morning, I would like to report a problem that I am having to see if you can guide me and see how to solve it.
When I execute the search instruction:

var search = new MetaBrainz.MusicBrainz.Query ("Test", "1.0", "asd");
var songs = await search.FindReleaseGroupsAsync ("arid: 90270118-8ed0-4446-bf97-8a09b3f9e8f3");

I get results without problem, but in reality what I require is the search for Releases and when I execute it I get the following error:

var search = new MetaBrainz.MusicBrainz.Query ("Test", "1.0", "asd");
var songs2 = await search.FindReleasesAsync ("arid: 90270118-8ed0-4446-bf97-8a09b3f9e8f3")

System.Text.Json.JsonException
  HResult = 0x80131500
  Message = The JSON value could not be converted to System.String. Path: $ .releases [4] .packaging | LineNumber: 0 | BytePositionInLine: 3653.
  Origin = System.Text.Json
  Stack Tracking:
   in System.Text.Json.ThrowHelper.ReThrowWithPath (ReadStack & readStack, Utf8JsonReader & reader, Exception ex)
   in System.Text.Json.JsonSerializer.ReadCore (JsonSerializerOptions options, Utf8JsonReader & reader, ReadStack & readStack)
   in System.Text.Json.JsonSerializer.ReadCore (Type returnType, JsonSerializerOptions options, Utf8JsonReader & reader)
   in System.Text.Json.JsonSerializer.Deserialize (String json, Type returnType, JsonSerializerOptions options)
   in System.Text.Json.JsonSerializer.Deserialize [TValue] (String json, JsonSerializerOptions options)
   in MetaBrainz.Common.Json.JsonUtils.Deserialize [T] (String json, JsonSerializerOptions options)
   in MetaBrainz.MusicBrainz.Query.Deserialize [T] (String json)
   in MetaBrainz.MusicBrainz.Objects.Searches.SearchResults1.Deserialize (String json)    in MetaBrainz.MusicBrainz.Objects.PagedQueryResults3. d__14.MoveNext ()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult ()
   in Ffmpg.Form1. <button2_Click> d__4.MoveNext () in C: \ Users \ lenovo \ Documents \ Visual Studio 2017 \ Projects \ Testing \ Ffmpg \ Form1.cs: line 75

Internal exception 1:
InvalidOperationException: Cannot get the value of a token type 'StartObject' as a string.

I would appreciate any help you can give me. Thank you.

@Zastai
Copy link
Owner

Zastai commented Apr 4, 2020

Looks like release search is returning unexpected json content. I’ll have a look when I get back home.

@Zastai Zastai self-assigned this Apr 4, 2020
@Zastai
Copy link
Owner

Zastai commented Apr 4, 2020

Looks like this is caused by SEARCH-579.

The lookup returns 2 fields on the release, "packaging" and "packaging-id"; the search returns a single "packaging" field, whose value is an object with two properties - "name" and "id".

I'll see what I can do, but this may remain unresolved until this bug is fixed on the MusicBrainz side.

@Zastai
Copy link
Owner

Zastai commented Apr 4, 2020

Oh, and as an aside: there should not be a blank after the arid:.
A search with arid: 90270118-8ed0-4446-bf97-8a09b3f9e8f3 returns 160 results (including several for other artists); one with arid:90270118-8ed0-4446-bf97-8a09b3f9e8f3 only 53.

@Zastai Zastai closed this as completed in 14087dd Apr 4, 2020
@Zastai
Copy link
Owner

Zastai commented Apr 4, 2020

I'm going to hold off on a full release, in case they fix the issue quickly on the server side.
In the meantime, you can either build from sources, or use the package from AppVeyor.

@RolandoKRC
Copy link
Author

Thank you very much for your prompt response and for the contribution, I will be attentive to your final solution.
Great work, great contribution, congratulations and thanks again.

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

2 participants