OpsHub User Mapping Error - azure-devops

I'm using the OpsHub Visual Studio Online Migration tool to migrate a TFS2010 project (source code only) to Visual Studio online. On the user mapping screen, I made my mappings (most to anonymous, but a few key users with mappings) and off it went. After a while I got the following:
249/410 Changeset(s)/Label(s) passed
1/410 Changeset(s)/Label(s) pending for retry
When I view the errors, I see this:
OH-SCM-009: Error occurred while sync. TF14045: The identity XYZ, Bruce (USHQ) is not a recognized identity.
Bruce is one of the users I mapped. I went back in to update the migration to see what I can do.
I tried removing the "XYZ, Bruce (USHQ) -- XYZ, Bruce (USHQ)" mapping and re-adding it and then retrying. Same error.
I then tried removing the mapping and mapping to anonymous. It seemed to accept this, but got the same error on retry. I noticed then that the mapping was back to "XYZ, Bruce (USHQ) -- XYZ, Bruce (USHQ)" and I can't seem to make it anonymous. This is true for any users that appear in both lists (TFS Users and VSO users).
Other users are mapping correctly from what I can tell.
My best case would be to correctly map this user. Next would be to map it to anonymous.
Any advice would be appreciated.
Below is the error in the log:
2015-06-09 07:51:56,022 [3] ERROR Error occured in thread of CheckinAll:TF14045: The identity XYZ, Bruce (USHQ) is not a recognized identity.
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.HandleReply(TfsClientOperation operation, TfsMessage message, Object[]& outputs)
at Microsoft.TeamFoundation.VersionControl.Client.Repository5.CheckIn(String workspaceName, String ownerName, String[] serverItems, Changeset info, CheckinNotificationInfo checkinNotificationInfo, Int32 checkinOptions, Failure[]& conflicts, Failure[]& failures, Boolean deferCheckIn, Int32 checkInTicket, Int32 maxClientPathLength)
at Microsoft.TeamFoundation.VersionControl.Client.WebServiceLayerLocalWorkspaces.CheckIn(String workspaceName, String ownerName, String[] serverItems, Changeset info, CheckinNotificationInfo checkinNotificationInfo, Int32 checkinOptions, UploadedBaselinesCollection uploadedBaselinesCollection, Failure[]& conflicts, Failure[]& failures, Boolean deferCheckIn, Int32 checkInTicket)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PagedCheckin(IEnumerable`1 changes, Boolean changesIsAllPendingChanges, Changeset changeset, CheckinNotificationInfo checkinNotificationInfo, CheckInOptions2 checkinOptions, UploadedBaselinesCollection uploadedBaselinesCollection, Failure[]& conflictsArray, Failure[]& failuresArray)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.CheckInInternal(WorkspaceCheckInParameters parameters, Int32 operationId)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.CheckIn(WorkspaceCheckInParameters checkinParameters)
at Service.Adapters.TFSCheckinWorkspaceContext.checkin(String comment, WorkItemCheckinInfo[] workItemChanges, List`1 otherCheckInProperties, String checkinUser) in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSCheckinWorkspaceContext.cs:line 2579
at Service.Adapters.TFSVCAdapter.checkIn(List`1 checkinItems, String checkinComment, String checkinUser, List`1 workitemId, List`1 otherCheckInProperties) in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSVCAdapter.cs:line 125
at com.opshub.tfs.test.TFSWebService.<>c__DisplayClass2.<CheckInAll>b__0() in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSWebService.cs:line 760
2015-06-09 07:51:56,024 [3] ERROR Error : TF14045: The identity XYZ, Bruce (USHQ) is not a recognized identity.

Related

Visual Studio Test task fails randomly without error message, Exit code 1 returned from process: node.exe

We have this issue that has been plaguing our engineering group for over a year and we cannot make any progress on the resolution. This question on Stack Overflow is eerily similar to what we experience.
We have several pipelines that use the "Visual Studio Test" task to run a set of NUnit tests from a single assembly. There are 1400-1500 unit tests in the project and it takes The NUnit Test Adapter is deployed via the NuGet task (install NUnit3TestAdapter). This test assembly is built with the following settings:
MSBuild Architecture=x86
Platform=AnyCPU
Configuration=Release
Strong Name Signed
Across multiple pipelines, this step randomly yet consistently ends early with zero error message or trace of why the process ended. Running a subsequent build of the pull request will often result in a success but occasionally another failure. In this case we have coined this a "flaky build" where given the same exact code inputs, the build can fail and then subsequently pass.
This is the only error message we received from the pipeline:
##[error]Exit code 1 returned from process: file name 'REDACTED\externals\node\bin\node.exe', arguments '"REDACTED_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.170.1\runvstest.js"'.
Finishing: Integration Tests
These tests are our "integration tests" that perform many setup steps to create a functional version of our system including creating a web server via Kestrel to host our API, connect to (localdb) running on the build server to restore a database .bak file and apply a database project (dacpac) as well as connect to Redis (also installed locally on the build server).
We are struggling to determine next steps so I am reaching out to the community to see if anyone else has suffered through this issue, has ideas for how to debug the issue or perhaps even a solution!
edit on 2020-11-10
Yesterday I set the pipeline variable system.debug to true and this is the output it captured during one of our flaky builds.
##[error\]Exit code 1 returned from process: file name 'E:\\servername\\externals\\node\\bin\\node.exe', arguments '"E:\\servername\\\_work\\\_tasks\\VSTest\_ef087383-ee5e-42c7-9a53-ab56c98420f9\\2.170.1\\runvstest.js"'.
##[debug\]Microsoft.VisualStudio.Services.Agent.Util.ProcessExitCodeException: Exit code 1 returned from process: file name 'E:\\servername\\externals\\node\\bin\\node.exe', arguments '"E:\\servername\\\_work\\\_tasks\\VSTest\_ef087383-ee5e-42c7-9a53-ab56c98420f9\\2.170.1\\runvstest.js"'.
at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary\`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue\`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary\`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue\`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary\`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.NodeHandler.RunAsync()
at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync()
at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)

Azure Devops Pipeline Environment Resource Agent installation issue

I have been trying to add an environment resource to our pipeline in azure devops but every time i install it with the powershell script they provide it asks me for tags. If i don't want to input tags it errors. If i choose to put in tags it errors. Either way it starts over every time and it will never successfully install. Anyone know if this is something on my end or on their end? I looked through the diagnostic file and the exceptions it is logging look like it's something that i can't fix but i have been having issues with this for over a week and thinking it was something that Microsoft would realize and patch. Now i'm wondering if there is something else i can do?
[2020-05-22 13:01:48Z ERR VisualStudioServices] POST request to https://DEVOPS_URL/24cca667-60da-4ba2-a323-4e05c46f3309/_apis/pipelines/environments/3/providers/virtualmachines failed. HTTP Status: InternalServerError, AFD Ref: Ref A: 56C7161B437D41698EBBDE7ACBF4CAA2 Ref B: ATAEDGE0918 Ref C: 2020-05-22T13:01:48Z
[2020-05-22 13:01:48Z INFO CommandSettings] Flag 'unattended': 'False'
[2020-05-22 13:01:48Z ERR Terminal] WRITE ERROR (exception):
[2020-05-22 13:01:48Z ERR Terminal] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: TF400898: An Internal Error Occurred. Activity Id: acb8a36a-e602-4988-b3f7-8fbeecd729e0.
---> System.NullReferenceException: TF400898: An Internal Error Occurred. Activity Id: acb8a36a-e602-4988-b3f7-8fbeecd729e0.
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpMethod method, IEnumerable1 additionalHeaders, Guid locationId, Object routeValues, ApiResourceVersion version, HttpContent content, IEnumerable1 queryParameters, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider.AddAgentAsync(AgentSettings agentSettings, TaskAgent agent, CommandSettings command)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command)
I was experiencing a similar error "Failed to add virtual machine resource. Linked environment pool is null."
Answer from Kevin Ross here: https://developercommunity.visualstudio.com/t/addition-of-resource-to-environment-fails-for-user/1048111
I resolved my error by following the below steps:
Get the deployment pool ID from the environment URL
Find the deployment pool settings in the organization settings and navigate to the correct pool based on ID from step 1
From the deployment pool settings, go to security and add the required user to administrator role or whatever role is required

Visual Studio Online Migration Utility fails with TF400023

Update OpsHub has published an update to their utility that fixes the problem I encountered.
I am trying to migrate an on-premises Team Foundation Server 2010 to Visual Studio online using the OpsHub Visual Studio Online migration utility. It has successfully uploaded 1380 of 6585 change sets, but is stuck on one of them and will not continue. The error message for the problematic change set:
Changeset ID: 1417
OH-SCM-009: Error occurred while sync. TF400023: The local workspace could not be reconciled with the server.
If I open the TFS workspace in Visual Studio (by browsing to O:\w69_1), I get a very similar error message in a popup window:
Error
TF400023: The local workspace could not be reconciled with the server.
The Visual Studio Source Control console displays a dozen repetitions of the following error message:
TF14060: The item $/EDT/SingleProjectClient/Data cannot be deleted. One or more children have pending changes.
Browsing through the pending changes in the workspace, it is clear that $/EDT/SingleProjectClient/Data/AllProjects.sdf has a pending "merge, delete" change.
The "merge, delete" change was present in the original change set made on the on-premises team foundation server. The problematic changeset ID 1417 contains the following changes:
$/EDT/SingleProjectClient/Data: delete
$/EDT/SingleProjectClient/Data/AllProjects.sdf: merge, delete
I have tried to undo the pending change on $/EDT/SingleProjectClient/Data/AllProjects.sdf, but that doesn't help. The migration utility continues to issue the same error message (TF400023: the local workspace could not be reconciled with the server).
Stack trace from OpsHubTFSService.log
2015-02-06 12:16:47,834 [5] ERROR Error occured in thread of CheckinAll:TF400023: The local workspace could not be reconciled with the server.
at Microsoft.TeamFoundation.VersionControl.Client.LocalDataAccessLayer.<>c__DisplayClass23.b__1c(LocalWorkspaceProperties
wp, WorkspaceVersionTable lv, LocalPendingChangesTable pc)
at Microsoft.TeamFoundation.VersionControl.Client.LocalWorkspaceTransaction.Execute(AllTablesTransaction toExecute)
at Microsoft.TeamFoundation.VersionControl.Client.LocalDataAccessLayer.ReconcileLocalWorkspace(Workspace workspace, WebServiceLayer webServiceLayer, Boolean unscannedReconcile, Boolean reconcileMissingFromDisk, Failure[]& failures, Boolean& pendingChangesUpdatedByServer)
at Microsoft.TeamFoundation.VersionControl.Client.WebServiceLayerLocalWorkspaces.ReconcileIfLocal(String workspaceName, String ownerName, Boolean unscannedReconcile, Boolean reconcileMissingLocalItems, Boolean skipIfAccessDenied, Boolean& reconciled)
at Microsoft.TeamFoundation.VersionControl.Client.WebServiceLayerLocalWorkspaces.CheckPendingChanges(String workspaceName, String ownerName, String[] serverItems)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.EvaluateCheckin2(CheckinEvaluationOptions options, IEnumerable&grave;1 allChanges, IEnumerable`1 changes, String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] workItemChanges)
at Service.Adapters.TFSCheckinWorkspaceContext.EvaluateCheckIn(List`1 changesToCommit, String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] workItemChanges) in f:\Ashish Docs\Checkouts\OVSMU Branch\OpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSCheckinWorkspaceContext.cs:line 2392
at Service.Adapters.TFSCheckinWorkspaceContext.checkin(String comment, WorkItemCheckinInfo[] workItemChanges, List&grave;1 otherCheckInProperties, String checkinUser) in f:\Ashish Docs\Checkouts\OVSMU Branch\OpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSCheckinWorkspaceContext.cs:line 2344
at Service.Adapters.TFSVCAdapter.checkIn(List&grave;1 checkinItems, String checkinComment, String checkinUser, List&grave;1 workitemId, List`1 otherCheckInProperties) in f:\Ashish Docs\Checkouts\OVSMU Branch\OpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSVCAdapter.cs:line 123
at com.opshub.tfs.test.TFSWebService.<>c__DisplayClass2.b__0() in f:\Ashish Docs\Checkouts\OVSMU Branch\OpsHubV2\TFSWCFServiceSource\Service\Service\TFSWebService.cs:line 692
If your server was ever TFS 2005/8 you can be in the situation that a past merge delete never completed.
In 2005/2008 if you had both updates and deleted in a single operation you had to do two checkins to complete the merge. However the UI to tell you that was only introduced in 2008 SP1 (AFAIR).
I have run into this issue all the time with Timely Migration and TFS Integration Tools. And as the merge was never completed your code bow relies (or possibly does) on the current setup. In the aforementioned tools I would edit the incoming migration data to remove knowledge of the pend-deleted and allow the tool to proceed.
The OpsHub tool is not good with corner cases and you may need OpsHub to show you how to resolve with their tool.

