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

Error Starting Messaging Provider #519

Open
adamrodger opened this issue Sep 8, 2024 · 0 comments
Open

Error Starting Messaging Provider #519

adamrodger opened this issue Sep 8, 2024 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer

Comments

@adamrodger
Copy link
Contributor

Version information:

  • OS: Windows
  • PactNet Version: 5.0.0-beta.3
  • .Net Version: .Net 8

Describe the bug
We're seeing intermittent issues, both locally and in CI, on Windows whereby the messaging provider fails to start, with the error:

PactNet.Exceptions.PactFailureException : Unable to start the internal messaging server
---- System.Net.HttpListenerException : The process cannot access the file because it is being used by another process
  Stack Trace:
     at PactNet.Verifier.Messaging.MessagingProvider.Start(JsonSerializerOptions settings) in /_/src/PactNet/Verifier/Messaging/MessagingProvider.cs:line 85
   at PactNet.Tests.Verifier.Messaging.MessagingProviderTests..ctor(ITestOutputHelper output) in D:\a\pact-net\pact-net\tests\PactNet.Tests\Verifier\Messaging\MessagingProviderTests.cs:line 45
----- Inner Stack Trace -----
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at PactNet.Verifier.Messaging.MessagingProvider.Start(JsonSerializerOptions settings) in /_/src/PactNet/Verifier/Messaging/MessagingProvider.cs:line 75

Steps To Reproduce
Intermittently happens when running messaging tests

Expected behavior
The messaging server finds a free port and starts successfully

Additional context
Doesn't seem to happen on non-Windows systems

@adamrodger adamrodger added bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer labels Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant