Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load of metadata from db failed for metadata of type:Profile and file name:admin. #672

Closed
scromiecaremore opened this issue Oct 11, 2020 · 9 comments
Labels
area:mdapi This is an issue for MDAPI server side team. owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.

Comments

@scromiecaremore
Copy link

Summary

I am attempting to use the Beta Org Shape functionality to build a scratch org from my production org's shape. I am running into the following when I attempt to pull after pushing my repo:

sfdx force:source:pull
ERROR running force:source:pull: Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:Profile and file name:admin.

I am not sure where it got the profile with the lowercase name "admin" but that word doesn't appear anywhere in my repo.

Steps To Reproduce:

    1. removed existing Shape
      sfdx force:org:shape:delete -u DevHub
      Delete shapes for org with name: [email protected]? Are you sure (y/n)?: y
      Successfully deleted shape(s) from org: 00D500000006eI1EAI.
    1. created the Shape from our Dev Hub (our Prod org)
      sfdx force:org:shape:create -u DevHub
      3SR3n0000008OIAGA2 scratch org configuration (shape) was created in the source org.
    1. validated that the shape was active

sfdx force:org:shape:list
=== Org Shapes
ALIAS USERNAME ORG ID SHAPE STATUS CREATED BY CREATED DATE
────── ──────────────────── ────────────────── ──────────── ──────────────────── ────────────────────────────
DevHub [email protected] 00D500000006eI1EAI Active [email protected] 2020-10-11T20:27:46.000+0000

    1. created new scratch org from the shape Org
      sfdx force:org:create -f config/sfcm-scratch-def.json
      Successfully created scratch org: 00D2D000000DiDMUA0, username: [email protected]
    1. push code to the new scratch org
      sfdx force:config:set defaultusername=[email protected]
      sfdx force:source:push -f

Job ID | 0Af2D00000WfuxWSAR
SOURCE PROGRESS | ████████████████████████████████████████ | 403/403 Components
=== Pushed Source
...Repo loaded...

    1. checked the status of the scratch org to ensure I'm in synch
      scromie@6SBGW33:~/projects/sfcm$ sfdx force:source:status
      === Source Status
      STATE FULL NAME TYPE PROJECT PATH
      ────────── ─────────── ─────── ────────────
      Remote Add AppSwitcher AppMenu
      Remote Add Admin Profile
    1. attempted to pull the remaining items into my repo:

sfdx force:source:pull
ERROR running force:source:pull: Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:Profile and file name:admin.

Expected result

I should have gotten a successful result of the source coming into my local.

Actual result

I got the error indicating the pull process couldn't pull the "admin" profile from an internal db.

Additional information

image

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

sfdx-cli/7.75.1 wsl-x64 node-v10.20.1

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core):
salesforcedx 49.13.1

OS and version:
Windows 10 with WSL (Ubuntu 18.04)

@scromiecaremore
Copy link
Author

Here's the scratch org definition:

{
"orgName": "CareMore Healthcare Scratch Org",
"adminEmail": ,
"sourceOrg": ,
"hasSampleData": false,
"description": "test org used to verify features against the Production org shape",
"features": [],
"settings": {
"actionsSettings": {
"enableDefaultQuickActionsOn" : true,
"enableMdpEnabled" : true,
"enableThirdPartyActions" : false
},
"chatterSettings": {
"enableChatter": true
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
}
}
}

@shetzel shetzel transferred this issue from forcedotcom/sfdx-core Oct 14, 2020
@Tim-Machine
Copy link

I too am seeing this error. Ive even went as far as ignoring profiles in the .forceignore file.

@saicharanreddyk
Copy link

@shetzel Is there any workaround to this problem? I am also facing the same issue.

@JulienGaiotto
Copy link

Hello everyone,

same issue here.

When we create a scratch org from the org shape based off of our Production Org, we have the same issue :
Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:Profile and file name:admin.
The production org from which the shape has been generated in an old Unlimited Org (from 2012).

We currently have no workaround, and it prevents us to switch to the use of Salesforce DX the way we want to use it.
We cannot create our scratch orgs in Developer or Enterprise edition as we have more than 25 Roll-Up Summary fields on an object, and there are no option to set in the sfdx-project.json to increase that number, hence we need to use OrgShape.

Any update on that particular issue ?

More info on my side if it can help :

sfdx -v
sfdx-cli/7.85.1 darwin-x64 node-v15.6.0

sfdx plugins --core
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-scanner 2.5.1
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.5 (core)
analytics 1.12.1 (core)
auth 1.4.6 (core)
config 1.2.3 (core)
generator 1.1.3 (core)
salesforcedx 50.15.0 (core)
├─ schema 1.0.3 (core)
├─ limits 1.0.3 (core)
├─ user 1.0.9 (core)
├─ apex 0.1.4 (core)
├─ templates 50.4.0 (core)
├─ custom-metadata 1.0.11 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ salesforce-alm 50.15.0 (core)
sfdx-cli 7.85.1 (core)
sfdx-git-delta 4.2.0
texei-sfdx-plugin 1.9.3

Thanks

@saicharanreddyk
Copy link

I have tried using the "hasSampleData": "true", in the project-scratch-def.json file and it solved my issue of fetching profiles from scratch org, not sure what is the underlying issue.

@JulienGaiotto
Copy link

I have tried using the "hasSampleData": "true", in the project-scratch-def.json file and it solved my issue of fetching profiles from scratch org, not sure what is the underlying issue.

It did the trick for me, thank you for posting that, helpful workaround !

@mshanemc
Copy link
Contributor

mshanemc commented Apr 6, 2023

It's been a while, but I saw someone else has reported this using ANT, so I'm sure this is not a CLI problem (the error comes from the Metadata API itself)

https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A9379SAB

I'm going to mark this as owned by another team. If you can still reproduce it, open a support case to get that team's attention.

@mshanemc mshanemc added owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. area:mdapi This is an issue for MDAPI server side team. labels Apr 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 6, 2023

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

@mshanemc
Copy link
Contributor

I'm closing this one as stale. We recommend ignoring Profiles via .forceignore for so, so many reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:mdapi This is an issue for MDAPI server side team. owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.
Projects
None yet
Development

No branches or pull requests

5 participants