Welcome Guest! To enable all features please Login or Register.

Error

 IpcConnectionClosedException: The connection has been closed Previous Topic Next Topic
 TURNSKIN #1 Posted : Tuesday, November 26, 2019 2:00:33 PM(UTC) Rank: MemberGroups: Registered Joined: 8/31/2015(UTC)Posts: 12Location: LithuaniaThanks: 4 timesWas thanked: 2 time(s) in 2 post(s) Hi,After migrating from dotnet core 2.2 to 3.0 our team started to get this error:Quote:An error occurred while analysing this project after it was built: NCrunch encountered an unexpected error occurred while building an environment to analyse an assembly: nCrunch.TaskRunner.Ipc.IpcConnectionClosedException: The connection has been closed at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters ) at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client) at nCrunch.Core.TestManagement.TestRunnerProcess..() at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity) at nCrunch.Core.TestManagement.TestRunnerProcess.(Nullable1 , FilePath , GridClientId , CustomVariable[] ) at nCrunch.Core.TestManagement.TestRunnerProcess..() at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity) at nCrunch.Core.TestManagement.TestRunnerProcess.LoadTestRunnerProcessForProjectReturningProcessId(SnapshotComponent snapshotComponent, IList1 componentsInProcess, TestFrameworkDescription[] testingFrameworks, Nullable1 newProcessTag, FilePath solutionFilePath, GridClientId client, CustomVariable[] customEnvironmentVariables) at nCrunch.Core.Processing.AnalysisTaskLogic.DoProcessTaskAndReturnSuccessFlag()Reproduced with dotnet core 3.1 (same issue with 3.0): https://github.com/PavelA85/nCrunchReporduce NCrunch latest versionVisual studio 2019Any way to fix this issue? Back to top
 Remco #2 Posted : Tuesday, November 26, 2019 10:35:40 PM(UTC) Rank: NCrunch DeveloperGroups: Administrators Joined: 4/16/2011(UTC)Posts: 5,926Thanks: 773 timesWas thanked: 992 time(s) in 945 post(s) Hi, thanks for sharing this issue. I've reproduced it using your sample and concluded that it seems to be triggered by the specification of a win10-x64 RuntimeIdentifier in the targeted project.I'm not yet sure why this is the case. We're going to need to do more digging. We'll let you know when we have a solution available. Back to top 1 user thanked Remco for this useful post. TURNSKIN on 11/28/2019(UTC)
 dauciunas #3 Posted : Thursday, November 28, 2019 11:06:26 AM(UTC) Rank: NewbieGroups: Registered Joined: 11/28/2019(UTC)Posts: 1Location: Lithuania I'm also having the same issue. any ideas or suggestions or temporary workarounds would be most welcome! Back to top
 tekavec #4 Posted : Sunday, December 1, 2019 7:28:44 PM(UTC) Rank: NewbieGroups: Registered Joined: 12/1/2019(UTC)Posts: 2Location: SloveniaWas thanked: 1 time(s) in 1 post(s) The same here - I have NUnit test project targeting netcoreapp3.0, RuntimeIdentifier= win-x64 and Microsoft.NET.Test.Sdk = 16.4.0.I'm using NCrunch 4.1.0.1.Please could you notify me when a fix is available.Many thanks!Tomaz Back to top
 Remco #5 Posted : Monday, December 2, 2019 2:55:36 AM(UTC) Rank: NCrunch DeveloperGroups: Administrators Joined: 4/16/2011(UTC)Posts: 5,926Thanks: 773 timesWas thanked: 992 time(s) in 945 post(s) Back to top
 TURNSKIN #6 Posted : Monday, December 2, 2019 7:58:18 AM(UTC) Rank: MemberGroups: Registered Joined: 8/31/2015(UTC)Posts: 12Location: LithuaniaThanks: 4 timesWas thanked: 2 time(s) in 2 post(s) Hi,thank you for update.I am still getting error in my production solution.output: We found workaround for now:Code:win10-x64 We use conditional RuntimeIdentifier, that is applied only in CI pipeline Back to top
 TURNSKIN #7 Posted : Monday, December 2, 2019 8:05:21 AM(UTC) Rank: MemberGroups: Registered Joined: 8/31/2015(UTC)Posts: 12Location: LithuaniaThanks: 4 timesWas thanked: 2 time(s) in 2 post(s) When I migrated my production solution to dotnet core 3.1 I get this error:Code: System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file: The FrameworkReference 'Microsoft.NETCore.App' was not recognized The FrameworkReference 'Microsoft.AspNetCore.App' was not recognized at nCrunch.Compiler.ComponentAnalysisContext.() at nCrunch.Compiler.ComponentAnalysisContext.AnalyseComponentBuild() at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage ) at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data) at nCrunch.TaskRunner.Ipc.RemoteInstance.(Byte[] ) at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters) at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner ) at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action1 , FilePath , String , ExternalProcess ) at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList1 , Nullable1 , GridAddress ) at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList1 customEnvironmentVariables) at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String ) at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)  Back to top
 Remco #8 Posted : Tuesday, December 3, 2019 12:42:24 AM(UTC) Rank: NCrunch DeveloperGroups: Administrators Joined: 4/16/2011(UTC)Posts: 5,926Thanks: 773 timesWas thanked: 992 time(s) in 945 post(s) We've updated NCrunch with some better handling of the new implicit framework references that were introduced in .NET Core 3.0 (this fix didn't get included in the build published above). It's worth trying this build to see if it resolves both of the problems you're experiencing:NCrunch_Console_4.2.0.4.msiNCrunch_Console_4.2.0.4.zipNCrunch_GridNodeServer_4.2.0.4.msiNCrunch_GridNodeServer_4.2.0.4.zipNCrunch_LicenseServer_4.2.0.4.zipNCrunch_VS2008_4.2.0.4.msiNCrunch_VS2010_4.2.0.4.msiNCrunch_VS2010_4.2.0.4.zipNCrunch_VS2012_4.2.0.4.msiNCrunch_VS2012_4.2.0.4.zipNCrunch_VS2013_4.2.0.4.msiNCrunch_VS2013_4.2.0.4.zipNCrunch_VS2015_4.2.0.4.msiNCrunch_VS2015_4.2.0.4.msi.7zNCrunch_VS2015_4.2.0.4.zipNCrunch_VS2017_4.2.0.4.msiNCrunch_VS2017_4.2.0.4.msi.7zNCrunch_VS2017_4.2.0.4.zipNCrunch_VS2019_4.2.0.4.msiNCrunch_VS2019_4.2.0.4.msi.7zNCrunch_VS2019_4.2.0.4.zipAssuming this doesn't work, is there any chance you could extract a particular file for me from the 3.0 failure and submit it through the NCrunch contact form? Right-click on the failing project, go to Advanced and choose to browse to the workspace. Find the bin\debug folder (or your build output directory), then look for a file called nCrunch.TaskRunner.DotNetCore.20.x64.deps.json. This file contains the dependency data for your test environment and lately it's been the cause of these exceptions under .NET Core 3.0. If I can have a copy of this file there's a good chance I can establish the source of the failure.Regarding the .NET Core 3.1 issue ... We haven't done much in the way of testing with this framework yet, though it's still our goal to resolve issues encountered with it. The problem in this case looks like it might have a wider scope than NCrunch. Can you confirm that the project builds successfully using Visual Studio and MSBuild? I might need to get a code sample that can reproduce the issue if you're able to construct one. The problem is almost certainly dependency related and probably doesn't require any of your actual source code. Back to top
 TURNSKIN #9 Posted : Wednesday, December 4, 2019 8:17:19 AM(UTC) Rank: MemberGroups: Registered Joined: 8/31/2015(UTC)Posts: 12Location: LithuaniaThanks: 4 timesWas thanked: 2 time(s) in 2 post(s) By mistake I intalled NCrunch_Console_4.2.0.3.msi instead of NCrunch_VS2019_4.2.0.3.msiI have installed NCrunch_VS2019_4.2.0.3.msi and it works as expected, projects with Quote:win10-x64are build as expected.I will install NCrunch_VS2019_4.2.0.4.msi and get back if any issue is found. Back to top
 Remco #11 Posted : Wednesday, December 4, 2019 11:05:48 AM(UTC) Rank: NCrunch DeveloperGroups: Administrators Joined: 4/16/2011(UTC)Posts: 5,926Thanks: 773 timesWas thanked: 992 time(s) in 945 post(s) Thanks! We'll take a look at this and will get back to you. Back to top
 keith #12 Posted : Saturday, January 11, 2020 6:07:53 AM(UTC) Rank: NewbieGroups: Registered Joined: 12/24/2013(UTC)Posts: 9Location: AustraliaWas thanked: 1 time(s) in 1 post(s) Hello,I got the same error as in the original post after trying to build some existing code on a new machine for the first time. The solution built fine in Visual Studio but NCrunch was unable to build it.Turns out the issue was that I didn't have the required .NET SDK installed on the machine. I'd just done a fresh install of VS 2019 but needed to also install (in my case) the .NET Core 2.2 SDK as this is the one our project was targeting.Strange that VS could build it and NCrunch couldn't - but installing the SDK fixed it..https://dotnet.microsoft.com/download/dotnet-core Hope it helps someone. Back to top
 Remco #13 Posted : Saturday, January 11, 2020 8:24:29 AM(UTC) Rank: NCrunch DeveloperGroups: Administrators Joined: 4/16/2011(UTC)Posts: 5,926Thanks: 773 timesWas thanked: 992 time(s) in 945 post(s) Thanks Keith. I can offer some explanation for why NCrunch gave this error but VS didn't.The error is a generic exception thrown for when the task runner .EXE just disappears without any reason or error given. There are a multitude of things that can cause this. In the case of .NET Core, the error usually appears when NCrunch is trying to build a runtime environment for the specified framework. NCrunch has actually built your project just fine, the error likely appeaedr when it tried to launch an environment to discover your tests - which won't be something that VS does at build time. Back to top
 tekavec #14 Posted : Sunday, January 12, 2020 3:12:07 PM(UTC) Rank: NewbieGroups: Registered Joined: 12/1/2019(UTC)Posts: 2Location: SloveniaWas thanked: 1 time(s) in 1 post(s) I've tested the same solution that had issues with the latest 4.2.0.7 version and can confirm it solves the problem. Thanks a lot, guys!Tomaz Back to top 1 user thanked tekavec for this useful post. Remco on 1/12/2020(UTC)
 Users browsing this topic Guest
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.347 seconds.