-
Notifications
You must be signed in to change notification settings - Fork 78
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
Issue with sf-cli Command: Unable to Retrieve Specific Static Resource #2959
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Do you have an ICRT (afaik, that's InformaticaCloudRealTime) package installed in the org? |
what I did using
then retrieve that via Can you replicate it with another org, like maybe this one is returning a broken response? |
Hi @mshanemc I'm running the retrieve of other packages, in this case all layouts, always generated with the same tactic I described before, and I end up with this xml package: <?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>copado__Copado_Protected_Settiing__mdt-Copado key Layout</members>
<members>copado__Copado_Setting__mdt-Copado Setting Layout</members>
<members>copado__Copado_Smart_Help__mdt-Copado Smart Help Layout</members>
<members>copado__Data_Template_Setup__mdt-Data Template Setup Layout</members>
<members>copado__Data_Template__c-Data Template Layout</members>
<members>copado__Deployment_Flow_Step__c-Deployment Flow Step Layout</members>
<members>copado__Deployment_Flow__c-Deployment Flow Layout</members>
<members>copado__Deployment_History__c-Copado Deployment History Layout</members>
<members>copado__Deployment_Job__c-Deployment Job Layout</members>
<members>copado__Deployment_Task__c-Deployment Task Layout</members>
<members>copado__Deployment__c-Deployment Layout</members>
<members>copado__Destination_Org__c-Destination Org Layout</members>
<members>copado__Environment__c-Environment Layout</members>
<members>copado__Environmental_Variable__c-Environment Variable Layout</members>
<members>copado__Epic__c-Epic Layout</members>
<members>copado__External_CI_Job_Result__c-External CI Job Result Layout</members>
<members>copado__External_CI_Job__c-External CI Job Layout</members>
<members>copado__External_CI_Setting__c-External CI Setting Layout</members>
<members>copado__Filter__c-Filter Layout</members>
<members>copado__Git_Backup__c-Git Backup Layout</members>
<members>copado__Git_Backup__c-Git Snapshot Layout</members>
<members>copado__Git_Commit__c-Git Commit Layout</members>
<members>copado__Git_Org_Commit__c-Git Org Commit Layout</members>
<members>copado__Git_Org_Commit__c-Snapshot Commit Layout</members>
<members>copado__Git_Repository__c-Git Repository Layout</members>
<members>copado__Git_Repository__c-Git Server Layout</members>
<members>copado__Kanban_Board_View__c-Kanban Board View Layout</members>
<members>copado__Kanban_Board__c-Kanban Board Layout</members>
<members>copado__Metadata_Group_Item__c-Metadata Group Item Layout</members>
<members>copado__Metadata_Group_Item__c-Metadata Item Layout</members>
<members>copado__Metadata_Group_Item__c-Metadata Template Item Layout</members>
<members>copado__Metadata_Group__c-Metadata Group Layout</members>
<members>copado__OrgDiff__c-Org Difference Layout</members>
<members>copado__OrgDiff__c-OrgDiff Layout</members>
<members>copado__Org__c-Org Credential Layout</members>
<members>copado__Org__c-Org Layout</members>
<members>copado__Persona_Permission__c-Persona Permission Layout</members>
<members>copado__Persona__c-Persona Layout</members>
<members>copado__Project__c-Project Layout</members>
<members>copado__Promoted_User_Story__c-Promoted User Story Layout</members>
<members>copado__Promotion__c-Promotion Layout</members>
<members>copado__Pull_Request_Review__c-Pull Request Review Layout</members>
<members>copado__Pull_Request__c-Pull Request Layout</members>
<members>copado__Quality_Gate__c-Quality Gate Layout</members>
<members>copado__Release__c-Release Layout</members>
<members>copado__Scheduled_Job_Run__c-Scheduled Job Result Layout</members>
<members>copado__Scheduled_Job__c-Scheduled Job Layout</members>
<members>copado__Scratch_Org_Definition__c-Scratch Org Definition Layout</members>
<members>copado__Scratch_Org_Project_Template__c-Scratch Org Artifacts Template Layout</members>
<members>copado__Selenium_Group_Org_Credential__c-Selenium Group Org Credential Layout</members>
<name>Layout</name>
</types>
</Package> Through the code I proceeded to create an output directory and launched the retrieve command: 10:05:00 ~/Documents/01_repo/sfdc-ci-enel-mercato (release/R2_2024)
└─▶ $ mkdir -p fullRetrieve_Orgs/DevInt_RM/retrievePack/dir_528
10:09:12 ~/Documents/01_repo/sfdc-ci-enel-mercato (release/R2_2024)
└─▶ $ sf project retrieve start --target-org DevInt_RM --ignore-conflicts --manifest fullRetrieve_Orgs/DevInt_RM/package_Layout_22.xml --output-dir fullRetrieve_Orgs/DevInt_RM/retrievePack/dir_528 --wait 240
Retrieving v56.0 metadata from [email protected] using the v61.0 SOAP API
Preparing retrieve request... Succeeded
Error (ENOENT): ENOENT: no such file or directory, stat '/Users/ea_enel/Documents/01_repo/sfdc-ci-enel-mercato/fullRetrieve_Orgs/DevInt_RM/retrievePack/dir_528/main/default' I then tried to make him happy by adding the 2 directories (which in theory wouldn't even be needed): 10:09:19 ~/Documents/01_repo/sfdc-ci-enel-mercato (release/R2_2024)
└─▶ $ mkdir -p fullRetrieve_Orgs/DevInt_RM/retrievePack/dir_528/main/default
10:10:17 ~/Documents/01_repo/sfdc-ci-enel-mercato (release/R2_2024)
└─▶ $ sf project retrieve start --target-org DevInt_RM --ignore-conflicts --manifest fullRetrieve_Orgs/DevInt_RM/package_Layout_22.xml --output-dir fullRetrieve_Orgs/DevInt_RM/retrievePack/dir_528 --wait 240
(node:27546) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
Retrieving v56.0 metadata from [email protected] using the v61.0 SOAP API
Preparing retrieve request... Succeeded
› Warning: Nothing retrieved
Warnings
======================================================================================================================================================
| File Problem
| ────────────────────── ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Environment__c-Environment Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Kanban_Board_View__c-Kanban Board View Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Metadata_Group__c-Metadata Group Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__OrgDiff__c-Org Difference Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Data_Template__c-Data Template Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Backup__c-Git Backup Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Environmental_Variable__c-Environment Variable Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Org__c-Org Credential Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Project__c-Project Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Copado_Setting__mdt-Copado Setting Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Data_Template_Setup__mdt-Data Template Setup Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Scheduled_Job__c-Scheduled Job Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__External_CI_Setting__c-External CI Setting Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Kanban_Board__c-Kanban Board Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Release__c-Release Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Backup__c-Git Snapshot Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Metadata_Group_Item__c-Metadata Template Item Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Quality_Gate__c-Quality Gate Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Deployment_Flow__c-Deployment Flow Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__OrgDiff__c-OrgDiff Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__External_CI_Job__c-External CI Job Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Commit__c-Git Commit Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Org__c-Org Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Promoted_User_Story__c-Promoted User Story Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Selenium_Group_Org_Credential__c-Selenium Group Org Credential Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Repository__c-Git Server Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Filter__c-Filter Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Persona_Permission__c-Persona Permission Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Promotion__c-Promotion Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Copado_Protected_Settiing__mdt-Copado key Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Metadata_Group_Item__c-Metadata Item Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Org_Commit__c-Snapshot Commit Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Deployment_Job__c-Deployment Job Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Repository__c-Git Repository Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Git_Org_Commit__c-Git Org Commit Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Pull_Request__c-Pull Request Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__External_CI_Job_Result__c-External CI Job Result Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Scheduled_Job_Run__c-Scheduled Job Result Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Scratch_Org_Definition__c-Scratch Org Definition Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Scratch_Org_Project_Template__c-Scratch Org Artifacts Template Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Copado_Smart_Help__mdt-Copado Smart Help Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Deployment_Task__c-Deployment Task Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Epic__c-Epic Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Destination_Org__c-Destination Org Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Deployment_Flow_Step__c-Deployment Flow Step Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Deployment__c-Deployment Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Metadata_Group_Item__c-Metadata Group Item Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Deployment_History__c-Copado Deployment History Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Pull_Request_Review__c-Pull Request Review Layout' cannot be found
| unpackaged/package.xml Entity of type 'Layout' named 'copado__Persona__c-Persona Layout' cannot be found I deduce that the first error is due to a lack of sf-cli which first generates an empty folder while extracting, and then gives an error, I think this is already something to fix... sf org list metadata --metadata-type Layout > layoutList.json And in this case, here's what I read for some of them: {
"createdById": "00524000001VhXEAA0",
"createdByName": "AE43352",
"createdDate": "2016-01-30T18:50:17.000Z",
"fileName": "layouts/copado__Org__c-Org Layout.layout",
"fullName": "copado__Org__c-Org Layout",
"id": "00h24000005YUdgAAG",
"lastModifiedById": "00524000001VhXEAA0",
"lastModifiedByName": "AE43352",
"lastModifiedDate": "2016-01-30T18:50:44.000Z",
"manageableState": "installed",
"namespacePrefix": "copado",
"type": "Layout"
},
{
"createdById": "00524000001VhXEAA0",
"createdByName": "AE43352",
"createdDate": "2016-01-30T18:50:16.000Z",
"fileName": "layouts/copado__Deployment_Flow_Step__c-Deployment Flow Step Layout.layout",
"fullName": "copado__Deployment_Flow_Step__c-Deployment Flow Step Layout",
"id": "00h24000005YUdTAAW",
"lastModifiedById": "00524000001VhXEAA0",
"lastModifiedByName": "AE43352",
"lastModifiedDate": "2016-01-30T18:50:42.000Z",
"manageableState": "installed",
"namespacePrefix": "copado",
"type": "Layout"
},
... I can already tell you that copado is also an installed library, like ICRT (which I have also verified is installed in this sandbox): ICRT && Copado installation screenshotIn the case of copado there are also Apex classes that have been found without problems, so... please help me |
your 2nd issue we already know about (mdapi/list omitting the namespace for layouts). see #2168 let's keep this issue focused on replicating your StaticResource problem |
Hi @mshanemc
8:55:10 ~/Documents/01_repo/dreamhouse-lwc (main)
└─▶ $ fullRetrieve.py --alias dreamhouse --whiteList StaticResource --retrieve --sub-split 50
>> Detect default packageDirectories from sfdx-project.json, equal to: force-app/main/default
[dreamhouse]
[dreamhouse] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[dreamhouse] >> Change system default org to: 'dreamhouse'
[dreamhouse] └─▶ $ sf config set target-org 'dreamhouse'
[dreamhouse] (node:4215) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabli [22 B]
[dreamhouse] (Use `node --trace-warnings ...` to show where the warning was created)
[dreamhouse] Set Config
[dreamhouse] ===============================
[dreamhouse] | Name Value Success
[dreamhouse] | ────────── ────────── ───────
[dreamhouse] | target-org dreamhouse true
Add mandatory type, according with the metadata request by the user...
>> fullRetrieve_Orgs/dreamhouse exists, archived inside: '00_Archive/fullRetrieve/2024-07-19_08-55-48_dreamhouse'
Start 'listMetadata' operation with 4 worker...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:06<00:00, 6.61s/MetaType]
>> Filter/Grouping resources types to generate the minimum package necessary...
Store command 1° list inside 'fullRetrieve_Orgs/dreamhouse/retrieveCmd.sh'
╔═════════════════════════════════════════════════════════════════════════════╗
║ Starting retrieve process. Start time "08:55:54" (Relax, may take minutes!) ║
╚═════════════════════════════════════════════════════════════════════════════╝
Execute retrieves command with 4 workers...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:06<00:00, 6.31s/Connections]
Time to retrieve each group: (hh:mm:ss)
1) 0:00:06 - StaticResource_0
╔══════════════════════════════════════════╗
║ Time elapsed: 0:00:06 ║
║ Linear time: 0:00:06 ║
║ Time save: -1 day, 23:59:59 (--0.04%) ║
╚══════════════════════════════════════════╝
Merging directories: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 30.28dir/s]
[Warning] For 13 files read process fail, no validation was apply.
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Full-Retrieve end with SUCCESS ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ And this is the <?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>icrt__AeMobileStaticResources</members>
<members>icrt__AeVersionProperties</members>
<members>leafletjs</members>
<members>sample_data_brokers</members>
<members>sample_data_contacts</members>
<members>sample_data_properties</members>
<name>StaticResource</name>
</types>
</Package> I thought the problem might be caused by using a manifest, but I see that in this scratch org everything is fine 😢 But if I try to do the same thing on the enterprise sandbox, those 2 resources fail. How can I give you a better debug of what's going on? |
I tried running the same commands as the dreamhouse repository in a sandbox created by Salesforce Playground. Unfortunately today in the office there are connection problems, and I cannot redo the test on our sandbox. Installed Package in Playground orgInstalled Package in Sandbox OrgAs you can see, in the our sandbox the version are 1.24, in the Playground is 1.26. StaticResource in Playground orgStaticResource in Sandbox Org (query with prefix name ictr)
I'm waiting for your other ideas to be able to capture the problem and solve it 😄 |
I hate to say this, but sometimes an Org is just...weird. The fact that it works on all the other orgs so far means it's probably not something the CLI team can fix. Do you have other sandboxes that have the same problem (existing sbox or a new one). If it's, "yeah, all my sandboxes do that" then maybe we can get an sbox and open a bug for [some team sbox? mdapi? staticResource?] If it's just that one bad org, then it's probably not something I can even get anyone to respond to and I'll close this. |
Hi @mshanemc In any case I re-tested the problem on our PreProd org, which is a Prod-aligned full-sandbox, and this is the output:
and I can confirm that by commenting the 2 ictrs the I honestly don't understand what the problem is, but it affects all our Orgs on which I've been able to test it, I think it might be worth looking into further, something else interesting might come up |
I'm trying to differentiate between
Either way, I'm going to close this because the CLI can't help and it seems limited to one package or a certain group of orgs. |
I discussed the idea of trying to update the package with my team, we decided to wait because, apart from this failed retrieve, everything else works and we can't be sure that the new package won't cause regressions in production, but thanks for the support! |
Summary
Hello Salesforce Support Team,
I hope this message finds you well.
I am encountering an issue with the
sf-cli
tool when attempting to retrieve metadata from my org. Specifically, the problem arises when using the following command:sf org list metadata --metadata-type {metaType} --target-org '{self.alias}' --json
With the appropriate parameters, I receive a list of resources. However, when I attempt to retrieve these resources, the process consistently fails on one particular resource: icrt__AeMobileStaticResources.
Here is the command I use for the retrieval:
And the error message I receive is as follows:
I have also checked the org from which I obtained the list and searched for all static resources containing “icrt” in their names, but the resulting list is empty.
I believe this might be a bug with the sf org list metadata command or another related issue. Could you please assist me in resolving this?
Thank you for your help and support.
Best regards,
Emanuele
System Information
The text was updated successfully, but these errors were encountered: