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

YamlDotNet.Core.YamlException: (Line: 1, Col: 1, Idx: 0) #90

Closed
OfficialEsco opened this issue Jun 23, 2021 · 1 comment · Fixed by #91
Closed

YamlDotNet.Core.YamlException: (Line: 1, Col: 1, Idx: 0) #90

OfficialEsco opened this issue Jun 23, 2021 · 1 comment · Fixed by #91

Comments

@OfficialEsco
Copy link

Brief description of your issue / Steps to reproduce / Actual behavior

PS C:\Users\******\GitHub\winget-pkgs> wingetcreate update Balena.BalenaCLI -v 12.44.21 -u https://github.com/balena-io/balena-cli/releases/download/v12.44.21/balena-cli-v12.44.21-windows-x64-installer.exe -s
Retrieving latest manifest for Balena.BalenaCLI
YamlDotNet.Core.YamlException: (Line: 1, Col: 1, Idx: 0) - (Line: 1, Col: 32, Idx: 31): Exception during deserialization
 ---> System.InvalidCastException: Invalid cast from 'System.String' to 'Microsoft.WingetCreateCore.Models.ManifestTypeBase'.
   at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
   at System.String.System.IConvertible.ToType(Type type, IFormatProvider provider)
   at YamlDotNet.Serialization.Utilities.TypeConverter.ChangeType(Object value, Type destinationType, CultureInfo culture)
   at YamlDotNet.Serialization.Utilities.TypeConverter.ChangeType(Object value, Type destinationType)
   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.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, Manifests manifests)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.DeserializeExistingManifestsAndUpdate(List`1 latestManifestContent)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.ExecuteManifestUpdate(List`1 latestManifestContent, CommandExecutedEvent commandEvent)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Expected behavior

Biip baap boop new manifest appears!

Environment

Windows Manifest Creator v0.2.0.29
@ghost ghost added the Needs-Triage label Jun 23, 2021
@denelon denelon added this to the v1.0 - `winget create` milestone Jun 23, 2021
@palenshus palenshus self-assigned this Jun 23, 2021
@palenshus
Copy link
Contributor

Looks like manifest has a preceding BOM for some reason, and Octokit doesn't strip it out correctly

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