cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrianSlalomMS
Level: Powered On

Export Solution Error - Fails

I am trying to export a PowerApps solution (for source control purposes) but the Export Solution operation fails with the error below.

I Published all customizations prior to running the export. I am using the 'Unmanaged' package type.

Is there a workaround for this bug?

 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ActivityId>e866e2dc-3094-404c-8d51-acd439f41c6b</ActivityId>
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiExceptionSourceKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.WebServices.ExportXmlService</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiOriginalExceptionKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: An unexpected error occurred. ---> System.InvalidOperationException: The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type.
   at System.Xml.XmlNode.AppendChild(XmlNode newChild)
   at System.Xml.XmlNode.AppendChild(XmlNode newChild)
   at Microsoft.Crm.Tools.ImportExportPublish.SiteMapExportHandler.AppendAppModuleSiteMapXml(XmlDocument exportDocument, Guid siteMapId, String siteMapElementInnerXml)
   at Microsoft.Crm.Tools.ImportExportPublish.SiteMapExportHandler.AppendXml(XmlDocument exportDocument, Guid siteMapId, String siteMapElementInnerXml)
   at Microsoft.Crm.Tools.ImportExportPublish.SiteMapExportHandler.ExportItem(XmlDocument exportDocument, Guid siteMapId)
   at Microsoft.Crm.Tools.ImportExportPublish.AppModuleSiteMapHandler.ExportItem(XmlDocument exportDocument)
   at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc)
   at Microsoft.Crm.Tools.ImportExportPublish.RootExportHandler.RunExport()
   at Microsoft.Crm.WebServices.ExportXmlService.ExportSolutionWithTargetVersion(String solutionName, Boolean managed, String targetVersion, Boolean exportAutoNumberingSettings, Boolean exportCalendarSettings, Boolean exportCustomizationSettings, Boolean exportEmailTrackingSettings, Boolean exportGeneralSettings, Boolean exportMarketingSettings, Boolean exportOutlookSynchronizationSettings, Boolean exportRelationshipRoles, Boolean exportIsvConfig, Boolean exportSales, Boolean exportExternalApplications, ExecutionContext context)
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiStepKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">681f0f11-8e01-40a1-8d84-424242bb392c</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiDepthKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">1</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiActivityIdKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">e866e2dc-3094-404c-8d51-acd439f41c6b</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">System</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiStepSolutionNameKey</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">System</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>An unexpected error occurred.</Message>
  <Timestamp>2018-10-17T16:00:58.9921099Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault i:nil="true" />
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>
 

 

8 REPLIES 8
Highlighted
Community Support Team
Community Support Team

Re: Export Solution Error - Fails

Hi @BrianSlalomMS,

 

Did you follow the steps in below documentation?

https://powerapps.microsoft.com/en-us/blog/powerapps-packaging/

 

About the Unmanaged package type, would you please take a screenshot about it?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BrianSlalomMS
Level: Powered On

Re: Export Solution Error - Fails

Can't follow the instructions at the link you sent me becasue the 'Export' command is not available in that menu on my PowerApps portal. See screen shot. Could this be becasue my app is a model-driven app instead of a canvas app?

 

I have only found access to the export command for the app from the Dynamics 365 portal.

Screen shot of that page, showing the 'Export Solution' command I am using and showing the unmanaged package type, is also attached.

 

PowerApps Staff jo
PowerApps Staff

Re: Export Solution Error - Fails

PowerApps Staff EvanChakiMSFT
PowerApps Staff

Re: Export Solution Error - Fails

Are you still having this issue?

BrianSlalomMS
Level: Powered On

Re: Export Solution Error - Fails

Yes. This is still a problem for us. 

We can't export our solution. 

sumbharti
Level: Power Up

Re: Export Solution Error - Fails

Is this resolved now? I am also facing the same issue while exporting an unmanaged solution.

Need a bit of help. Any suggestions will be helpful.
PowerApps Staff EvanChakiMSFT
PowerApps Staff

Re: Export Solution Error - Fails

Sumbharti,  are you trying to export a solution or just an app?

grw
Level: Power Up

Re: Export Solution Error - Fails

I have just encountered a similar error.  The error message call stack mentions SiteMapExportHandler, so I created a new Solution, and under Client Extensions I added to it all the existing unmanaged Site Maps (without the 'Required Components').  In my case there were only three.  I then ran an export of my solution, and it produced the same error.  I narrowed this to one and proved that the other two were ok.  I expected to need to delete and recreate or re-import it, but in my case it turned out to be an old and redundant site map that could simply be deleted, and then the original solution exported without difficulty. 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Users Online
Currently online: 362 members 5,567 guests
Please welcome our newest community members: