Skip to content

NullReferenceException in CI/CD since .NET Core Runtime version 3.1.28 #1877

Closed

Description

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

Our last successful CI/CD pipeline used .NET Core Runtime version 3.1.27, and since the update to 3.1.28 it has consistently failed in the completion tests. The delegate which calls TabExpansion2 is now failing, resulting in a null reference exception (as it's not expected to throw). The inner exception is a file not found exception, where Microsoft.Bcl.AsyncInterfaces v1.0.0.0 and System.Threading.Tasks.Extensions v4.2.0.0 aren't being found.

Specifically this happens with PowerShell 5.1, which means when we're targeting .NET Desktop Framework 4.6.2.

I am hesitant to blame the .NET update...and yet I was able to immediately repro this locally as soon as I installed the same update.

This is currently blocking new releases.

Expected behavior

N/A

Actual behavior

N/A

Error details

Exception thrown: 'System.Management.Automation.MethodInvocationException' in System.Management.Automation.dll: 'Exception calling "CompleteInput" with "4" argument(s): "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."' Inner exceptions found, see $exception in variables window for more details. Innermost exception System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
 at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)  at System.Reflection.RuntimeModule.GetTypes()  at System.Reflection.Assembly.GetTypes()  at System.Management.Automation.CompletionCompleters.<>c.<InitializeTypeCache>b__111_0(Assembly assembly)  at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()  at System.Management.Automation.CompletionCompleters.InitializeTypeCache()  at System.Management.Automation.CompletionCompleters.CompleteType(CompletionContext context, String prefix, String suffix)  at System.Management.Automation.CompletionAnalysis.GetResultHelper(CompletionContext completionContext, Int32& replacementIndex, Int32& replacementLength, Boolean isQuotedString)  at System.Management.Automation.CompletionAnalysis.GetResults(PowerShell powerShell, Int32& replacementIndex, Int32& replacementLength)  at System.Management.Automation.CommandCompletion.CompleteInputImpl(Ast ast, Token[] tokens, IScriptPosition positionOfCursor, Hashtable options)

Environment data

N/A

Version

N/A

Visuals

MicrosoftTeams-image

Activity

  1. ghost added
    Needs: Triage
    on Aug 11, 2022
  2. added
    Issue-Bug
    and removed
    Needs: Triage
    on Aug 11, 2022
  3. andyleejordan commented on Sep 12, 2022

    @andyleejordan
    MemberAuthor

    At this point, we don't know what broke that test. We've skipped the test for now and unpinned .NET. It's completions on Windows PowerShell, which is fragile to begin with...unassigning as we're not actively investigating this mystery.

  4. andyleejordan commented on Oct 27, 2022

    @andyleejordan
    MemberAuthor

    This has never cropped up as causing an issue for users, closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions