"Missing SDK": Again

Issue #415 resolved
jrattanpal created an issue

This is happening to me in every project. I closed a project, opened another one (to test that other issue) and re-opened previous project.

This one gave me missing SDK error again. I am attaching all screenshots/logs. I clicked Resolve but then got that second (modules must be ...) error.

Then I opened Project Settings. It was missing SDK (it was there before because I was working with the project). And re-adding the existing SDK worked.

Not sure why this keeps happening (very annoying).

Thanks

Comments (35)

  1. Scott Wells repo owner

    Okay, that's really strange, and I'm really sorry it's happening to you again and so broadly. Let me take a look at the logs and see what's going on so that I can resolve this for you for good.

  2. jrattanpal reporter

    I wonder if your code says "it's Jaswinder, let's do beta testing". :) :)

    Thanks for looking into it. As long as these are quickly fixable and don't block the work, it's ok (like that previous issue).

  3. jrattanpal reporter

    To add, it seems that now it not only removes SDK but also removes connection to org. I noticed that in the last project but thought maybe I missed it.

    But now in this one, I noticed that connection is gone when I was trying to refresh/retrieve metadata. Maybe that was the issue in other one too? Whatever used to remove SDK, now also removes connection information. or maybe update to IC caused some sort of corruption and SDK change and connection removal?

  4. jrattanpal reporter

    And now, after adding connection, it says that "Offline symbol table" is "None". When i click "Generat", I get following error.

    And then it asks me to reopen the project to rebuild caches (same error as previous ticket) but fails and still doesn't generate offline map.

    and after I reopen project, the "Selected" option (3rd screenshot) is gone. seems lik eproject is now invalidated and I might have to recreate this project too.

    c_generate_offline_table_error.png

    c_generate_offline_table_error-2.png c_error_3.png

  5. jrattanpal reporter

    Ok, seems like I have no option other than re-creating the project for this to work. Thanks

  6. Scott Wells repo owner

    Okay. I'll look at the logs. This stuff is all inter-related (connection => OST => SDK), so my guess is that something has failed upstream and is having a cascade effect. Hopefully there will be something obvious on the logs about what happened. For what it's worth, you should be able to get things back into a good state by configuring the connection and generating the OST for it, but of course, this also shouldn't be happening to start!

  7. jrattanpal reporter

    I did create connection, re-added IC module but "Selected" option was disabled. Then I changed it to use package.xml and it worked. But not sure why selected was "disabled" completely.

    Yes, somehow all interconnected but not sure what starts it.

    Thanks

  8. Scott Wells repo owner

    Well, the connection has to be associated with the module as well. My guess is that's the disconnect. The reason that Selected would be disabled but Package.xml would work is that the former requires a valid connection so that it can populate the tree of metadata from the org whereas the latter doesn't because it's based on a local file.

  9. jrattanpal reporter

    Connection is there. I did a test and it was validated. And after I add package.xml, it successfully downloaded the metadata so connection is there.

  10. Scott Wells repo owner

    You can have a connection that can actually connect to the org, but in order for Selected to light up it also has to be associated with that specific module (connections can be one-to-many with modules). The fact that it's disabled means that the association between the module and the connection wasn't properly established after the connection was recreated.

  11. jrattanpal reporter

    Ok, something is wrong with current release that was updated today; a hidden bug somewhere.

    I created new project: - It didn't attach SDK even though I provided connection info - Then I created new module - Built offline map but it didn't work - rebuilt caches but didn't work - retrieve metadata doesn't work (even though connection is there and "Selected" is enabled)

    Not sure what to do now.

  12. Scott Wells repo owner

    Okay, I see the following in your log:

    2016-09-26 14:53:34,028 [ 258620]  ERROR - ntellij.facet.FacetManagerImpl - Only one 'Illuminated Cloud' facet per module allowed, but 2 facets found in module 'GiGi' 
    java.lang.Throwable
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:127)
        at com.intellij.facet.FacetManagerImpl.a(FacetManagerImpl.java:405)
        at com.intellij.facet.FacetManagerImpl.commit(FacetManagerImpl.java:317)
        at com.intellij.facet.impl.FacetModelImpl.commit(FacetModelImpl.java:89)
        at com.illuminatedcloud.intellij.settings.module.IlluminatedCloudFacet.createFacet(SourceFile:27)
        at com.illuminatedcloud.intellij.moduletype.IlluminatedCloudModuleBuilder.moduleCreated(SourceFile:252)
    

    That's almost certainly the issue. Let me see if I can reproduce it locally.

  13. Scott Wells repo owner

    Okay, I just created a new project against one of my orgs and didn't see the same issue. Are you by chance backgrounding the initial metadata retrieval and/or OST generation and then clicking on Resolve in the warning? How are you creating the new project/module? Just trying to make sure that I'm following the same steps as you so that I can have a better chance of reproducing what you're seeing.

  14. jrattanpal reporter

    Ok, I recorded and sent you the share. Although, I couldn't reproduce the issue where it didn't sync but I did reproduce that SDK issue (regularly).

    and I also go through the process of how i create new project.

    One thing to note, in both cases, I had another project open. I sometimes closed the project (or switched it). Not sure if that has anything to do with it.

    ANd in 1 case, created a project (that created SDK), deleted the project folder and recreated with same name. Strangely, in earlier projects, it created ICSDK in documents/IdeaProjects folder even though I picked a different root folder for my project.

    So too many variables and I can't say what caused it but definitely having issues today (especially with the latest update of IC that I did this morning)/

  15. Scott Wells repo owner

    Thanks for the video. I just emailed you in response, but it looks like you're requesting OST generation for the new project but then moving that to the background and trying to resolve the issues that would be resolved by successful OST generation. Perhaps I should make that a true modal dialog when it's generating for project creation, or perhaps not allow you to try to resolve the reported issues while the OST is generating. As it is, it's creating a race condition on the module/connection/OST/SDK config that's leaving things in a bad state.

    Please let me know if you can reproduce this issue when allowing OST generation to complete. I'll think about how I might keep users from accidentally doing this since it does result in such a bad state.

  16. Scott Wells repo owner

    I'm going to disallow backgrounding of the post-project/module creation actions (deploy/retrieve and OST generation). Those actions will still be backgroundable when run outside of the creation wizard.

  17. jrattanpal reporter

    This is still happening:

    • Created new project
    • Let it complete everything and didn't disturb
    • Restart Idea (not reopen project; just to be sure)
    • Open project structure and SDK is not set or created)
    • Manually create SDK and use that.

    Log file is attached. It does show that SDK was not created for "TE LC Demo" project.

  18. Scott Wells repo owner

    I'm not seeing anything telling in the provided log file. Do you mind adding the following for debug logging:

    com.illuminatedcloud.intellij.moduletype.IlluminatedCloudModuleValidator
    

    then close and reopen the project and click the Resolve link to regenerate the OST and SDK.

  19. jrattanpal reporter

    I manually set it this time. But I'll add this debug log line and if this happens again then will provide logs.

    Or is there a manual test that I can do?

    -- Jaswinder Rattanpal www.rattanpal.com

  20. Scott Wells repo owner

    No, if you're in a good state that class won't report anything interesting. When you're in a state where it's showing that warning about needing to resolve issues that class will tell me exactly why it thinks you're in that state. Then I can backtrack though the log to see what might have put it into that state.

  21. Scott Wells repo owner

    I'm made MAJOR changes to the module validator in 1.7.8.0 that should fix this for you. Please let me know if you do ever see this or any other false negative again.

  22. Khushbu Agarwal

    Hi, I am facing the same issue.

    I have installed Intelli-J and illuminated cloud 2 plugin.

    But when I create a project , it gives me 2 errors.

    When I click on resolve, it gives me another error that “unable to find certification path to requested target“. I have attached both screenshots.

    Could you please help me resolve these errors.

    Thank You.

  23. Scott Wells repo owner

    That occurs when it's not able to make successful API calls to the Salesforce servers because the server certificates won't validate, and that occurs when there's an intermediate proxy or firewall issuing substitute certificates. For security reasons Illuminated Cloud 2 will not accept certificates that do not validate without explicit configuration. You can find out more here about how to you configure the IDE to accept known certificates that are not part of the expected CA chain:

    https://bitbucket.org/RoseSilverSoftware/illuminatedcloud/wiki/User_Guide/Configuring_the_IDE_to_Accept_Substitute_SSL_Certificates

  24. Khushbu Agarwal

    I have checked the checkbox to accept non-trusted certificates and I have also added CA certificate from the browser but still no luck.

    Is there any other tried solution to solve this?

  25. Khushbu Agarwal

    It works for my other colleagues who are using the same corporate laptop with the same configurations.

  26. Scott Wells repo owner

    If it doesn't work configuring from the perspective of the IDE, you may have to import the correct certificates into the IDE's host JVM's keystore as documented on that same page at the bottom:

    If you continue to experience issues after configuring the IDE for SSL certificates, you may need to configure the key store for the entire process as described here (under Resolution) and here (under Configuring JVM options).

    I'm also happy to exchange emails with your IT department so they can assist since presumably they have configured the proxy/firewall and might have more insights into its configuration.

  27. Khushbu Agarwal

    Hi Scott,

    I have added the certificate from the browser in the keystore but still no luck. Could you please let me know if we can setup a meeting together to check the issue since I am stuck with the issue and not able to proceed further.

    Thanks,

    Khushbu

  28. Scott Wells repo owner

    Unfortunately there's not much I'm able to do beyond what is documented in the user guide. Ultimately this is not an Illuminated Cloud-specific issue but is rather due to the underlying network issuing certificates that do not validate properly in a certificate chain, and you must configure the IDE and/or its host JVM to accept exactly those certificates. If you haven't already, in my experience it's best to involve the IT group responsible for the proxy or firewall that issues these substitute certificates so they can make sure that the correct certs are being registered with the IDE/JVM.

  29. Log in to comment