2

We have an internal (non app exchange) 2gp managed package. The source is composed of a main package and several supporting packages with protected custom metadata. The errors below are from the source of a supporting package in the same namespace. Development was active several months ago and we were creating scratch orgs and pushing source regularly. Now it appears that Salesforce is confusing previously released metadata with an attempt to create new metadata. I don't believe that the source has changed location since the last time we built the package. I don't have any idea on how to resolve this since I'm not adding any new metadata to the package and just trying to push existing metadata to a new scratch org.

sfdx force:source:push -u P
*** Pushing v48.0 metadata with SOAP API v53.0 connection ***
DEPLOY PROGRESS | ████████████████████████████████████████ | 70/70 Components

=== Component Failures [4]
Type   Name              Problem
─────  ────────────────  ──────────────────────────────────────────────────────────────────────────────────────────────────
Error  X.Y  Developer name already exists for custom metadata of this type. Please choose a different name.
Error  X.Y  Developer name already exists for custom metadata of this type. Please choose a different name.
Error  XX     This Remote Site Name already exists or has been previously used.  Please choose a different name.
Error  XX     This Remote Site Name already exists or has been previously used.  Please choose a different name.
7
  • 1
    Did you previously have and delete metadata records of these names before trying to re-use these names?
    – Phil W
    Apr 11 at 6:59
  • No, I don't think so. Both the custom metadata and the remote site exist in a released package with active subscribers. Is it even possible to delete them? Could it be that the VALUES in the source tree is different from a released package? I know that remote site settings can't be changed but the private custom metatadata values have to be mutable in this application. Thanks, I try filing a bug too.
    – muchavie
    Apr 11 at 11:46
  • On the deletion side (perhaps not relevant) this is documented here.
    – Phil W
    Apr 11 at 12:46
  • There is custom metadata that I want to deprecate. This is the thing that was in pilot for a while? It might be a path forward since we don't have compile time dependences on it.
    – muchavie
    Apr 11 at 23:13
  • Hi Phil, if you're watching this. Thanks for posting a reply. See resolution below.
    – muchavie
    May 30 at 0:03

1 Answer 1

2

This turned out to be pure user error. I found that duplicate copies of the same metadata row appeared in different parts of the source tree when I pulled from master. It was very obvious (and a bit embarrassing) when Salesforce support pointed this out to me. Oh well we all make mistakes!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.