[SalesForce] SFDX conflict with ContentAssets

I have a Custom Lightning App, for which I've uploaded an icon in the App Manager interface. I pulled that into SFDX, then deployed with no problem.

Then, I decided to update the logo for branding reasons. So I go into App Manager on the scratch org, clear the old logo, upload the new one. Works fine… until I try to pull it into SFDX, where I get this error:

ERROR: Entity of type 'ContentAsset' named 'ProtonTextIcon60x60'
cannot be found Entity of type 'ContentAsset' named
'ProtonTextIcon60x601' cannot be found.

The first file mentioned is the old icon file. The second file never existed — don't know why it thinks it's there — must be a mistake in the metadata?


UPDATE: Solved.
I pushed source to a new scratch org, made the icon change there, pulled it back in to local, then was able to push -f to the original scratch org.

Best Answer

I just went into the same problem.

I emptied the recycle bin but that didn't solve the problem.

I was able to find the references of the now removed content asserts when searching the whole project in the following file .sfdx/orgs/{scratch org username}/maxRevision.json

e.g. search ProtonTextIcon60x60 or ProtonTextIcon60x601 in your project if you're op.

Remove those references from the above mentioned file fixed it for me.

Related Topic