"getInputStream() must not be called against a directory" when deploying a new Lightning component

Issue #1232 resolved
Scott Wells repo owner created an issue

I just saw this error when updating my org locally via IC from the latest in Git. It appears to be a recent behavioral change in the base IDE, though it's likely unveiling an IC bug that was previously masked.

Comments (18)

  1. Scott Wells reporter

    Hotfix delivered in 2.0.5.4. So sorry for introducing this temporary regression! Please let me know if this doesn't resolve the issue for you.

  2. Jason Skowronek

    How do I obtain this hotfix? Using v1.8.5.1 and getting this error. Appears to be due to space in the path?

    Thanks.

  3. Scott Wells reporter

    Jason, what you're seeing may be a different instance of the issue because the change that caused it in Illuminated Cloud 2 was not ever made in Illuminated Cloud 1. Can you please reproduce the error and attach the idea.log (Help>Show Log in Explorer/Finder/Files) so that I can see the details of the error?

  4. Scott Wells reporter

    Thanks much, Jason. I think that gives me what I need. It appears that it's mishandling deployment of an email template folder and trying to treat it as a file instead of as a directory:

    2019-07-01 18:12:05,125 [102396706]   WARN - .IlluminatedCloudExceptionUtil - getInputStream() must not be called against a directory: file://d:/path/to/project/DevelopPro/src/email/name 
    java.io.IOException: getInputStream() must not be called against a directory: file://d:/path/to/project/DevelopPro/src/email/name
        at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.getInputStream(VirtualDirectoryImpl.java:679)
        at com.illuminatedcloud.intellij.builder.ForceComBuilderUtil.getFileContentsAsByteArray(SourceFile:1004)
        at com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer.createDeploymentArchive(SourceFile:641)
        at com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer.deployWithMetadataApi(SourceFile:257)
        at com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer$1.run(SourceFile:184)
    

    That's definitely been addressed in IC2, but IC2 is now so far from IC1 that I probably didn't ever back-port a version of the fix because it wasn't obvious that it needed to be merged.

    I'm currently traveling but will take a look at it tomorrow and see if I can issue a quick-fix for you. In the interim the workaround would be to perform a selectively deployment that excludes that (and likely other) email template folder(s).

    Thanks for providing the log!

  5. Scott Wells reporter

    Jason, I was able to reproduce the issue. I'll create a build with the fix and post it here for you to verify. If things look good I'll issue a new official version the morning after the verification.

  6. Scott Wells reporter

    Okay, I've attached a build with the prospective fix. Download the archive (don't extract it) and use Settings>Plugins>Install plugin from disk (under the gear drop-down) to install it.

    If this does resolve the issue, just let me know; if it doesn't, please detail the exact steps that lead to failure so I can be sure to reproduce/fix it. Thanks!

  7. Scott Wells reporter

    Jason, did you ever verify the fix using the attached build? If not, do you mind doing so when you get a chance? Thanks!

  8. Scott Wells reporter

    Fix for another instance of this delivered in 2.0.6.7. Waiting for feedback from Jason before updating IC1 with the same fix.

  9. Jason Skowronek

    Sorry for the delay. Just installed update and appears to have resolved the error. Thanks for jumping on my issue so quickly.

  10. Scott Wells reporter

    Thanks for verifying! I'll get a new build of IC1 out tomorrow with this and a few other small fixes. Just stay on that build until prompted to update, and the update will include the same fix. Thanks again!

  11. Scott Wells reporter

    The new fix was delivered for IC1 via 1.8.5.2. Jason, feel free to take the latest official build as it includes this fix.

  12. Jason Skowronek

    Wanted to give you heads up that I just received this error when syncing metadata. Looks related.

    getInputStream() must not be called against a directory: file://path/to/DevelopPro/src/dashboards/CompanyDashboards

  13. Scott Wells reporter

    Jason, can you share the portion from the bottom of your .iml file that looks like:

      <component name="NewModuleRootManager" inherit-compiler-output="true">
        <exclude-output />
        <content url="file://$MODULE_DIR$">
          <sourceFolder url="file://$MODULE_DIR$/app/src" isTestSource="false" />
          <sourceFolder url="file://$MODULE_DIR$/test/src" isTestSource="true" />
          <sourceFolder url="file://$MODULE_DIR$/resource-bundles" isTestSource="false" />
        </content>
        <orderEntry type="jdk" jdkName="IlluminatedCloud (df17/demo)" jdkType="IlluminatedCloud" />
        <orderEntry type="sourceFolder" forTests="false" />
      </component>
    

    I helped another user with just such a problem the other day and it was due to a slightly misconfigured project. Let's see if you're experiencing the same.

  14. Log in to comment