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

Access is denied when run Visual Studio Test 2.* Task with Code Coverage enabled #940

Closed
acesiddhu opened this issue Jul 17, 2017 · 21 comments

Comments

@acesiddhu
Copy link
Contributor

From @nobitagamer on June 8, 2017 2:42

I'm trying to run a build inside a docker container, everything is ok except i can't enable Code Coverage feature because of below error.
Here is what i'm tried:

2017-06-07T08:58:03.1455639Z ##[warning]Overriding test run parameters is supported only with runsettings file. This option will be ignored. 2017-06-07T08:58:03.1620491Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" W:\_work\1\s\tests\FlexiCore.Tests\bin\Release\net452\FlexiCore.Tests.dll /Settings:W:\_work\_temp\6a1002e0-4b5f-11e7-a46c-47b345f25b7d.runsettings /EnableCodeCoverage /InIsolation /logger:trx "/TestAdapterPath:\"W:\_work\1\s\tests\"" 2017-06-07T08:58:03.1687666Z <RunSettings> 2017-06-07T08:58:03.1687666Z <RunConfiguration> 2017-06-07T08:58:03.1687666Z <MaxCpuCount>0</MaxCpuCount> 2017-06-07T08:58:03.1687666Z </RunConfiguration> 2017-06-07T08:58:03.1687666Z </RunSettings> 2017-06-07T08:58:04.1483998Z Microsoft (R) Test Execution Command Line Tool Version 15.0.26228.0 2017-06-07T08:58:04.1483998Z Copyright (c) Microsoft Corporation. All rights reserved. 2017-06-07T08:58:04.1483998Z 2017-06-07T08:58:04.6405259Z Starting test execution, please wait... 2017-06-07T08:58:08.3865000Z 2017-06-07T08:58:08.3922932Z Unhandled Exception: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ---> System.ServiceModel.FaultException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 2017-06-07T08:58:08.3922932Z 2017-06-07T08:58:08.3922932Z Server stack trace: 2017-06-07T08:58:08.3922932Z at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) 2017-06-07T08:58:08.3922932Z at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 2017-06-07T08:58:08.3922932Z at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 2017-06-07T08:58:08.3922932Z at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 2017-06-07T08:58:08.3922932Z 2017-06-07T08:58:08.3922932Z Exception rethrown at [0]: 2017-06-07T08:58:08.3922932Z at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) 2017-06-07T08:58:08.3922932Z at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Common.Interfaces.ITestRunEventSinkService.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow) 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Client.TestRunEventSinkProxy.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow) 2017-06-07T08:58:08.3922932Z --- End of inner exception stack trace --- 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Client.TestRunEventSinkProxy.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow) 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Client.DataCollectionClient.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow, IDataCollectionLog dataCollectionLog) 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Client.ParallelDataCollectionClient.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow, IDataCollectionLog dataCollectionLog) 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Client.Rocksteady.RocksteadyDataCollectionClient.<>c__DisplayClass12_1.<BeforeTestRunStart>b__0() 2017-06-07T08:58:08.3922932Z at Microsoft.VisualStudio.TestPlatform.Client.Rocksteady.RocksteadyDataCollectionClient.InvokeDataCollectionServiceAction(Action action, ITestMessageEventHandler runEventsHandler) 2017-06-07T08:58:08.3932919Z at Microsoft.VisualStudio.TestPlatform.Client.Rocksteady.RocksteadyDataCollectionClient.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow, ITestDataCollectionLogEventsHandler dataCollectionLogEventsHandler, ITestMessageEventHandler runEventsHandler) 2017-06-07T08:58:08.3932919Z at Microsoft.VisualStudio.TestPlatform.Client.TestRunRequest.ExecuteAsync() 2017-06-07T08:58:08.3932919Z at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentProcessor.RunTests(IEnumerable1 sources, String packageFullName, String deviceInfo, Boolean isPhoneAppx, Boolean isUniversalTestAppx)
2017-06-07T08:58:08.3932919Z at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentProcessor.Execute()
2017-06-07T08:58:08.3932919Z at Microsoft.VisualStudio.TestPlatform.CommandLine.Executor.Execute(String[] args)
2017-06-07T08:58:08.3932919Z at RockSteady.Program.Main(String[] args)
2017-06-07T08:58:09.5261035Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2017-06-07T08:58:09.5291957Z ##[error]Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe failed with return code: 3762504530
2017-06-07T08:58:09.5320068Z ##[warning]No results found to publish.
2017-06-07T08:58:09.5320068Z ##[error]Vstest exited with return code: 1.`

Copied from original issue: microsoft/azure-pipelines-tasks#4483

@acesiddhu
Copy link
Contributor Author

From @chrisrpatterson on June 8, 2017 12:7

I am pretty sure that not being able to run code coverage inside a container is a known issue and the test platform team is working on it.

@acesiddhu
Copy link
Contributor Author

From @nobitagamer on June 8, 2017 15:0

Thank you, good to know and hope they can resolve it.

