SFDX deploy result parse failure

Issue #1667 resolved
Xander Victory created an issue

When deploying an LWC to a Sandbox org, I’m getting a parse error.

Is there a way to see the JSON it returned?

2020-07-10 14:10:19,808 [15779525]   WARN - .IlluminatedCloudExceptionUtil - java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 29 path $.result 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 29 path $.result
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
    at com.google.gson.Gson.fromJson(Gson.java:932)
    at com.google.gson.Gson.fromJson(Gson.java:897)
    at com.google.gson.Gson.fromJson(Gson.java:846)
    at com.google.gson.Gson.fromJson(Gson.java:817)
    at com.illuminatedcloud.intellij.sfdx.SfdxUtil.runSfdx(SourceFile:361)
    at com.illuminatedcloud.intellij.sfdx.SfdxUtil.runSfdx(SourceFile:301)
    at com.illuminatedcloud.intellij.sfdx.SfdxUtil.runSfdx(SourceFile:275)
    at com.illuminatedcloud.intellij.sfdx.SfdxUtil.runSfdxForceSourceDeployAsync(SourceFile:788)
    at com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataDeployer.submitDeploymentRequest(SourceFile:232)
    at com.illuminatedcloud.intellij.builder.AbstractForceComMetadataDeployer$1.run(SourceFile:363)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:932)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:434)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$null$3(ProgressRunner.java:233)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:166)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:153)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:233)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 29 path $.result
    at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:386)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
    ... 25 more
2020-07-10 14:10:19,808 [15779525]   WARN - .IlluminatedCloudExceptionUtil - No deployment response found. 
java.lang.IllegalStateException: No deployment response found.
    at com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataDeployer.submitDeploymentRequest(SourceFile:245)
    at com.illuminatedcloud.intellij.builder.AbstractForceComMetadataDeployer$1.run(SourceFile:363)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:932)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:434)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$null$3(ProgressRunner.java:233)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:166)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:153)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:233)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

sfdx-cli/7.65.2-0f0403b8cc win32-x64 node-v10.21.0

Comments (6)

  1. Xander Victory reporter

    Weird thing is that it suddenly started happening, deploys were working smoothly and then suddenly this is all I’m getting (and the deployments themselves seem to be succeeding)

  2. Scott Wells repo owner

    I think something was patched overnight in either the platform or the CLI that changes some JSON output. Let me investigate and I'll fast-track a fix.

  3. Scott Wells repo owner

    Easily reproduced. This week's CLI update changed the JSON output. I'll let Salesforce know, but I'll also get a fix out shortly.

  4. Scott Wells repo owner

    Specifically the CLI output for force:org:deploy is now:

    {
      "status": 0,
      "result": [
        {
          "done": false,
          "id": "0Af2E00000UgncWSAR",
          "state": "Queued",
          "status": "Queued",
          "timedOut": true
        }
      ]
    }
    

    whereas previously it was:

    {
      "status": 0,
      "result": {
          "done": false,
          "id": "0Af2E00000UgncWSAR",
          "state": "Queued",
          "status": "Queued",
          "timedOut": true
      }
    }
    

    Notice the change in data type for result from an object to an array of objects.

  5. Log in to comment