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

Provider tests fail with "System.ComponentModel.Win32Exception : No such file or directory" under .net core 3.0 in ubuntu #226

Closed
ewgenym opened this issue Nov 14, 2019 · 3 comments

Comments

@ewgenym
Copy link

ewgenym commented Nov 14, 2019

Hello

I'm trying to run pactnet provider tests under .net core 3.0 in ubuntu run via wsl in docker container and it fails with System.ComponentModel.Win32Exception : No such file or directory.
When I run same tests under windows then everything works just fine.
It seems that PactVerifier fails to run bash script using System.Diagnostics.Process.Start(). Could it be related to .net core version? I tried .net core 3.0 and .net core 2.2 with same result.

Here is the full stack trace of the exception:
A total of 1 test files matched the specified pattern. X EnsureAgreementPricesApiHonorsPactWithConsumer [1s 43ms] Error Message: System.ComponentModel.Win32Exception : No such file or directory Stack Trace: at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at PactNet.Core.PactCoreHost'1.Start() at PactNet.PactVerifier.Verify(String description, String providerState) at Scalepoint.EasyAdmin.Provider.ProviderTestBase.VerifyPactAsync(String provider, String consumer) in /build/pact/Scalepoint.EasyAdmin.Provider/ProviderTestBase.cs:line 57 at Scalepoint.EasyAdmin.Provider.AgreementPrices.AgreementPricesApiProviderTests.EnsureAgreementPricesApiHonorsPactWithConsumer() in /build/pact/Scalepoint.EasyAdmin.Provider/AgreementPrices/AgreementPricesApiProviderTests.cs:line 12 at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter'1.BlockUntilCompleted() at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func'1 invoke) at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context) at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context) at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork() Results File: /build/artifacts/test-results/_db3ce2ca738c_2019-11-14_12_26_57.trx

I checked path to the script that is used for Process.Start() call and it seems to be correct. Maybe it's related to this issue: dotnet/core#1857

Any help is appreciated.
Thank you in advance.

@neilcampbell
Copy link
Member

@ewgenym I'm not really doing much .NET these days, so haven't been keeping up with the Core version updates. Are you interested in taking a look? I'm guessing it's related to the issue you linked. Otherwise if you could create a sample reproduction project, that would be great.

@ewgenym
Copy link
Author

ewgenym commented Nov 27, 2019

Hello
Finally I figured out that the problem was with docker container that was missing some packages.
Here is the description of the problem I faced and solution: pact-foundation/pact-js#305

@ewgenym ewgenym closed this as completed Nov 27, 2019
@neilcampbell
Copy link
Member

Awesome, thanks for updating the issue with that info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants