Metadata Deploy and Push fails on Flexipage componentInstances in API 49 (Summer 20) and later

In the Summer 20 release, the componentInstances property for FlexiPage regions has been removed. These need to be replaced with itemInstances as outlined in the release notes. More details on the structure of an ItemInstance metadata type is in the guide.

For orgs that have been refreshed into the new version (like sandboxes and your production org at the time of GA), the structure of your metadata XML will pull down automatically with the new metadata format as and when it is upgraded to the Summer 20 release.

If you are working from VCS pushing your source that worked on API v48.0 to an org that is running Summer20 on v49.0, you'll have to manually update the XML structure.

To update the XML manually, the new structure is documented in the MD API guide linked above, but just make sure you have one <itemInstances> tag surrounding every <componentInstance> tag in your new XML structure. Here's an example before/after from the file I tested this on for one <flexiPageRegions> config:

Before

<flexiPageRegions>
    <componentInstances>
        <componentName>apexWireMethodWithParams</componentName>
    </componentInstances>
    <componentInstances>
        <componentName>apexImperativeMethodWithParams</componentName>
    </componentInstances>
    <componentInstances>
        <componentName>apexWireMethodWithComplexParams</componentName>
    </componentInstances>
    <componentInstances>
        <componentName>apexImperativeMethodWithComplexParams</componentName>
    </componentInstances>
    <name>region4</name>
    <type>Region</type>
</flexiPageRegions>

After

<flexiPageRegions>
    <itemInstances>
        <componentInstance>
            <componentName>apexWireMethodWithParams</componentName>
        </componentInstance>
    </itemInstances>
    <itemInstances>
        <componentInstance>
            <componentName>apexImperativeMethodWithParams</componentName>
        </componentInstance>
    </itemInstances>
    <itemInstances>
        <componentInstance>
            <componentName>apexWireMethodWithComplexParams</componentName>
        </componentInstance>
    </itemInstances>
    <itemInstances>
        <componentInstance>
            <componentName>apexImperativeMethodWithComplexParams</componentName>
        </componentInstance>
    </itemInstances>
    <name>region4</name>
    <type>Region</type>
</flexiPageRegions>

When I ran into this, I took the opportunity to record a little video walk through of fixing one of my failing Flexipage metadata files. You can see it here.