Failed to retrieve metedata

Issue #2112 resolved
Vlad Ioan created an issue

There is a strange behavior while trying to retrieve or deploy from a project in IntelliJ created from VCS (see screenshot). Using the same connection but creating and retrieving everything from the sandbox (without cloning the repository of the project) everything works fine.

I’m pretty sure that in both scenarios I have the same settings with the difference that one project is created from VCS and uses force-app as the source folder, and the other one as I mentioned above and uses src as source folder.

Comments (6)

  1. Vlad Ioan reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form>

  2. Scott Wells repo owner

    Hi. This appears to be happening in the Salesforce CLI and not IC2 itself:

    2022-05-22 21:42:36,279 [1832075]   INFO - #c.i.i.b.ForceComSfdxMetadataRetriever - Using the Salesforce CLI to retrieve metadata for project 'gam-sf-b2b' from connection 'gam-sf-b2b'.
    2022-05-22 21:42:40,315 [1836111]   INFO - #c.i.i.b.ForceComSfdxMetadataRetriever - Retrieve completed in 4 s 24 ms.
    2022-05-22 21:42:40,316 [1836112]   WARN - #c.i.i.b.ForceComSfdxMetadataRetriever - Failed to retrieve metadata.
    
    Status: FAILED
    Message: soapenv:Client
    'undefined' is not valid for the type xsd:double
    

    You can likely confirm this by enabling CLI command logging in Illuminated Cloud>Configure Application>Salesforce DX>Log Salesforce CLI commands. Then when you repeat this failing action, the IDE's Messages tool window will include a tab for the metadata retrieval showing the exact CLI invocation and response JSON. I'm guessing you'll find that the CLI's JSON response includes the same error message 'undefined' is not valid for the type xsd:double (also note that undefined is more of a JavaScript/TypeScript concept than a Java concept which further supports this being a CLI issue).

    Assuming that's the case, I'd recommend you completely uninstall and reinstall the CLI to see if that resolves the problem. If it doesn't, please run the exact same sfdx force:source:retrieve CLI command shown in IC2's Messages tool window from the command-line and, assuming (again) that you see the same issue, you should log a support case in the Salesforce CLI public issue tracker.

  3. Scott Wells repo owner

    Resolving this as almost assuredly a Salesforce CLI issue, hopefully resolvable by a scorched earth reinstall of the CLI itself. If it turns out not to be a CLI issue, feel free to reopen with the CLI execution output from the *Messages tool window.

  4. Vlad Ioan reporter

    Thank you for the answer! I just tried to connect to git after creating the project and seems to be working. Gonna investigate more on this and come back with an answer.

  5. Log in to comment