OpsHub VSO migration - DataValidationException - Test Suite already exists

During an OpsHub migration from local TFS 2013.3 server to VSO, I receive an error message from OpsHub:
com.opshub.exceptions.DataValidationException: OpbsHug-012017: Field mapping with name: Migrate Work Items and Version Control Data Migrate Work Items and Version Control Data | TFS Source 1211589216815 ALM TFS 1211589216816 'All' Test Suite already exists
This only occurs when trying to migrate work items. Code migration works fine on its own. Stack trace from log file shown below:
Exception rethrown at [0]:
at TFSMigrationUI.ViewModel.MigrationSummeryViewModel.createConfigWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in e:\5.7Checkout\VSMUTFSMigration\TFSMigrationUI\ViewModel\MigrationSummeryViewModel.cs:line 635
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
2014-09-24 16:07:30,517 [1] ERROR com.opshub.exceptions.DataValidationException: OpsHub-012017: Field mapping with name : Migrate Work Items and Version Control Data Migrate Work Items and Version Control Data| TFS Source 1411589216815 ALM TFS 1411589216816 'All' Test Suite already exists
System.ServiceModel.FaultException: com.opshub.exceptions.DataValidationException: OpsHub-012017: Field mapping with name : Migrate Work Items and Version Control Data Migrate Work Items and Version Control Data| TFS Source 1411589216815 ALM TFS 1411589216816 'All' Test Suite already exists
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
As per the error message and information provided it looks like you are using TFS 2013 update 3 which is currently not supported by free migration utility. We will update you on same thread once we have support for this tfs version.
Thanks,
OpsHub

