Skip to content

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

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

Closed
3 tasks done
andyleejordan opened this issue Aug 11, 2022 · 2 comments
Closed
3 tasks done
Labels

Comments

@andyleejordan
Copy link
Member

andyleejordan commented Aug 11, 2022

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

@andyleejordan
Copy link
Member Author

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.

@andyleejordan andyleejordan removed their assignment Sep 12, 2022
@andyleejordan
Copy link
Member Author

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
Labels
Projects
None yet
Development

No branches or pull requests

1 participant