Refresh/Retrieve Metadata not working

Issue #1471 resolved
Jason Burke(Consultant) created an issue

When I try to refresh or retrieve metadata, it always fails. The last line in the log is:

WARN - .ForceComSfdxMetadataRetriever - Failed to create the configured package directory C:\Users\Jason\AppData\Local\Temp\myproject_dx-jburke-retrieve\tmp\force-app.

However, when I look in File Explorer, the directory exists, so it was able to create it. I tried running IntelliJ IDEA as Administrator, but get the same error.

I am having to use the command-line sfdx commands to retrieve metadata from my org, which is ok for one or two files, but when I need to refresh an entire branch of dozens of files, it really slows down my productivity.

Illuminated Cloud Build 20191114110433

IntelliJ IDEA 2019.2.4 (Community Edition)
Build #IC-192.7142.36, built on October 29, 2019
Runtime version: 1.8.0_202-release-b1491 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1974M
Cores: 16
Registry:
Non-Bundled Plugins: com.illuminatedcloud2.intellij, com.jetbrains.jbre.bintray.downloader

Comments (8)

  1. Scott Wells repo owner

    Hi, Jason. Unfortunately I'm unable to get additional diagnostics on the nature of that failure as the API used to create the directory simply returns true or false...in this case false. It shouldn't be trying to create a directory that already exists, though. Perhaps it's a permissions issue? Or it's locked by some other process such as a command-line?

    Since that's a temporary directory, do you mind blowing away C:\Users\Jason\AppData\Local\Temp\myproject_dx-jburke-retrieve altogether (or renaming it to be out of the way) and see if that helps?

  2. Jason Burke(Consultant) reporter

    I deleted the directory but still having the same issue. It is creating the directory structure, but for some reason is reporting that it was unsuccessful. I’m running as Administrator and also have full access to that Temp directory, so it’s not a permissions issue. I’m stumped.

  3. Scott Wells repo owner

    Okay. I'm spinning a build right now that will do two things:

    1. Ensure that this message reaches you in the app vs. just being in the log.
    2. Only fail if both mkdirs() fails AND the expected/desired directory doesn't actually exist in the end.

    I'll attach that build here for you to try out in just a couple of minutes.

  4. Scott Wells repo owner

    Okay, let's see if this helps. Download the zip (don't extract it) and install it using Settings/Preferences>Plugins>Install plugin from disk (under the gear drop-down menu). Please let me know either way.

  5. Jason Burke(Consultant) reporter

    It works! Thank you for the quick response and fix, it really made my day!

  6. Scott Wells repo owner

    That's great! Just hang out on that build until the next official build is released which will include this same change.

  7. Log in to comment