Our automated deployment of a CRM Solution file started failing with this error recently:
"importjob With Id = feb7b87f-1ff9-4914-ba14-0116ca959584 Does Not Exist"
It was quite a journey to find out what was causing the error.
We automate the deployment of our CRM solutions using the Build/Release processes in Visual Studio Team Services (VSTS). In short the process looks like this:
“importjob With Id = feb7b87f-1ff9-4914-ba14-0116ca959584 Does Not Exist”
As you can see from the logs, the import gets kicked off and then fails within a couple of minutes with the ‘import job does not exist’ error.
A few searches around the topic seemed to suggest that the issue could be caused by timeouts when uploading large solution files, but this did not seem to be the case for us as we would not expect the timeouts to suddenly start occurring persistently after one fairly minor check-in. Also the deployments of this large solution normally take 5-10 minutes, whereas the error was occurring in less than 2 minutes.
The first thing we tried was to see if we could import the solution file as exported directly from the CRM front-end, using the front-end solution import process.
This worked OK, so we then tried importing the solution file that is created as part of the automated build in step 3 above.
So we copied the solution file from the server where the VSTS agent runs and tried to import this through the CRM front-end. This failed almost immediately with the following error:
So, now, we’ve got something to work with – there’s something wrong with the file that the solution packager is creating.
Switching verbose tracing on on the server to which we are deploying enabled us to find a more helpful error message in the w3wp-CRMWeb trace file:
Crm Exception: Message: The import file is invalid. XSD validation failed with the following error: ‘The element ‘EntityRelationship’ has incomplete content. List of possible elements expected: ‘EntityRelationshipType’.’. The validation failed at:…
Googling the error message took us to this very useful article which suggested that the issue might be that a relationship mentioned in the Relationships.xml file in the ‘Other’ folder in the unpacked solution, might not have a corresponding file in the Relationships folder. Sure enough, the relationships.xml file contained a reference to a newly created relationship, and the Visual Studio project contained a reference to the definition file for this relationship which had not been checked into source control:
Checking that missing file into source control fixed the problem.
1.) Those error messages are not always what they seem – sometimes the only place you’ll get really useful information is the CRM trace logs.
2.) Make sure you add any new files which are part of your customisation project into source control.
Leave a Reply.
Some stuff about me!