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

Quarantine Microsoft.AspNetCore.Mvc.FunctionalTests.ControllerEndpointFiltersTest.CanCaptureMethodInfoFromControllerAction #60109

Open
javiercn opened this issue Jan 30, 2025 · 1 comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates test-failure

Comments

@javiercn
Copy link
Member

Microsoft.AspNetCore.Mvc.FunctionalTests.ControllerEndpointFiltersTest.CanCaptureMethodInfoFromControllerAction

Failing Test(s)

Microsoft.AspNetCore.Mvc.FunctionalTests.ControllerEndpointFiltersTest.CanCaptureMethodInfoFromControllerAction

Error Message

System.InvalidProgramException : Common Language Runtime detected an invalid program.

Stacktrace

   at System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(RuntimeMethodHandleInternal method)
   at System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(RuntimeMethodHandleInternal method)
   at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target)
   at System.Linq.Expressions.Expression`1.Compile()
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.GetExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) in /_/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs:line 231
   at Microsoft.Extensions.Internal.ObjectMethodExecutor..ctor(MethodInfo methodInfo, TypeInfo targetTypeInfo, Object[] parameterDefaultValues) in /_/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs:line 53
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, Object[] parameterDefaultValues) in /_/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs:line 116
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvokerCache.GetCachedResult(ControllerContext controllerContext) in /_/src/Mvc/Mvc.Core/src/Infrastructure/ControllerActionInvokerCache.cs:line 57
   at Microsoft.AspNetCore.Mvc.Routing.ControllerRequestDelegateFactory.<>c__DisplayClass12_0.<CreateRequestDelegate>b__0(HttpContext context) in /_/src/Mvc/Mvc.Core/src/Routing/ControllerRequestDelegateFactory.cs:line 92
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) in /_/src/Http/Routing/src/EndpointMiddleware.cs:line 72
   at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) in /_/src/Http/Routing/src/EndpointRoutingMiddleware.cs:line 83
   at Microsoft.AspNetCore.Mvc.FunctionalTests.CultureReplacerMiddleware.Invoke(HttpContext context) in /_/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/CultureReplacerMiddleware.cs:line 44
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext() in /_/src/Hosting/TestHost/src/HttpContextBuilder.cs:line 116
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/Hosting/TestHost/src/ClientHandler.cs:line 210
   at Microsoft.AspNetCore.Mvc.Testing.Handlers.CookieContainerHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/Mvc/Mvc.Testing/src/Handlers/CookieContainerHandler.cs:line 50
   at Microsoft.AspNetCore.Mvc.Testing.Handlers.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/Mvc/Mvc.Testing/src/Handlers/RedirectHandler.cs:line 51
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.AspNetCore.Mvc.FunctionalTests.ControllerEndpointFiltersTest.CanCaptureMethodInfoFromControllerAction() in /_/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs:line 54
--- End of stack trace from previous location ---

Logs

[0.946s] [TestLifetime] [Information] Starting test CanCaptureMethodInfoFromControllerAction at 2025-01-30T13:33:57
[1.165s] [Microsoft.AspNetCore.Hosting.Diagnostics] [Debug] Hosting starting
[1.166s] [Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory] [Debug] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.TryParseModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
[1.166s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Areas/Admin/Pages/LGAreaPage.cshtml'.
[1.166s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/DynamicPage.cshtml'.
[1.166s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/Edit.cshtml'.
[1.166s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/FallbackPage.cshtml'.
[1.167s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/LGAnotherPage.cshtml'.
[1.167s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/LGPage.cshtml'.
[1.167s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/PageRouteTransformer/Index.cshtml'.
[1.167s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/PageRouteTransformer/PageWithConfiguredRoute.cshtml'.
[1.167s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/PageRouteTransformer/TestPage.cshtml'.
[1.167s] [Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler] [Debug] Initializing Razor view compiler with compiled view: '/Pages/PageWithLinks.cshtml'.
[1.167s] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] [Information] User profile is available. Using '/home/helixbot/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
[3.066s] [Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository] [Debug] Reading data from file '/home/helixbot/.aspnet/DataProtection-Keys/key-246b3195-0288-4560-88d7-f24e0e71da5e.xml'.
[3.066s] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] [Debug] Found key {246b3195-0288-4560-88d7-f24e0e71da5e}.
[3.066s] [Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver] [Debug] Considering key {246b3195-0288-4560-88d7-f24e0e71da5e} with expiration date 2025-04-30 13:33:24Z as default key.
[3.066s] [Microsoft.AspNetCore.DataProtection.TypeForwardingActivator] [Debug] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60
[3.066s] [Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory] [Debug] Using managed symmetric algorithm 'System.Security.Cryptography.Aes'.
[3.066s] [Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory] [Debug] Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'.
[3.067s] [Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider] [Debug] Using key {246b3195-0288-4560-88d7-f24e0e71da5e} as the default key.
[3.071s] [Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService] [Debug] Key ring with default key {246b3195-0288-4560-88d7-f24e0e71da5e} was loaded during application startup.
[3.071s] [Microsoft.AspNetCore.Hosting.Diagnostics] [Debug] Hosting started
[3.071s] [Microsoft.AspNetCore.Hosting.Diagnostics] [Debug] Loaded hosting startup assembly Mvc.RoutingWebSite
[3.072s] [Microsoft.AspNetCore.Hosting.Diagnostics] [Information] Request starting HTTP/1.1 GET http://localhost/Items/Index - null null
[3.201s] [Microsoft.AspNetCore.Routing.Matching.DfaMatcher] [Debug] 1 candidate(s) found for the request path '/Items/Index'
[3.201s] [Microsoft.AspNetCore.Routing.Matching.DfaMatcher] [Debug] Endpoint 'RoutingWebSite.ItemsController.Index (Mvc.RoutingWebSite)' with route pattern 'Items/Index' is valid for the request path '/Items/Index'
[3.201s] [Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware] [Debug] Request matched endpoint 'RoutingWebSite.ItemsController.Index (Mvc.RoutingWebSite)'
[3.201s] [Microsoft.AspNetCore.Routing.EndpointMiddleware] [Information] Executing endpoint 'RoutingWebSite.ItemsController.Index (Mvc.RoutingWebSite)'
[3.244s] [Microsoft.AspNetCore.Routing.EndpointMiddleware] [Information] Executed endpoint 'RoutingWebSite.ItemsController.Index (Mvc.RoutingWebSite)'
[3.317s] [Microsoft.AspNetCore.Hosting.Diagnostics] [Information] Request finished HTTP/1.1 GET http://localhost/Items/Index - 200 null null 224.1719ms
[3.900s] [Microsoft.AspNetCore.Mvc.FunctionalTests.ControllerEndpointFiltersTest] [Error] Test threw an exception.
System.InvalidProgramException: Common Language Runtime detected an invalid program.
   at System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(RuntimeMethodHandleInternal method)
   at System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(RuntimeMethodHandleInternal method)
   at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target)
   at System.Linq.Expressions.Expression`1.Compile()
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.GetExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) in /_/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs:line 231
   at Microsoft.Extensions.Internal.ObjectMethodExecutor..ctor(MethodInfo methodInfo, TypeInfo targetTypeInfo, Object[] parameterDefaultValues) in /_/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs:line 53
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, Object[] parameterDefaultValues) in /_/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs:line 116
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvokerCache.GetCachedResult(ControllerContext controllerContext) in /_/src/Mvc/Mvc.Core/src/Infrastructure/ControllerActionInvokerCache.cs:line 57
   at Microsoft.AspNetCore.Mvc.Routing.ControllerRequestDelegateFactory.<>c__DisplayClass12_0.<CreateRequestDelegate>b__0(HttpContext context) in /_/src/Mvc/Mvc.Core/src/Routing/ControllerRequestDelegateFactory.cs:line 92
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) in /_/src/Http/Routing/src/EndpointMiddleware.cs:line 72
   at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) in /_/src/Http/Routing/src/EndpointRoutingMiddleware.cs:line 83
   at Microsoft.AspNetCore.Mvc.FunctionalTests.CultureReplacerMiddleware.Invoke(HttpContext context) in /_/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/CultureReplacerMiddleware.cs:line 44
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext() in /_/src/Hosting/TestHost/src/HttpContextBuilder.cs:line 116
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/Hosting/TestHost/src/ClientHandler.cs:line 210
   at Microsoft.AspNetCore.Mvc.Testing.Handlers.CookieContainerHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/Mvc/Mvc.Testing/src/Handlers/CookieContainerHandler.cs:line 50
   at Microsoft.AspNetCore.Mvc.Testing.Handlers.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/Mvc/Mvc.Testing/src/Handlers/RedirectHandler.cs:line 51
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.AspNetCore.Mvc.FunctionalTests.ControllerEndpointFiltersTest.CanCaptureMethodInfoFromControllerAction() in /_/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs:line 54
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass47_0.<<InvokeTestMethodAsync>b__1>d.MoveNext() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:line 259
--- End of stack trace from previous location ---
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:line 48
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in /_/src/xunit.core/Sdk/ExceptionAggregator.cs:line 90
[4.036s] [Microsoft.AspNetCore.Hosting.Diagnostics] [Debug] Hosting shutdown
[4.924s] [TestLifetime] [Information] Finished test CanCaptureMethodInfoFromControllerAction in 4.0353452s

Build

https://dev.azure.com/dnceng-public/public/_build/results?buildId=934752&view=ms.vss-test-web.build-test-results-tab&runId=24755436&resultId=123655&paneView=debug

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 30, 2025
@shethaadit
Copy link
Contributor

Hi @javiercn, I will raise PR for this soon. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates test-failure
Projects
None yet
Development

No branches or pull requests

2 participants