Suggestions for how to track down the source of this force:source:push error?

Found the problem by looking back through recent Git pull requests and found one called:

Removed Lightning Component that is no longer used

and knowing the component I could then go to Setup UI and switch the "Lightning Experience Override" from that component to "Use the Salesforce Classic override". The SFDX push then worked.

Never saw the Id 04uf00000009P95 anywhere in this. If you know of a better way to track a problem like this down do post an answer.


It sounds like you have the problem sorted.

If the future the Metadata Component Dependency API could be really useful in this scenario. Note, that at the time of writing this API is currently in pilot. The last update for the Trailblazer community (success) group was that it would be targeting Beta in Winter '20. That could change between now and that release.

Once you do have access to that API you can then query to see what is depending on that ID and what it depends on.

E.g. Find components that are referenced by the ActionOverride 04uf00000009P95

sfdx force:data:soql:query --usetoolingapi --query 
    "SELECT MetadataComponentId, MetadataComponentName, MetadataComponentType, 
     RefMetadataComponentId, RefMetadataComponentName, RefMetadataComponentType 
     FROM MetadataComponentDependency Where MetadataComponentId = '04uf00000009P95'"

The other caveat here is whether the dependency API actualy supports the metadata type in question. Again, at the time of writing, Action Override isn't listed as being supported for Where are my Lightning Components used? or Where are my Visualforce Pages used?. That said, it is still in pilot and evolving over time. Hopefully we will see expanded support for scenarios like this by the time it reaches GA.