Not able to retrieve metadata

Issue #1990 resolved
Peter Friberg created an issue

I have the latest sfdx: 7.121.8-51dc548 running on MacbookPro with OS X 11.4

When selecting for instance a Salesforce profile and IlluminatedCloud->Retrieve Metadata it just goes on forever, nothing happens, and after a while I get this message in the Event Log:

17:03 Salesforce CLI: Error: socket hang up at connResetException (internal/errors.js:628:14) at TLSSocket.socketOnEnd (_http_client.js:499:23) at TLSSocket.emit (events.js:412:35) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) { code: 'ECONNRESET'}

17:03 Retrieve Failed
Failed to retrieve metadata.
Status: FAILED
Message: MetadataTransferError
Metadata API request failed: socket hang up

I can save files, and deploy files but not retrieve, looks like there is a timeout.

Comments (7)

  1. Scott Wells repo owner

    The underlying issue is occurring in the Salesforce CLI itself when invoked by IC2. You could almost certainly reproduce this independent of IC2 by creating the file /Users/peter/IdeaProjects/Kivra/salesforce/manifest/package-profile.xml as:

    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="">
            <members>Kivra Standard Profile</members>

    running the following directly from the command-line:

    cd /Users/peter/IdeaProjects/Kivra/salesforce
    sfdx force:source:retrieve -u -x manifest/package-profile.xml --json

    My guess is that the retrieval request it's just sitting in queue interminably rather than actually processing for that long, and ultimately the CLI is giving up once one of its own timeouts is reached.

    Assuming you can reproduce the behavior from the command-line, you will likely need to raise this directly with Salesforce. If you don't see the same behavior from the command-line and continue to see it from IC2 (meaning that it wasn't a transient behavior that Salesforce has already resolved), please let me know.

  2. Peter Friberg reporter

    Thanks Scott, you were right. There is an underlying issue with sfdx since I can reproduce the behaviour from command line. Digging into it now.

  3. Scott Wells repo owner

    Glad to hear you were able to narrow it down. I'll be interested to hear what you find as it's likely affecting others as well.

  4. Peter Friberg reporter

    For now I just removed all sfdx-cli npm packages and removed sfdx cli installation. Installed an older npm version of sfdx-cli@7.96.1

    And then reinstalled sfdx-cli from Salesforce.

    It works but it is super slow. Took about 4.5 minutes to retrieve a single profile.

    I guess there are some issues at Salesforce. So my “fixes” are probably not correct. Time will tell. Will try again tomorrow.

    At least I am able to work again, retrieving metadata…

  5. Scott Wells repo owner

    Yeah, whatever was going on was definitely server-side, almost certainly a queueing things based on my experience. Glad it's cleared up for you now. Hopefully it stays that way!

  6. Log in to comment