Open devzesh opened 5 years ago
@WaelHamze Can you please update on this?
thanks..
@devmzeshan please set system.debug = true and share the logs
@WaelHamze Apologies for the delayed response, I have attached the logs. ReleaseLogs_63.zip
@WaelHamze any updates on this?
I seem to experience a similar issue. the registration seems to work tough. plugin assembly, plugin and the step get registered, but it still throws an exception.
`##[debug]Caught exception from task script.
`
I am actually just having troubles figuring out how to generate the plugin mapping file. There doesn't seem to be any documentation around this, although I did find the schema and a sample json so I guess I'll manually build it.
PS @devmzeshan Just wanted to highlight that your password is in your logs, if you haven't already changed it.
@qdi-jeffd, you can only generate a schema based on an existing registration. You can do that with the power shell cmdlets. But for new registrations, you'll have to create the mapping manually
@qdi-jeffd If you have plug-ins in your environment already. You can use this script to generate the mapping file.
I see many users generate the steps etc.. using plug-in registration tool in env and then generate a json from that.
You can also do this manually if you like and if you are familiar with the object model. You can link your mapping file to this schema file in visual studio which will give you some intellisense
@strwase can you share the mapping file?
I am specifically interested in what is in the mapping file after this step and how is this different than previous steps.
2019-06-24T06:34:28.6261028Z ##[debug]Upsert SdkMessageProcessingStep 7c18d1a2-1b3a-4e89-990b-d2d1d8ed43bf completed
Hi @WaelHamze,
here is the mappingfile i'm using.
{ "$schema": "./PluginRegistrationSchema.json", "Id": "{9e9d9681-b7b5-46a4-8c45-77a4f56a6a95}", "Name": "Norriq.Crm.Codipack.Plugins.dll", "IsolationMode": "Sandbox", "SourceType": "Database", "PluginTypes": [ { "Id": "{8876e445-d064-4b0f-84ec-4d9932cb5983}", "Name": "Norriq.Crm.Codipack.Plugins.QuotePropertyTemplate.CopyTemplateQuestions: Create of nrq_quotepropertiestemplate", "FriendlyName": "0d6cf174-4b19-437a-ac51-9ba0c4c37cab", "TypeName": "Norriq.Crm.Codipack.Plugins.QuotePropertyTemplate.CopyTemplateQuestions", "Steps": [ { "Id": "{c4a291af-33b9-4802-8ffa-5ed99187c9b5}", "Name": "Norriq.Crm.Codipack.Plugins.QuotePropertyTemplate.CopyTemplateQuestions: Create of nrq_quotepropertiestemplate", "MessageName": "Create", "PrimaryEntityName": "nrq_quotepropertiestemplate", "Mode": "Synchronous", "Stage": "Postoperation", "SupportedDeployment": "ServerOnly", "StateCode": "Enabled", "Rank": 1, "AsyncAutoDelete": false } ] } ] }
as far as I can tell, the step registration completes, but then an exception get thrown from somewhere.
`##[debug]Upsert SdkMessageProcessingStep c4a291af-33b9-4802-8ffa-5ed99187c9b5 completed
`
@WaelHamze I do have an existing plugin that I am trying to automate deployment of. I cannot get that script to work for my environment it seems though. I am connecting to an organization on D365 and if I use the url of the organization I get the following:
The service '/XRMServices/2011/Discovery.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'Microsoft.Crm.Site.Services.
Which a little research shows for that for D365 I need to use the discovery url, but providing that isn't working either. The error I get when I switch to the disco url is: Unable to login to Dynamics CRM, Error was : clientCredentials.UserName.UserName or clientCredentials.Windows.ClientCredential.UserName MUST be populated!
I have been providing the credentials though. I started building the mapping file manually, but it would be great to figure out what I am doing wrong to generate it via the script. Edit: I am providing the connection string as follows (security obfuscated): CrmConnectionString="AuthType=Office365;UserName=user@domain.ca;password=PASSWORD;url=https://disco.crm3.dynamics.com/XRMServices/2011/Discovery.svc;"
Thanks!
I still am having no luck with getting the script to generate my mapping file. I was able to get a connection string formatted that works through XrmToolBox (turns out some of the issues I was having were due to federated security on my account and MFA). Using an App registration and client secret I can get xrmtoolkit connecting, but not the powershell script. I am getting the error I mentioned above about Microsoft.Crm.Site.Services even when I use the disco url.
With a manually created partial mapping file (just did the first plugin and step). I get to the same point as the other two users here and get the Object reference error.
Any help you can give is appreciated. If it helps to know more about our environments to see what is common I am running the plugin registration through a pipeline in Azure DevOps On prem. The build agents run on Windows Server, I could grab some other versions if needed but Power Shell is on version 5.1.14409.1018.
Edit: It is probably worth noting that in my case I am editing a previously working pipeline that was/is deploying a managed solution prior to the plugin registration step.
@strwase @devmzeshan FYI In my case it turned out to be bad json for the plugins. Specifically that I had put "Images": null Instead of "Images": []
As the specific plugin that I was testing with did not have images for any of it's steps.
I still cannot generate the json file though.
Jeff
Try copying your plugin dll to your script folder where you are running. I was getting a blank json file generated before I did this. Works great now.
Hi Wael,
We are having this issue when using MSCRM Plugin Registration task and this issue is happening while trying to register "Create" step for plugin assembly.
Is it possible to get more details to understand the error cause?
Thanks, Zeshan