Skip to content

Couldn't find listening url Test Failures #35041

@TanayParikh

Description

@TanayParikh

Note, I'm NOT quarantining any specific tests as this seems like a more general failure not specific to a particular test's implementation.

Failing Test(s)

  • Templates.Test.WebApiTemplateTest.WebApiTemplateCSharp
  • Templates.Test.RazorPagesTemplateTest.RazorPagesTemplate_IndividualAuth
  • Templates.Test.WebApiTemplateTest.WebApiTemplateCSharp_WithoutOpenAPI

Error Message

System.InvalidOperationException : Couldn't find listening url:
dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory[12]
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.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
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
Hosting starting
Writing minidump with heap to file C:coresdotnet.772.dmp
Dump successfully written

Stacktrace

Details
   at Templates.Test.Helpers.AspNetProcess.GetListeningMessage() in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 218
   at Templates.Test.Helpers.AspNetProcess.ResolveListeningUrl(ITestOutputHelper output) in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 174
   at Templates.Test.Helpers.AspNetProcess..ctor(DevelopmentCertificate cert, ITestOutputHelper output, String workingDirectory, String dllPath, IDictionary`2 environmentVariables, Boolean published, Boolean hasListeningUri, Boolean usePublishedAppHost, ILogger logger) in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 100
   at Templates.Test.Helpers.Project.StartBuiltProjectAsync(Boolean hasListeningUri, ILogger logger) in /_/src/ProjectTemplates/Shared/Project.cs:line 189
   at Templates.Test.WebApiTemplateTest.WebApiTemplateCSharp_WithoutOpenAPI() in /_/src/ProjectTemplates/test/WebApiTemplateTest.cs:line 63
--- End of stack trace from previous location ---

Logs

Details
[0.001s] [TestLifetime] [Information] Starting test WebApiTemplateCSharp_WithoutOpenAPI at 2021-08-04T17:19:45
[7.542s] [Templates.Test.WebApiTemplateTest] [Information] Acquired DotNetNewLock
[7.542s] [Templates.Test.WebApiTemplateTest] [Information] Released DotNetNewLock
[11.091s] [Templates.Test.WebApiTemplateTest] [Information] Acquired DotNetNewLock
[11.091s] [Templates.Test.WebApiTemplateTest] [Information] ==> dotnet new webapi  --debug:disable-sdk-templates --debug:custom-hive "C:\h\w\A7BD0982\w\9B0508DB\e\Hives\.templateEngine" --no-openapi -o C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs [C:\h\w\A7BD0982\w\9B0508DB\e\]
[13.418s] [Templates.Test.WebApiTemplateTest] [Information] Process exited.
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] The template "ASP.NET Core Web API" was created successfully.
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] 
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] Processing post-creation actions...
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] Running 'dotnet restore' on C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs\AspNet.au1yyht4lqs.csproj...
[14.495s] [Templates.Test.WebApiTemplateTest] [Information]   Determining projects to restore...
[14.495s] [Templates.Test.WebApiTemplateTest] [Information]   Restored C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs\AspNet.au1yyht4lqs.csproj (in 80 ms).
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] Restore succeeded.
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] 
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] An update for template package 'Microsoft.DotNet.Web.ProjectTemplates.6.0::6.0.0-ci' is available.
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] To update the package use:
[14.495s] [Templates.Test.WebApiTemplateTest] [Information]    dotnet new --install Microsoft.DotNet.Web.ProjectTemplates.6.0::6.0.0-rc.1.21404.4
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] Released DotNetNewLock
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] Building ASP.NET Core application...
[14.495s] [Templates.Test.WebApiTemplateTest] [Information] ==> dotnet build --no-restore -c Debug /bl  [C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs]
[14.727s] [Templates.Test.WebApiTemplateTest] [Information] Microsoft (R) Build Engine version 17.0.0-preview-21380-01+b6e7d6051 for .NET
[14.727s] [Templates.Test.WebApiTemplateTest] [Information] Copyright (C) Microsoft Corporation. All rights reserved.
[14.727s] [Templates.Test.WebApiTemplateTest] [Information] 
[14.728s] [Templates.Test.WebApiTemplateTest] [Information] C:\h\w\A7BD0982\p\dotnet-cli\sdk\6.0.100-rc.1.21401.2\MSBuild.dll -consoleloggerparameters:Summary -maxcpucount -property:Configuration=Debug -verbosity:m /bl .\AspNet.au1yyht4lqs.csproj
[15.634s] [Templates.Test.WebApiTemplateTest] [Information]   You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
[16.774s] [Templates.Test.WebApiTemplateTest] [Information]   AspNet.au1yyht4lqs -> C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs\bin\Debug\net6.0\AspNet.au1yyht4lqs.dll
[16.854s] [Templates.Test.WebApiTemplateTest] [Information] Process exited.
[17.693s] [Templates.Test.WebApiTemplateTest] [Information] 
[17.693s] [Templates.Test.WebApiTemplateTest] [Information] Build succeeded.
[17.693s] [Templates.Test.WebApiTemplateTest] [Information]     0 Warning(s)
[17.693s] [Templates.Test.WebApiTemplateTest] [Information]     0 Error(s)
[17.693s] [Templates.Test.WebApiTemplateTest] [Information] 
[17.693s] [Templates.Test.WebApiTemplateTest] [Information] Time Elapsed 00:00:02.00
[17.694s] [Templates.Test.WebApiTemplateTest] [Information] applicationUrl is not specified in launchSettings.json
[17.694s] [Templates.Test.WebApiTemplateTest] [Information] Running ASP.NET Core application...
[17.694s] [Templates.Test.WebApiTemplateTest] [Information] ==> dotnet run --no-build [C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs]
[17.702s] [Templates.Test.WebApiTemplateTest] [Information] Waiting until ASP.NET application is accepting connections...
[18.633s] [Templates.Test.WebApiTemplateTest] [Information] dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory[12]
[18.633s] [Templates.Test.WebApiTemplateTest] [Information]       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.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
[18.707s] [Templates.Test.WebApiTemplateTest] [Information] dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
[18.707s] [Templates.Test.WebApiTemplateTest] [Information]       Hosting starting
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR] Unhandled exception. System.IO.IOException: Failed to bind to address https://127.0.0.1:7022: address already in use.
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]  ---> Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted.
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]  ---> System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted.
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at System.Net.Sockets.Socket.Bind(EndPoint localEP)
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    --- End of inner exception stack trace ---
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
[18.812s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR] --- End of stack trace from previous location ---
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    --- End of inner exception stack trace ---
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at Microsoft.AspNetCore.Builder.WebApplication.Run(String url)
[18.813s] [Templates.Test.WebApiTemplateTest] [Information] [ERROR]    at <Program>$.<Main>$(String[] args) in C:\h\w\A7BD0982\w\9B0508DB\e\Templates\BaseFolder\AspNet.au1yyht4lqs\Program.cs:line 17
[19.435s] [Templates.Test.WebApiTemplateTest] [Information] Writing minidump with heap to file C:\cores\dotnet.772.dmp
[19.435s] [Templates.Test.WebApiTemplateTest] [Information] Dump successfully written
[28.922s] [Templates.Test.WebApiTemplateTest] [Information] Process exited.
[28.942s] [Templates.Test.WebApiTemplateTest] [Error] Test threw an exception.
System.InvalidOperationException: Couldn't find listening url:
dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory[12]
      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.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
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
      Hosting starting
Writing minidump with heap to file C:\cores\dotnet.772.dmp
Dump successfully written
   at Templates.Test.Helpers.AspNetProcess.GetListeningMessage() in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 218
   at Templates.Test.Helpers.AspNetProcess.ResolveListeningUrl(ITestOutputHelper output) in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 174
   at Templates.Test.Helpers.AspNetProcess..ctor(DevelopmentCertificate cert, ITestOutputHelper output, String workingDirectory, String dllPath, IDictionary`2 environmentVariables, Boolean published, Boolean hasListeningUri, Boolean usePublishedAppHost, ILogger logger) in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 100
   at Templates.Test.Helpers.Project.StartBuiltProjectAsync(Boolean hasListeningUri, ILogger logger) in /_/src/ProjectTemplates/Shared/Project.cs:line 189
   at Templates.Test.WebApiTemplateTest.WebApiTemplateCSharp_WithoutOpenAPI() in /_/src/ProjectTemplates/test/WebApiTemplateTest.cs:line 63
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 273
--- End of stack trace from previous location ---
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 54
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 96
[28.943s] [TestLifetime] [Information] Finished test WebApiTemplateCSharp_WithoutOpenAPI in 28.9410029s

Build

https://dev.azure.com/dnceng/public/_build/results?buildId=1276014&view=ms.vss-test-web.build-test-results-tab&runId=37741340&resultId=125797&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatestest-failure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions