Skip to content

[Bug]: Failed to synchronize processes - System.ArgumentNullException: Value cannot be nullΒ #3086

@tiwarishrijan

Description

@tiwarishrijan

Version

  • I confirm that I am using the latest version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

{
    "$schema": "https://devopsmigration.io/schema/configuration.schema.json",
    "Serilog": {
        "MinimumLevel": "Debug"
    },
    "MigrationTools": {
        "Version": "16.3",
        "Endpoints": {
            "AzureDevOpsEndpointSource": {
                "EndpointType": "AzureDevOpsEndpoint",
                "AuthenticationMode": "AccessToken",
                "AccessToken": "***",
                "Organisation": "https://dev.azure.com/xxxxxxxxxxxxxx",
                "Project": "TeamChat",
                "ReflectedWorkItemIdField": "Microsoft.VSTS.Build.IntegrationBuild"
            },
            "AzureDevOpsEndpointTarget": {
                "EndpointType": "AzureDevOpsEndpoint",
                "AuthenticationMode": "AccessToken",
                "AccessToken": "***",
                "Organisation": "https://dev.azure.com/xxxxxxxxxxxxxx",
                "Project": "AZDO_MIGRATION_xx",
                "ReflectedWorkItemIdField": "Microsoft.VSTS.Build.IntegrationBuild"
            },
            "TfsTeamProjectEndpointSource": {
                "EndpointType": "TfsTeamProjectEndpoint",
                "Collection": "https://dev.azure.com/xxxxxxxxxxxxxx",
                "Project": "TeamChat",
                "Authentication": {
                    "AuthenticationMode": "AccessToken",
                    "AccessToken": "***"
                },
                "ReflectedWorkItemIdField": "Microsoft.VSTS.Build.IntegrationBuild",
                "LanguageMaps": {
                    "AreaPath": "Area",
                    "IterationPath": "Iteration"
                }
            },
            "TfsTeamProjectEndpointTarget": {
                "EndpointType": "TfsTeamProjectEndpoint",
                "Collection": "https://dev.azure.com/xxxxxxxxxxxxxx",
                "Project": "AZDO_MIGRATION_xx",
                "Authentication": {
                    "AuthenticationMode": "AccessToken",
                    "AccessToken": "***"
                },
                "ReflectedWorkItemIdField": "Microsoft.VSTS.Build.IntegrationBuild",
                "LanguageMaps": {
                    "AreaPath": "Area",
                    "IterationPath": "Iteration"
                }
            },
            "TfsTeamSettingsEndpointSource": {
                "EndpointType": "TfsTeamSettingsEndpoint",
                "Collection": "https://dev.azure.com/xxxxxxxxxxxxxx",
                "Project": "TeamChat",
                "Authentication": {
                    "AuthenticationMode": "AccessToken",
                    "AccessToken": "***"
                },
                "ReflectedWorkItemIdField": "Microsoft.VSTS.Build.IntegrationBuild",
                "LanguageMaps": {
                    "AreaPath": "Area",
                    "IterationPath": "Iteration"
                }
            },
            "TfsTeamSettingsEndpointTarget": {
                "EndpointType": "TfsTeamSettingsEndpoint",
                "Collection": "https://dev.azure.com/xxxxxxxxxxxxxx",
                "Project": "AZDO_MIGRATION_xx",
                "Authentication": {
                    "AuthenticationMode": "AccessToken",
                    "AccessToken": "***"
                },
                "ReflectedWorkItemIdField": "Microsoft.VSTS.Build.IntegrationBuild",
                "LanguageMaps": {
                    "AreaPath": "Area",
                    "IterationPath": "Iteration"
                }
            }
        },
        "Processors": [
            {
                "ProcessorType": "ProcessDefinitionProcessor",
                "Enabled": true,
                "UpdateProcessDetails": true,
                "Processes": {
                    "Team-Chat Agile": [
                        "Bug",
                        "Epic",
                        "Feature",
                        "User Story"
                    ]
                },
                "ProcessMaps": {
                    "Team-Chat Agile": "Team-Chat Agile"
                },
                "SourceName": "AzureDevOpsEndpointSource",
                "TargetName": "AzureDevOpsEndpointTarget"
            },
            {
                "ProcessorType": "TfsWorkItemMigrationProcessor",
                "Enabled": false,
                "UpdateCreatedDate": true,
                "UpdateCreatedBy": true,
                "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN (\u0027Test Suite\u0027, \u0027Test Plan\u0027,\u0027Shared Steps\u0027,\u0027Shared Parameter\u0027,\u0027Feedback Request\u0027) ORDER BY [System.ChangedDate] desc",
                "FixHtmlAttachmentLinks": true,
                "WorkItemCreateRetryLimit": 5,
                "FilterWorkItemsThatAlreadyExistInTarget": false,
                "GenerateMigrationComment": true,
                "SkipRevisionWithInvalidAreaPath": true,
                "SkipRevisionWithInvalidIterationPath": true,
                "SourceName": "TfsTeamProjectEndpointSource",
                "TargetName": "TfsTeamProjectEndpointTarget"
            },
            {
                "ProcessorType": "AzureDevOpsPipelineProcessor",
                "Enabled": false,
                "MigrateBuildPipelines": true,
                "MigrateReleasePipelines": true,
                "MigrateServiceConnections": true,
                "MigrateTaskGroups": true,
                "MigrateVariableGroups": true,
                "RepositoryNameMaps": {
                    "*": "*"
                },
                "SourceName": "AzureDevOpsEndpointSource",
                "TargetName": "AzureDevOpsEndpointTarget"
            },
            {
                "ProcessorType": "TfsTeamSettingsProcessor",
                "Enabled": false,
                "MigrateTeamCapacities": true,
                "MigrateTeamSettings": true,
                "UpdateTeamSettings": true,
                "SourceName": "TfsTeamSettingsEndpointSource",
                "TargetName": "TfsTeamSettingsEndpointTarget"
            }
        ],
        "CommonTools": {
            "TfsTeamSettingsTool": {
                "Enabled": true,
                "MigrateTeamCapacities": true,
                "MigrateTeamSettings": true,
                "UpdateTeamSettings": true
            },
            "TfsGitRepositoryTool": {
                "Enabled": true,
                "Mappings": {}
            },
            "FieldMappingTool": {
                "Enabled": true,
                "FieldMaps": [],
                "FieldMapDefaults": {
                    "ApplyTo": [
                        "*"
                    ]
                }
            },
            "WorkItemTypeMappingTool": {
                "Enabled": true,
                "Mappings": {}
            },
            "TfsWorkItemEmbededLinkTool": {
                "Enabled": true
            },
            "TfsWorkItemLinkTool": {
                "Enabled": true,
                "FilterIfLinkCountMatches": true,
                "SaveAfterEachLinkIsAdded": false
            },
            "TfsWorkItemTypeValidatorTool": {
                "Enabled": true
            },
            "TfsAttachmentTool": {
                "Enabled": true
            },
            "TfsNodeStructureTool": {
                "Areas": {
                    "Filters": [
                        "*/**"
                    ],
                    "Mappings": []
                },
                "Enabled": true,
                "Iterations": {
                    "Filters": [
                        "*/**"
                    ],
                    "Mappings": []
                },
                "ReplicateAllExistingNodes": true,
                "ShouldCreateMissingRevisionPaths": true
            }
        }
    }
}

Relevant log output

[13:57:43 INF] [16.3.3] Beginning run of 1 processors 
[13:57:43 INF] [16.3.3] Processor: ProcessDefinitionProcessor 
[13:57:43 INF] [16.3.3] Migration Context Start: ProcessDefinitionProcessor  
[13:57:43 INF] [16.3.3] Processor::InternalExecute::Start 
[13:57:43 INF] [16.3.3] Processor::EnsureConfigured 
[13:57:44 DBG] [16.3.3] Loading model for [AzureDevOpsEndpointSource]. 
[13:57:44 DBG] [16.3.3] Loading model for [AzureDevOpsEndpointTarget]. 
[13:58:11 INF] [16.3.3] Source and target data models established. 
[13:58:11 INF] [16.3.3] Synchronizing organization level fields. 
[13:58:11 INF] [16.3.3] Starting sync of process [Team-Chat Agile] in [AzureDevOpsEndpointSource]. 
[13:58:11 INF] [16.3.3] 1 of 1 ProcessDefinition(s) got migrated.. 
[13:58:11 INF] [16.3.3] Created target ProcessDefinition entry for [Team-Chat Agile] in [AzureDevOpsEndpointTarget] 
[13:58:11 ERR] [16.3.3] Error migrating WorkItemBehavior: Stories. Please migrate it manually. 
Url: POST https://dev.azure.com/TARGET_ORG/_apis/work/processes/xxxxxxxxxxxxxxxxxxxxxxxxxx/behaviors
{"$id":"1","innerException":null,"message":"You must provide a value for the behavior parameter.","typeName":"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common","typeKey":"VssPropertyValidationException","errorCode":0,"eventId":3000} 
[13:58:11 INF] [16.3.3] 0 of 1 WorkItemBehavior(s) got migrated.. 
[13:58:11 ERR] [16.3.3] Failed to synchronize processes. 
System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at MigrationTools.Processors.ProcessDefinitionProcessor.<SyncDefinitionType>d__24`1.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 456
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at MigrationTools.Processors.ProcessDefinitionProcessor.<SyncProcess>d__22.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 172
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MigrationTools.Processors.AsyncExt.<>c__DisplayClass0_0`1.<<ParallelForEachAsync>g__AwaitPartition|0>d.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 644
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MigrationTools.Processors.ProcessDefinitionProcessor.<Synchronize>d__21.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 149
[13:58:11 FTL] [16.3.3] Error while running ProcessDefinitionProcessor 
System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at MigrationTools.Processors.ProcessDefinitionProcessor.<SyncDefinitionType>d__24`1.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 456
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at MigrationTools.Processors.ProcessDefinitionProcessor.<SyncProcess>d__22.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 172
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MigrationTools.Processors.AsyncExt.<>c__DisplayClass0_0`1.<<ParallelForEachAsync>g__AwaitPartition|0>d.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 644
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MigrationTools.Processors.ProcessDefinitionProcessor.<Synchronize>d__21.MoveNext() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 154
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MigrationTools.Processors.ProcessDefinitionProcessor.InternalExecute() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.Rest\Processors\ProcessDefinitionProcessor.cs:line 91
   at MigrationTools.Processors.Infrastructure.Processor.Execute() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools\Processors\Infrastructure\Processor.cs:line 96
[13:58:41 INF] [16.3.3] ProcessDefinitionProcessor completed in 00:00:58.0730314  
[13:58:41 ERR] [16.3.3] ProcessDefinitionProcessor The Processor MigrationEngine entered the failed state...stopping run 
[13:58:41 INF] [16.3.3] Command ExecuteMigrationCommand completed in "00:00:59.2029557" 
[13:58:41 INF] [16.3.3] Check the logs for errors: C:\tools\MigrationTools\logs\20251223135739

What happened?

When executing ProcessDefinitionProcessor it seems its failing to put behaviours in target organization.

Debug in Visual Studio

  • Visual Studio Debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions