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

NuGet restore failing with NullReferenceException #103823

Open
kunalspathak opened this issue Jun 21, 2024 · 7 comments · Fixed by #104407
Open

NuGet restore failing with NullReferenceException #103823

kunalspathak opened this issue Jun 21, 2024 · 7 comments · Fixed by #104407
Assignees
Labels
area-System.ComponentModel blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' bug Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@kunalspathak
Copy link
Member

kunalspathak commented Jun 21, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=715438
Build error leg or test failing: Build / windows-x64 release CrossDac / Build product
Pull request: #103806

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorPattern": "NuGet.RestoreEx.targets.*: error : Object reference not set to an instance of an object.",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=715438
Error message validated: [NuGet.RestoreEx.targets.*: error : Object reference not set to an instance of an object.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/21/2024 3:51:17 PM UTC

Report

Build Definition Step Name Console log Pull Request
734324 dotnet/runtime Build Tests Log #100395
733878 dotnet/runtime Build Tests Log #104581
733802 dotnet/runtime Build product Log #104579
733336 dotnet/runtime Copy native test components to test output folder Log #104561
733306 dotnet/runtime AOT compile CoreCLR tests Log #104437
731195 dotnet/runtime Build native test components Log #104437
730660 dotnet/runtime Build Tests Log #104195
729727 dotnet/runtime Build Tests Log #104248
728976 dotnet/runtime Build Tests Log #103889
2486544 dotnet-runtime Build product Log
726826 dotnet/runtime Package Runtime Deps, Runtime, Framework Packs - rpm packages Log #104060
726554 dotnet/runtime Build Tests Log #103444
726364 dotnet/runtime Copy native test components to test output folder Log #103318
724028 dotnet/runtime Build Tests Log #103412
723147 dotnet/runtime Build Tests Log #103735
722771 dotnet/runtime Build Tests Log #103144
721001 dotnet/runtime Build Tests Log #104017
717617 dotnet/runtime Build Tests Log #103510
717228 dotnet/runtime Build product Log #103860
715438 dotnet/runtime Build product Log #103806

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 9 20
@kunalspathak kunalspathak added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Jun 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 21, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented Jun 21, 2024

Likely duplicate of #103526

@jkotas jkotas changed the title windows x64 Release CrossDac build is failing NuGet restore failing with NullReferenceException Jun 21, 2024
@jkotas
Copy link
Member

jkotas commented Jun 21, 2024

Stacktrace of the crash:

 Object reference not set to an instance of an object. [D:\a\_work\1\s\Build.proj]
    at System.Collections.Generic.Dictionary`2.FindValue(TKey key) [D:\a\_work\1\s\Build.proj]
    at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.ReflectTypeDescriptionProvider.GetTypeData(Type type, Boolean createIfNeeded) [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.TypeDescriptor.DefaultTypeDescriptor.GetAttributes() [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType) [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetAttributes() [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.TypeDescriptor.DefaultTypeDescriptor.GetAttributes() [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType) [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetConverter(Object instance, Boolean verifyIsRegisteredType) [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.TypeDescriptor.DefaultTypeDescriptor.GetConverter() [D:\a\_work\1\s\Build.proj]
    at System.ComponentModel.TypeDescriptor.GetConverter(Type type) [D:\a\_work\1\s\Build.proj]
    at Newtonsoft.Json.Serialization.JsonTypeReflector.CanTypeDescriptorConvertString(Type type, TypeConverter& typeConverter) [D:\a\_work\1\s\Build.proj]
    at Newtonsoft.Json.Serialization.DefaultContractResolver.CanConvertToString(Type type) [D:\a\_work\1\s\Build.proj]
    at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) [D:\a\_work\1\s\Build.proj]
    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) [D:\a\_work\1\s\Build.proj]
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) [D:\a\_work\1\s\Build.proj]
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) [D:\a\_work\1\s\Build.proj]
    at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader) [D:\a\_work\1\s\Build.proj]
    at NuGet.Packaging.NupkgMetadataFileFormat.Read(TextReader reader, ILogger log, String path) [D:\a\_work\1\s\Build.proj]
    at NuGet.Packaging.NupkgMetadataFileFormat.Read(TextReader reader, ILogger log, String path) [D:\a\_work\1\s\Build.proj]
    at NuGet.Packaging.NupkgMetadataFileFormat.Read(Stream stream, ILogger log, String path) [D:\a\_work\1\s\Build.proj]
    at NuGet.Packaging.NupkgMetadataFileFormat.<>c__DisplayClass6_0.<Read>b__0(FileStream stream, String nupkgMetadataFilePath) [D:\a\_work\1\s\Build.proj]
    at NuGet.Common.FileUtility.SafeRead[T](String filePath, Func`3 read) [D:\a\_work\1\s\Build.proj]
    at NuGet.Packaging.NupkgMetadataFileFormat.Read(String filePath, ILogger log) [D:\a\_work\1\s\Build.proj]
    at NuGet.Packaging.NupkgMetadataFileFormat.Read(String filePath) [D:\a\_work\1\s\Build.proj]
    at NuGet.Protocol.LocalPackageFileCache.<>c__DisplayClass9_0.<GetOrAddSha512>b__1() [D:\a\_work\1\s\Build.proj]
    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [D:\a\_work\1\s\Build.proj]
 --- End of stack trace from previous location --- [D:\a\_work\1\s\Build.proj]
    at System.Lazy`1.CreateValue() [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.LockFileBuilder.CreateLockFile(LockFile previousLockFile, PackageSpec project, IEnumerable`1 targetGraphs, IReadOnlyList`1 localRepositories, RemoteWalkContext context, LockFileBuilderCache lockFileBuilderCache) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreCommand.BuildAssetsFile(LockFile existingLockFile, PackageSpec project, IEnumerable`1 graphs, IReadOnlyList`1 localRepositories, RemoteWalkContext contextForProject) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreRunner.ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreRunner.ExecuteAndCommitAsync(RestoreSummaryRequest summaryRequest, IRestoreProgressReporter progressReporter, CancellationToken token) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreRunner.ExecuteAndCommitAsync(RestoreSummaryRequest summaryRequest, IRestoreProgressReporter progressReporter, CancellationToken token) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreRunner.CompleteTaskAsync(List`1 restoreTasks) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreRunner.RunAsync(IEnumerable`1 restoreRequests, RestoreArgs restoreArgs, CancellationToken token) [D:\a\_work\1\s\Build.proj]
    at NuGet.Commands.RestoreRunner.RunAsync(RestoreArgs restoreContext, CancellationToken token) [D:\a\_work\1\s\Build.proj]
    at NuGet.Build.Tasks.BuildTasksUtility.RestoreAsync(DependencyGraphSpec dependencyGraphSpec, Boolean interactive, Boolean recursive, Boolean noCache, Boolean ignoreFailedSources, Boolean disableParallel, Boolean force, Boolean forceEvaluate, Boolean hideWarningsAndErrors, Boolean restorePC, Boolean cleanupAssetsForUnsupportedProjects, ILogger log, CancellationToken cancellationToken) [D:\a\_work\1\s\Build.proj]

cc @steveharter

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented Jul 2, 2024

@steveharter Could you please take a look? It is hit multiple times per day in the CI

@steveharter steveharter self-assigned this Jul 3, 2024
@steveharter steveharter added bug and removed untriaged New issue has not been triaged by the area owner labels Jul 3, 2024
@steveharter steveharter added this to the 9.0.0 milestone Jul 3, 2024
@steveharter steveharter reopened this Jul 8, 2024
@steveharter
Copy link
Member

Re-opening for a few days to track any new hits after the fix went in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.ComponentModel blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' bug Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants