question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running on an EKS cluster

See original GitHub issue

Describe the bug I’m running stryker inside an eks container and I get the following error.

Logs [22:55:28 INF] Logging enabled at level Trace Version: 3.5.0

[22:55:29 VRB] CACHE https://api.nuget.org/v3/registration5-gz-semver2/dotnet-stryker/index.json A new version of Stryker.NET (3.7.1) is available. Please consider upgrading using dotnet tool update -g dotnet-stryker

[22:55:29 DBG] Stryker started with options: {“MsBuildPath”: null, “DevMode”: false, “ProjectPath”: “/azp/marketing”, “IsSolutionContext”: true, “WorkingDirectory”: “/azp/marketing”, “OutputPath”: “/azp/marketing/StrykerOutput /2023-04-27.22-55-28”, “ReportPath”: “/azp/marketing/StrykerOutput/2023-04-27.22-55-28/reports”, “ReportFileName”: “mutation-report”, “SolutionPath”: “/azp/marketing/JSM.Marketing.sln”, “TargetFramework”: null, “LogOptions”: { “LogToFile”: true, “LogLevel”: “Verbose”, “$type”: “LogOptions”}, “MutationLevel”: “Basic”, “Thresholds”: {“High”: 80, “Low”: 60, “Break”: 0, “$type”: “Thresholds”}, “AdditionalTimeout”: 5000, “LanguageVersion”: “Default”, “Co ncurrency”: 1, “ProjectUnderTestName”: “JSM.Marketing.Domain”, “TestProjects”: [“/azp/marketing/JSM.Marketing.Test”], “TestCaseFilter”: “”, “Reporters”: [“Progress”, “Html”], “WithBaseline”: false, “BaselineProvider”: “Disk”, “AzureFileStorageUrl”: “”, “AzureFileStorageSas”: “”, “DashboardUrl”: “https://dashboard.stryker-mutator.io”, “DashboardApiKey”: null, “Since”: false, “SinceTarget”: “master”, “DiffIgnoreChanges”: [], “FallbackVersion”: “maste r”, “ModuleName”: “”, “ReportTypeToOpen”: null, “Mutate”: [{“Glob”: {“Tokens”: [{“TrailingPathSeparator”: {“Value”: “/”, “$type”: “PathSeparatorToken”}, “LeadingPathSeparator”: null, “$type”: “WildcardDirectoryToken”}, {"$type ": “WildcardToken”}], “$type”: “Glob”}, “IsExclude”: false, “TextSpans”: [{“Start”: 0, “End”: 2147483647, “Length”: 2147483647, “IsEmpty”: false, “$type”: “TextSpan”}], “$type”: “FilePattern”}], “IgnoredMethods”: [], “Excluded Mutations”: [], “ExcludedLinqExpressions”: [], “OptimizationMode”: “CoverageBasedTest”, “ProjectName”: “”, “ProjectVersion”: “”, “BreakOnInitialTestFailure”: false, “$type”: “StrykerOptions”} [22:55:30 INF] Identifying projects to mutate in /azp/marketing/JSM.Marketing.sln. This can take a while. [22:55:30 DBG] Analysing 5 projects [22:55:30 DBG] Analysing /azp/marketing/JSM.Marketing.Domain/JSM.Marketing.Domain.csproj [22:55:30 DBG] Analysing /azp/marketing/JSM.Marketing.Infrastructure/JSM.Marketing.Infrastructure.csproj [22:55:30 DBG] Analysing /azp/marketing/JSM.Marketing.IoC/JSM.Marketing.IoC.csproj [22:55:30 DBG] Analysing /azp/marketing/JSM.Marketing.Api/JSM.Marketing.Api.csproj [22:55:31 DBG] Analysing /azp/marketing/JSM.Marketing.Test/JSM.Marketing.Test.csproj [22:55:35 INF] Time Elapsed 00:00:06.2003890 Unhandled exception. System.AggregateException: One or more errors occurred. (Could not find build environment) (Could not find build environment) (Could not find build environment) (Could not find build environment) (Could no t find build environment) —> System.InvalidOperationException: Could not find build environment at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build() at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<AnalyzeSolution>b__0(IProjectAnalyzer project) at System.Threading.Tasks.Parallel.<>c__DisplayClass33_02.<ForEachWorker>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) — End of stack trace from previous location — at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica1.ExecuteAction(Boolean& yieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute() — End of inner exception stack trace — at Stryker.Core.Initialisation.ProjectOrchestrator.AnalyzeSolution(StrykerOptions options) at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters)+MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 93 at Stryker.CLI.StrykerCli.<>c__DisplayClass10_0.<Run>b__0() in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 68 at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.<OnExecute>b__0(CancellationToken _) at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) at Stryker.CLI.StrykerCli.Run(String[] args) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 74 at Stryker.CLI.Program.Main(String[] args) in /_/src/Stryker.CLI/Stryker.CLI/Program.cs:line 14 ---> (Inner Exception #1) System.InvalidOperationException: Could not find build environment at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build() at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<AnalyzeSolution>b__0(IProjectAnalyzer project) at System.Threading.Tasks.Parallel.<>c__DisplayClass33_02.<ForEachWorker>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location --- at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<—

—> (Inner Exception #2) System.InvalidOperationException: Could not find build environment at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build() at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<AnalyzeSolution>b__0(IProjectAnalyzer project) at System.Threading.Tasks.Parallel.<>c__DisplayClass33_02.<ForEachWorker>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) — End of stack trace from previous location — at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica1.ExecuteAction(Boolean& yieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<—

—> (Inner Exception #3) System.InvalidOperationException: Could not find build environment at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build() at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<AnalyzeSolution>b__0(IProjectAnalyzer project) at System.Threading.Tasks.Parallel.<>c__DisplayClass33_02.<ForEachWorker>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) — End of stack trace from previous location — at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica1.ExecuteAction(Boolean& yieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<—

—> (Inner Exception #4) System.InvalidOperationException: Could not find build environment at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build() at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<AnalyzeSolution>b__0(IProjectAnalyzer project) at System.Threading.Tasks.Parallel.<>c__DisplayClass33_02.<ForEachWorker>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) — End of stack trace from previous location — at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica1.ExecuteAction(Boolean& yieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<—

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: ubuntu(EKS Cluster)
  • Type of project: Web API
  • Framework Version: Core 6.0
  • Stryker Version: 3.5.0

Additional context Add any other context about the problem here.

Issue Analytics

  • State:open
  • Created 5 months ago
  • Reactions:7
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
phmontecommented, May 16, 2023

@rouke-broersma I created the issue in the Buildalyzer repository, in my case the cache didn’t work because the Process doesn’t call the .bashrc file where I created the cache, so I generated a new build of Stryker using an altered version of Buildalyzer and now it works. Let’s wait for the Buildalyzer team, if they approve the change I can do the PR on Buildalyzer and Stryker with the correction.

PS: It took me hours to understand why my version didn’t work, your post and evaluating the pipeline saved me (about vstest files).

https://github.com/microsoft/vstest/issues/1948

2reactions
phmontecommented, May 9, 2023

I will try to reproduce the problem following your tips and I will post the updates here.

Thank you very much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon EKS troubleshooting
This chapter covers some common errors that you may see while using Amazon EKS and how to work around them.
Read more >
Resolve the unauthorized server error for the Amazon EKS ...
First, select the log group for your Amazon EKS cluster (example: /aws/eks/my-cluster/cluster). Then, run the following query: fields @logstream, @timestamp ...
Read more >
Cluster troubleshooting | EKS Anywhere - AWS
This can be an issue with the number of control plane and worker node replicas defined in your cluster yaml file. Try to...
Read more >
kubectl error You must be logged in to the server ...
I got this error when I created the eks cluster using the root from the eks console. I recreated the eks cluster using...
Read more >
Common IAM Issues and Solutions for AWS EKS
This error occurs when a user or role does not have the required permissions to perform an action on a resource in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found