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

Updating Nvidia.Broadcast results in YamlDotNet.Core.YamlException: (Line: 7, Col: 7, Idx: 209) - (Line: 7, Col: 17, Idx: 219): Exception during deserialization #155

Closed
banksio opened this issue Sep 2, 2021 · 1 comment · Fixed by #192

Comments

@banksio
Copy link

banksio commented Sep 2, 2021

Brief description of your issue

Attempting to update the Nvidia.Broadcast manifest results in an error, likely due to the large integer success code 3858759680 in that package's manifest.

Steps to reproduce

Attempt to update the Nvidia Broadcast manifest using:

wingetcreate.exe update Nvidia.Broadcast --urls https://international.download.nvidia.com/Windows/broadcast/1.3.0/nvidia_broadcast_v1.3.0.45.exe

Expected behavior

The manifest is updated.

Actual behavior

WingetCreate crashes after Retrieving latest manifest for Nvidia.Broadcast, with the error:

YamlDotNet.Core.YamlException: (Line: 7, Col: 7, Idx: 209) - (Line: 7, Col: 17, Idx: 219): Exception during deserialization
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at YamlDotNet.Serialization.NodeDeserializers.ScalarNodeDeserializer.CastInteger(UInt64 number, TypeCode typeCode)
   at YamlDotNet.Serialization.NodeDeserializers.ScalarNodeDeserializer.DeserializeIntegerHelper(TypeCode typeCode, String value)
   at YamlDotNet.Serialization.NodeDeserializers.ScalarNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   --- End of inner exception stack trace ---
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
   at YamlDotNet.Serialization.NodeDeserializers.CollectionNodeDeserializer.DeserializeHelper(Type tItem, IParser parser, Func`3 nestedObjectDeserializer, IList result, Boolean canUpdate)
   at YamlDotNet.Serialization.NodeDeserializers.CollectionNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
   at YamlDotNet.Serialization.NodeDeserializers.ObjectNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](IParser parser)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](TextReader input)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](String input)
   at Microsoft.WingetCreateCore.Serialization.DeserializeFromString[T](String value)
   at Microsoft.WingetCreateCore.Serialization.DeserializeManifestContents(IEnumerable`1 manifestContents)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.ExecuteManifestUpdate(List`1 latestManifestContent, CommandExecutedEvent commandEvent)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Environment

Windows Manifest Creator v0.3.0.6
@ghost ghost added the Needs-Triage label Sep 2, 2021
@ryfu-msft ryfu-msft added this to the v1.0-Create milestone Sep 2, 2021
@palenshus
Copy link
Contributor

Looks like this is actually an issue with the schema, which defines this type as a plain integer, which when NJsonSchema compiles to c# turns into an int. If we change the schema to add "format": "long" (and "minimum": 0"), the resulting type will be able to hold all exit codes, which are of type uint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants