dyn365-ce-vsts-tasks icon indicating copy to clipboard operation
dyn365-ce-vsts-tasks copied to clipboard

Object reference not set to an instance of an object. in MSCRM Exports Solutions Using Config

Open aboodh95 opened this issue 4 years ago • 8 comments

Hi,

I was trying to use MSCRM Exports Solutions Using Config, but i'm getting an ##[error]Object reference not set to an instance of an object. This is the log of the operation

##[debug]Evaluating condition for step: 'MSCRM Exports Solutions Using Config' ##[debug]Evaluating: succeeded() ##[debug]Evaluating succeeded: ##[debug]=> True ##[debug]Result: True Starting: MSCRM Exports Solutions Using Config ============================================================================== Task : MSCRM Export Solutions Using Config Description : Exports Dynamics 365 Solutions using a json configuration Version : 9.0.4 Author : Wael Hamze Help : This task invokes ExportSolutionRequest ============================================================================== ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c ##[debug]Entering MSCRMExportSolutionsUsingConfig.ps1 ##[debug]INPUT_CRMCONNECTIONSTRING: '***' ##[debug]INPUT_CONFIGFILEPATH: 'C:\agent_work\10\s\ExportConfig.json' ##[debug]INPUT_OUTPUTPATH: 'C:\agent_work\10\b' ##[debug]INPUT_CRMCONNECTIONTIMEOUT: '120' ##[debug] Converted to int: 120 ##[debug]MSCRM Tools Path: C:\agent_work\tools\MSCRMBuildTools\9.1.0 ##[debug]Entering ExportSolutionsUsingConfig.ps1 ##[debug]CrmConnectionString = *** ##[debug]OutputFolder = C:\agent_work\10\b ##[debug]ConfigFilePath = C:\agent_work\10\s\ExportConfig.json ##[debug]Timeout = 120 ##[debug]Script Path: C:\agent_work\tools\MSCRMBuildTools\9.1.0\xRMCIFramework\9.0.0 ##[debug]Importing CIToolkit: C:\agent_work\tools\MSCRMBuildTools\9.1.0\xRMCIFramework\9.0.0\Xrm.Framework.CI.PowerShell.Cmdlets.dll ##[debug]Loading module from path 'C:\agent_work\tools\MSCRMBuildTools\9.1.0\xRMCIFramework\9.0.0\Xrm.Framework.CI.PowerShell.Cmdlets.dll'. ##[debug]Importing cmdlet 'Add-XrmEntity'. ##[debug]Importing cmdlet 'Add-XrmLanguagePack'. ##[debug]Importing cmdlet 'Add-XrmSolution'. ##[debug]Importing cmdlet 'Add-XrmSolutionPatch'. ##[debug]Importing cmdlet 'Compress-XrmCMData'. ##[debug]Importing cmdlet 'Expand-XrmCMData'. ##[debug]Importing cmdlet 'Expand-XrmSolution'. ##[debug]Importing cmdlet 'Compress-XrmSolution'. ##[debug]Importing cmdlet 'Get-XrmConnections'. ##[debug]Importing cmdlet 'Get-XrmSolutionMissingDependencies'.

and this is my json file

{ "Solutions": [ { "SolutionName": "ETSSecurityRoles", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": true, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSWebResources", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETS", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSPluginLibraries", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSXRMUtilitiesWorkflow", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSXRMAccountsWorkflow", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSXRMSFieldServiceWorkflow", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSXRMContractSalesOtherWorkflow", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSXrmWarehouseManagementWorkflow", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSProcess", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "WarehouseManagement", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true }, { "SolutionName": "ETSCanvasAppsFlows", "Managed": true, "TargetVersion": null, "ExportAutoNumberingSettings": false, "ExportCalendarSettings": false, "ExportCustomizationSettings": false, "ExportEmailTrackingSettings": false, "ExportExternalApplications": false, "ExportGeneralSettings": false, "ExportIsvConfig": true, "ExportMarketingSettings": false, "ExportOutlookSynchronizationSettings": false, "ExportRelationshipRoles": false, "ExportSales": false, "IncludeVersionInName": true } ] }

aboodh95 avatar Nov 12 '19 05:11 aboodh95

@aboodh95 can you please share the full log? I want to see at which point in the logs the error is happening

WaelHamze avatar Nov 12 '19 17:11 WaelHamze

@aboodh95 still having issues with this?

WaelHamze avatar Jan 07 '20 21:01 WaelHamze

Hi @WaelHamze,

Yes, I'm still getting the error, it did export 4 out of 11

aboodh95 avatar Jan 15 '20 09:01 aboodh95

@aboodh95 can you run the pipeline with variable system.debug = true and share the full logs for this task? (take out any confidential info)

WaelHamze avatar Jan 15 '20 21:01 WaelHamze

@WaelHamze Log Content pipline.log Export Configuration JSON ExportConfig.txt (the file is JSON but I was not able to upload it as JSON so I change it to txt)

aboodh95 avatar Jan 16 '20 05:01 aboodh95

@WaelHamze , I found the issue of this error, can you add a checker if the solution exists, as the problem was I have a typo in ETSXRMSFieldServiceWorkflow so the solution was not founded

aboodh95 avatar Feb 19 '20 06:02 aboodh95

@WaelHamze Even if the JSON tags have no value you will get this error

saiankith-explorer avatar Jul 20 '20 06:07 saiankith-explorer

@saiankith-explorer please provide an example of the json tags you are referring to

WaelHamze avatar Jul 20 '20 06:07 WaelHamze