"Add to metadata subscription" not displayed anymore

Issue #2430 resolved
Asma Rauf created an issue

Hi Scott,

Ever since I upgraded to IntelliJ IDEA 2023.1.5, I no longer see "Add to metadata subscription". I have been using Dev console to deploy an empty class skeleton. I retrieve it later using custom contents. This is how it looks on new classes and LWCs

Comments (17)

  1. Scott Wells repo owner

    Hi. What is the configured subscription for this project/module? Can you attach your project’s .iml file and also the idea.log file (Help | Show Log in Explorer) for review?

  2. Scott Wells repo owner

    Thanks. I’m not sure if this is the issue, but it looks like you have two source roots configured, one as the child of another:

          <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
          <sourceFolder url="file://$MODULE_DIR$/src/lwc" isTestSource="false" />
    

    Can you please try removing the second to see if that resolves the issue? If so, that’s likely a bug in IC2, though one with a reasonable workaround. Note that you can remove it here (Illuminated Cloud | Configure Module | Project Structure tab):

  3. Asma Rauf reporter

    I added this source root today trying to solve the problem. Doesn’t fix it even when I remove it.

    Also want to add that I can’t even subscribe to LWCs. It doesn’t show up. Screenshot attached. I have to use VS code to deploy LWCs now :(

    Thanks again!

  4. Scott Wells repo owner

    Let’s see if removing that nested source folder fixes that as well since the nested folder is specifically lwc.

  5. Scott Wells repo owner

    Please do two things:

    1. You’re on a slightly old version of IC2 (2.2.7.7). Please update to the latest (2.2.8.3) and see whether that changes anything.
    2. If it doesn’t, please close the project in the IDE, remove the .idea directory and .iml file for the project (if it wasn’t under .idea), reopen the project, and allow IC2 to reconfigure it. Let’s see if there was something weird wedged in the project config.

    If you do both of those and are still having the issue, I’ll likely need to grab some debug logs from you.

  6. Asma Rauf reporter

    I did try both steps sequentially. I see the option “Add to metadata subscription” now. But nothing happens and when I try to deploy LWC, it doesn’t show up

  7. Asma Rauf reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form>

  8. Scott Wells repo owner

    Thank you. I’m not seeing any attempt at a deployment after you set things up for debug logging. I see a metadata retrieval that was already in progress, and then it looks like you’re trying to refresh the metadata cache for the org, and that’s failing with quite a few connection timeout issues, e.g.:

    javax.xml.ws.WebServiceException: Could not send Message.
        at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:183)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
        at jdk.proxy8/jdk.proxy8.$Proxy281.checkRetrieveStatus(Unknown Source)
        at com.illuminatedcloud.intellij.builder.ForceComMetadataRetriever.lambda$performRetrieve$1(SourceFile:153)
        at com.illuminatedcloud.client.ForceComApiClient.runWithClient(SourceFile:317)
        at com.illuminatedcloud.client.ForceComApiClient.runWithClient(SourceFile:412)
        at com.illuminatedcloud.intellij.builder.ForceComBuilder.runWithClient(SourceFile:870)
        at com.illuminatedcloud.intellij.builder.ForceComMetadataRetriever.performRetrieve(SourceFile:152)
        at com.illuminatedcloud.intellij.builder.AbstractForceComMetadataRetriever$1.run(SourceFile:208)
        ...
    Caused by: java.net.ConnectException: ConnectException invoking https://icac--dev.sandbox.my.salesforce.com/services/Soap/m/58.0/00D3J0000000hMcUAI: Connection timed out: no further information
    

    That would generally occur when there’s a proxy server on the network and the IDE isn’t configured properly for it, but since I don’t see any other deployment (including deploy-on-save) attempt in the log, I don’t know if that’s affecting LWC deployment or not.

    Can you please attempt a deployment of both an LWC that hasn’t worked for you and anything else in your project, e.g., an Apex class, and then send me a new idea.log for review?

  9. Asma Rauf reporter

    I couldn’t take screenshots in time but I was prompted with a message to upgrade my Intellij from 2023.1.5 to 2023.2.0 as that’s the minimum supported version for updated version of Illuminated cloud so I did that and now meta.xml files won’t stop showing up under classes. I have selected/unselected show meta.xml files many times. It doesn’t go away

    I am able to generate offline symbol table fine. I can also retreive and deploy existing classes and LWCs. The logs are not generated because I am not able to deploy the new class or LWC I create in Intellij after adding it to subscription. It doesn’t show up and I get stuck there

  10. Asma Rauf reporter

    1- I upgraded IntelliJ to version 2023.2.0 to fix the compatibility issue

    2- restarted my machine

    3- closed my project

    4- Opened it again

    5- src was showing under excluded folders now. So I marked it under Sources

    And now I am able to deploy newly created classes and LWCs. The issue of meta-xml always displaying has also been resolved.

    Thanks so much Scott for your patience, help and time. I appreciate it!

  11. Scott Wells repo owner

    Okay, I'll go ahead and resolve it, but I'm curious as to why src was marked as excluded. That would certainly explain the behavior, but I just don't know how it would happen. IC2 doesn't mark things as excluded itself. If you see anything like that happen again, please let me know.

  12. Asma Rauf reporter

    thank you, I would let you know. It only showed up under excluded after I upgraded IntelliJ, closed and opened project again. I had checked project structure many times yesterday and it was always under source folders

  13. Log in to comment