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

Notification

Icon
Error

NCrunch with Team City "The server process could not be started because the configured identity..."
willcowell
#1 Posted : Wednesday, May 20, 2015 9:49:46 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/19/2015(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
I have followed the instructions in Console Tool Usage for setting up a new CI build using NCrunch Console with Team City. NCrunch Console successfully runs on my local machine and generates the coverage report, but it fails on the CI.

On the CI, the builds succeed, however, the tests all fail to run. For each test, I get the following error:

Quote:
The server process could not be started because the configured identity is incorrect


I have tried running the Team City build agent running as a specific user with admin rights or as Local Service (with access to modify the desktop) but both fail.

Any ideas would be appreciated.
Remco
#2 Posted : Wednesday, May 20, 2015 12:11:32 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue.

Can you give any more details about where you see these test errors? Are they showing in the NCrunch coverage report? Or is this TeamCity reporting the error for each individual test?

If you look at the build log, what is the pattern about how the error is thrown? It seems like a strange error to appear in the launching of host processes for test runs.
willcowell
#3 Posted : Wednesday, May 20, 2015 12:37:31 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/19/2015(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
Hi, thanks for the prompt response.

The error is in the build log. Here's a more detailed extract from the build log:

Code:
[Step 1/1] NCrunch: ATT.Win8.ott.Tests
[10:33:51][NCrunch: ATT.Win8.ott.Tests] C:\Users\devuser\AppData\Local\NCrunch\3912\13\_ncrunchreferences\Telerik.JustMock.dll (0): The assembly "C:\Users\devuser\AppData\Local\NCrunch\3912\13\_ncrunchreferences\Telerik.JustMock.dll" does not have a NeutralResourcesLanguageAttribute on it. To be used in an app package, portable libraries must define a NeutralResourcesLanguageAttribute on their main assembly (ie, the one containing code, not a satellite assembly).
[10:33:51][NCrunch: ATT.Win8.ott.Tests]  (0): NCrunch: This project has been built with MSBuild v12.0 because MSBuild v14.0 was not found on this server.  Some build tasks may fail when not executed using the correct version of MSBuild.
[10:33:51][NCrunch: ATT.Win8.ott.Tests] 
[10:33:52][Step 1/1] [10:33:52.2824-Core-10] Queuing 22 tests for passive execution
[10:34:51][Step 1/1] [10:34:51.5513-LocalTestExecutionTask-7] System.Runtime.InteropServices.COMException (0x8000401A): The server process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A)
[10:34:51][Step 1/1]    at nCrunch.DotNET451.IPackageDebugSettings.EnableDebugging(String packageFullName, String debuggerCommandLine, IntPtr environment)
[10:34:51][Step 1/1]    at  . (String  , WindowsStoreProcessExecutable  )
[10:34:51][Step 1/1]    at  .CreateProcess(ProcessExecutable  , FilePath  )
[10:34:51][Step 1/1]    at nCrunch.Core.ProcessManagement.ProcessFactory.CreateProcess(IProcessLoader processLoader, ProcessExecutable executable, FilePath proxyProcessFilePath)
[10:34:51][Step 1/1]    at nCrunch.Core.ProcessManagement.ExternalProcessManager. (ProcessorArchitecture  , ProcessLoadParameters  )
[10:34:51][Step 1/1]    at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client)
[10:34:51][Step 1/1]    at nCrunch.Core.TestManagement.TestRunnerProcess. (Boolean  , FilePath  , GridClientId  , CustomEnvironmentVariable[]  )
[10:34:51][Step 1/1]    at nCrunch.Core.Processing.TestExecutionTaskLogic.DoProcessTaskAndReturnSuccessFlag()
Remco
#4 Posted : Wednesday, May 20, 2015 1:17:43 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for the extra details.

It looks like the console tool is failing to initialise the Windows Store app container due to an identity/security problem. Note that the error messages around windows store apps can be extremely misleading - there may well be something else wrong with the environment that is preventing the container from initialising. Unfortunately, because the error is coming from the Windows Store sandboxing code (part of Windows 8), my own ability to troubleshoot this for you is extremely limited.

What can you tell me about the machine that is running these tests? Which version of Windows is it running? Is the machine capable of running Windows Store applications? Does it have Visual Studio installed?
willcowell
#5 Posted : Wednesday, May 20, 2015 1:23:01 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/19/2015(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
The machine is running Windows 8.1 and has Visual Studio installed. We're using Team City 9.0.1. We have existing build configurations running CI and CD using MSTest against the same solution. My goal is to replace the existing CI step with NCrunch so that the team can get coverage metrics.
Remco
#6 Posted : Wednesday, May 20, 2015 1:31:08 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
What sort of result do you see on this machine if you try running the console tool manually outside of the CI?

I realise you've already tried running the CI server under a local admin account - is this the same account you are using when you log into the server to perform actions on the desktop? If not, does setting it up with this user make any difference?
willcowell
#7 Posted : Thursday, May 21, 2015 12:47:17 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/19/2015(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
The tests all pass when remote desktoping as "devuser" (the same user that runs Team City build agent service) onto the machine on which Team City is installed and running manually.
Remco
#8 Posted : Thursday, May 21, 2015 10:23:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Right - so it must require the user to be logged into the system in order to allow the sandbox to operate.

I've found something related to this issue, though the solution was recommended prior to MS implementing the Windows Store applications - https://support.microsoft.com/en-us/kb/305761/.

Unfortunately I'm not an expert on the Windows Store sandbox, and I'm not sure if such a person exists outside of MS. It's entirely possible the only way to work around this problem would be to ensure that the identified user is logged into the server at the time the test is run. This could be through an RDP session that has been left logged in, or possibly through a desktop user on the server itself. I realise this is messy, but there are few things about the implementation of the app container that are tidy from a tools development standpoint. The environment is extremely constrained and the O/S often will give very little useful information about problems that appear within it.
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.048 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download