@acesiddhu
Copy link
Contributor Author

From @kaadhina on June 16, 2017 6:29

@Shyam-Gupta

@acesiddhu
Copy link
Contributor Author

From @dpksinghal on July 5, 2017 4:31

Closing it. Please re-open if there is anything pending from our side.

@acesiddhu
Copy link
Contributor Author

From @dnperfors on July 5, 2017 6:51

Is there a link to an issue that we can track to see if and when it is solved?

@acesiddhu
Copy link
Contributor Author

From @AlexeyRokhin on July 5, 2017 8:33

We have the same issue inside docker container.
Sorry, I forgot to mention that we are using VS 2015.

@acesiddhu
Copy link
Contributor Author

From @dpksinghal on July 6, 2017 16:4

I am following up on this with the respective team. Will revert.

@acesiddhu
Copy link
Contributor Author

@smadala is taking a look.

@acesiddhu
Copy link
Contributor Author

From @smadala on July 13, 2017 10:26

Code Coveage is working fine with CodeCoverage.exe, Looks like issue with IntelliTrace. Both Fakes tests and Code coverage failed with same error and stacktrace. I'm following up with IntelliTrace team.
Following stacktrace can be observed in TPTrace logs.

E, 688, 5, 2017/07/13, 14:42:30.734, 1561971980, vstest.discoveryengine.x86.exe, System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
   at Microsoft.VisualStudio.Diagnostics.Logging.ProfilerInterop.IInteropInterface.ConstructMessageIPC2(String ipcName, UInt32 maxEntrySize, UInt32 numEntries, ILoggingConfig config)
   at Microsoft.VisualStudio.Diagnostics.Logging.QueuedIpcPipeServer..ctor(String pipeName, Int32 maxEntrySize, Int32 entries, LoggingConfig loggingConfig)
   at Microsoft.VisualStudio.TraceCollector.CommonDataCollector.InitiateCollection()
   at Microsoft.VisualStudio.TraceCollector.CommonDataCollector.GetEnvironmentVariables()
   at Microsoft.VisualStudio.TraceCollector.BaseDataCollector.Microsoft.VisualStudio.TestTools.Execution.ITestExecutionEnvironmentSpecifier.GetTestExecutionEnvironmentVariables()
   at Microsoft.VisualStudio.TestPlatform.TestRunnerService.DataCollectors.TestPlatformDataCollectorInfo.GetTestExecutionEnvironmentVariablesSync()
   at Microsoft.VisualStudio.TestPlatform.TestRunnerService.DataCollectors.DataCollectionPluginManager.GetEnvironmentVariables(Boolean& unloadedAnyCollector)
   at Microsoft.VisualStudio.TestPlatform.TestRunnerService.DataCollectors.DataCollectionPluginManager.LoadAndInitDataCollectors(DataCollectionRunSettings dataCollectionSettings, Boolean& allCollectorsLoaded)
   at Microsoft.VisualStudio.TestPlatform.TestRunnerService.DataCollectors.DataCollectionPluginManager.LoadDataCollectors(RunSettings testRunSettings, Boolean& allCollectorsLoaded)
   at Microsoft.VisualStudio.TestPlatform.TestRunnerService.WcfTestRunnerService.BeforeTestRunStart(String settingsXml, Boolean resetDataCollectors, Boolean isRunStartingNow)
   at SyncInvokeBeforeTestRunStart(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

@acesiddhu
Copy link
Contributor Author

From @AlexeyRokhin on July 13, 2017 10:38

@smadala
Where this log is located?

@acesiddhu
Copy link
Contributor Author

From @smadala on July 13, 2017 10:42

To enable logs follow this. Logs gets created in %TEMP% folder.

@smadala
Copy link
Contributor

smadala commented Jul 17, 2017

Tracking this issue internally here. With Milestone VS 15.4.

@AlexeyRokhin
Copy link

@smadala
Will the issue be fixed for VS 14 (2015)?

@smadala
Copy link
Contributor

smadala commented Jul 17, 2017

Will the issue be fixed for VS 14 (2015)?

Tagging @tzwlai @rajkumar42 @delmyers to provide info about this.

@tzwlai
Copy link
Member

tzwlai commented Jul 18, 2017

Our focus right now is fixing this in VS 2017. We would consider porting the fix back to VS 2015 if there's a strong business justification for it, but at this point it seems unlikely.

@AlexeyRokhin
Copy link

Was the issue fixed in VS 2017.3?

@tzwlai
Copy link
Member

tzwlai commented Aug 15, 2017

No, we don't have a fix yet.

@samasama
Copy link

Is this issue fixed in VS15.4 preview 2?

@tzwlai
Copy link
Member

tzwlai commented Sep 18, 2017

@sudiptadmsft @AbhitejJohn @smadala @codito

No, but we are testing a potential fix for 15.5.

@ckuetbach
Copy link

Is there a roadmap for this fix?

@samasama
Copy link

samasama commented Nov 10, 2017 via email

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

No branches or pull requests

8 participants