Error publishing an asp 3.5 app

Well, I'm here to ask about some problem I have, the detail is that when I publish the application from my computer to the server folder and after make the changes in IIS when I try to browse the web app I get the next error:
Index and length must refer to a location within the string.
Parameter name: length
In my local computer, I installed Visual Studio 2008 with SP1 and in the server is not installed only Framework 3.5.
Is the error related with Entity Framework or it's another problem?
Well, I hope you could help me... regards !
Stack Trace:
[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7495179
System.String.Substring(Int32 startIndex, Int32 length) +11
InnovaWebSite.Global.Session_Start(Object sender, EventArgs e) in C:\Users\cvelazquezt\Desktop\InnovaWeb\InnovaWebSite\Global.asax.cs:117
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +8783312
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +237
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +504
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
The error thrown is from a substring operation. Where it is actually being thrown, I have no clue, as you have not actually posted the stack trace on the error. This could be because you don't know how to do this?
If you can find the stack trace, or even detail your code that gets pieces of a string, you will have a better context of the exception and be able to start doing something to cure it.
As for root cause, the fact it is only happening after publish indicates a) something is missing on the server or b) the server is configured incorrectly (wrong version of .NET for the app pool for example) or c) you have not correctly published the site (maybe copied from your compiled application rather than published and moved the published version over, etc.???)