function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pratik MungalparaPratik Mungalpara 

ERROR running force:mdapi:retrieve

I have created change set and trying to retrieve change set in VS code. I am using below command:
sfdx force:mdapi:retrieve -r retrieval -p Test_CHANGESET -u MYORG

But i am getting below error:
ERROR running force:mdapi:retrieve: Timeout awaiting 'request' for 10000ms

any idea how to solve this?

PS. i have noticed that when this command runs it shows " sending request to org (metadata API version undefined). Not sure if this has to do anything with error. 
Best Answer chosen by Pratik Mungalpara
Pratik MungalparaPratik Mungalpara
Fgured out the issue. 

somehow my VS code is not taking metadata API version so i have to input manually with command. I had to run command like below. 
sfdx force:mdapi:retrieve -r retrieval -p Test_CHANGESET -u MYORG -a 55.0

This worked. 
 

All Answers

VinayVinay (Salesforce Developers) 
Hi Pratick,

Can you try installing latest cli version version: 7.180.0 and see how it goes ?

Thanks,
Pratik MungalparaPratik Mungalpara
@vinay I did update salesforce CLI to 7.180.0 but still getting the same error. when i run sfdx --version, below is reply now sfdx-cli/7.180.0 win32-x64 node-v18.12.1
Pratik MungalparaPratik Mungalpara
Fgured out the issue. 

somehow my VS code is not taking metadata API version so i have to input manually with command. I had to run command like below. 
sfdx force:mdapi:retrieve -r retrieval -p Test_CHANGESET -u MYORG -a 55.0

This worked. 
 
This was selected as the best answer