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

Fix JsonProperty mismatch #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Arimodu
Copy link

@Arimodu Arimodu commented Sep 17, 2023

Added [JsonIgnore] tag on obsolete curator model
Fixes the following error from PlaylistManager

[ERROR @ 13:23:17 | PlaylistManager] Failed to download Song 5069825E81402A20FC194D97D3D5A6091FBD9F81. Exception: Newtonsoft.Json.JsonSerializationException: A member with the name 'curator' already exists on 'BeatSaverSharp.Models.Beatmap'. Use the JsonPropertyAttribute to specify another name.
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.JsonPropertyCollection.AddProperty (Newtonsoft.Json.Serialization.JsonProperty property) [0x0011d] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateProperties (System.Type type, Newtonsoft.Json.MemberSerialization memberSerialization) [0x00072] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract (System.Type objectType) [0x0003a] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x0010f] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver.ResolveContract (System.Type type) [0x00036] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContract (System.Type type) [0x00000] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContractSafe (System.Type type) [0x0000b] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x0000e] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00054] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in <2676a2da6edc420e890ed28aa4572ee5>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at BeatSaverSharp.Http.UnityWebRequestHttpResponse+<ReadAsObjectAsync>d__12`1[T].MoveNext () [0x00096] in <cf2a91ab075842019025a9cc37ea5098>:0 
[ERROR @ 13:23:17 | PlaylistManager] --- End of stack trace from previous location where exception was thrown ---
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at BeatSaverSharp.BeatSaver+<FetchBeatmap>d__23.MoveNext () [0x00139] in <cf2a91ab075842019025a9cc37ea5098>:0 
[ERROR @ 13:23:17 | PlaylistManager] --- End of stack trace from previous location where exception was thrown ---
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at BeatSaverSharp.BeatSaver+<BeatmapByHash>d__22.MoveNext () [0x000e3] in <cf2a91ab075842019025a9cc37ea5098>:0 
[ERROR @ 13:23:17 | PlaylistManager] --- End of stack trace from previous location where exception was thrown ---
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 13:23:17 | PlaylistManager]   at PlaylistManager.Downloaders.PlaylistSequentialDownloader+<BeatmapDownloadByHash>d__37.MoveNext () [0x0009e] in <7885b601797043658889851f732b6a04>:0 

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

Successfully merging this pull request may close these issues.

1 participant