You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue can be reproduced with Cascade repo by running nbgv cloud
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: 8. Path '', line 30, position 1.
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Nerdbank.GitVersioning.VersionFile.TryReadVersionJsonContent(String jsonContent, String repoRelativeBaseDirectory) in D:\a\1\s\src\NerdBank.GitVersioning\VersionFile.cs:line 142
at Nerdbank.GitVersioning.Managed.ManagedVersionFile.GetVersion(GitCommit commit, String repoRelativeProjectDirectory, Dictionary`2 blobVersionCache, String& actualDirectory) in D:\a\1\s\src\NerdBank.GitVersioning\Managed\ManagedVersionFile.cs:line 105
at Nerdbank.GitVersioning.Managed.ManagedVersionFile.GetVersionCore(String& actualDirectory) in D:\a\1\s\src\NerdBank.GitVersioning\Managed\ManagedVersionFile.cs:line 41
at Nerdbank.GitVersioning.VersionOracle..ctor(GitContext context, ICloudBuild cloudBuild, Nullable`1 overrideVersionHeightOffset) in D:\a\1\s\src\NerdBank.GitVersioning\VersionOracle.cs:line 39
at Nerdbank.GitVersioning.Tool.Program.OnCloudCommand(String project, IReadOnlyList`1 metadata, String version, String ciSystem, Boolean allVars, Boolean commonVars, IReadOnlyList`1 define) in D:\a\1\s\src\nbgv\Program.cs:line 601
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
nbgv v3.2.31 works fine on the same revision.
The text was updated successfully, but these errors were encountered:
This is a regression in our reading of git objects. You can workaround it either by pinning the older version of NB.GV, or by setting the env var to use libgit2 as described in these release notes.
@qmfrederik: this fails on the very first commit encountered, in that it produces the content of the version.json file from the HEAD commit for parsing, but then that content has several lines of trailing text that looks like it came from the middle of that same file. The result is the JSON object is followed by an invalid JSON fragment.
I wonder if there's a bug in the managed git file delta-processing where we incorrectly reconstruct the plaintext. Any ideas?
In the case of this bug, the `Stream.Read` method read fewer bytes than was requested. This is totally allowed, but the caller did not expect it and assumed the entire buffer was initialized rather than a subset of it.
Fixes#580
This issue can be reproduced with Cascade repo by running
nbgv cloud
nbgv
v3.2.31 works fine on the same revision.The text was updated successfully, but these errors were encountered: