Bad password is not caught or reported in UI or log file

Issue #124 resolved
Michael Hoefer created an issue

Exception in log when attempting to generate symbol table from Settings.

Details: Just installed the plugin, restarted, IntelliJ, connected to existing org. Running IDEA in Java 8. Plugin appears to not be fully loaded or running. Compile/deploy of file does not work, bulk compile/retrieve does nothing. The only thing that generates an error in the log is trying to generate the symbol table. Rather stuck here.

Fuller log entry:

java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115) at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:681) at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudProjectConfigurable.updateOfflineSymbolTableStatus(SourceFile:730) at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudProjectConfigurable.setSelectedConnection(SourceFile:703) at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudProjectConfigurable.reset(SourceFile:1286) at com.intellij.openapi.options.ex.ConfigurableWrapper.reset(ConfigurableWrapper.java:177) at com.intellij.openapi.options.newEditor.OptionsEditor.c(OptionsEditor.java:514) at com.intellij.openapi.options.newEditor.OptionsEditor.access$1900(OptionsEditor.java:67) at com.intellij.openapi.options.newEditor.OptionsEditor$9$1$1.run(OptionsEditor.java:476) at com.intellij.openapi.application.impl.ApplicationImpl.runEdtSafeAction(ApplicationImpl.java:1093) at com.intellij.openapi.options.newEditor.OptionsEditor$9$1.run(OptionsEditor.java:469) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:908) at com.intellij.openapi.options.newEditor.OptionsEditor$9.run(OptionsEditor.java:466) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:406) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56) 2015-10-01 17:15:53,413 [ 526757] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 14.0.4 Build #IU-139.1603.1 2015-10-01 17:15:53,413 [ 526757] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_31 2015-10-01 17:15:53,413 [ 526757] ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM 2015-10-01 17:15:53,413 [ 526757] ERROR - plication.impl.ApplicationImpl - Vendor: Oracle Corporation 2015-10-01 17:15:53,413 [ 526757] ERROR - plication.impl.ApplicationImpl - OS: Mac OS X 2015-10-01 17:15:53,413 [ 526757] ERROR - plication.impl.ApplicationImpl - Last Action: ShowSettings

Comments (8)

  1. Michael Hoefer reporter

    I logged this issue originally as simply: Could not initialize class com.illuminatedcloud.util.IlluminatedCloudExceptionUtil

    Then I went back and rechecked by credentials used, and found that I had actually entered the wrong password for the org I was using. That seems to have caused all of the issues, because once I fixed that, the symbol table could be generated and things started working properly. No wonder, I know.

    So this issue is less critical, but worth logging: you don't seem to report a bad password, or username, etc. Nothing is reported in the UI, or the log. Again, the only error in the log reported was that ClassDefNotFound exception, which said nothing about a bad password...and was buried in the idea.log. So, please add some sort of authentication check. People mistype passwords or sec tokens all the time. thx.

  2. Scott Wells repo owner

    Michael, I noticed that you're on IntelliJ IDEA 14.0.4. Some of my users have seen these kinds of issues with the earlier builds of IDEA 14. Can you update to 14.1.5 and see if that resolves these issues?

    UPDATE: Yeah, the NoClassDefFoundError is from the earlier build of IDEA that didn't have the full plugin SDK. I think that once you update to a more recent version of IDEA, you'll get the correct error message from Salesforce when you supply invalid credentials:

    InvalidLogin.png

  3. Michael Hoefer reporter

    Ah. We'll see...I've been holding off on 14.1 because it is a full upgrade license and I just didn't see much value, given I'm off Java and on Salesforce now (sigh). We'll see. Sounds like you know exactly what is going on there, so feel free to close out this issue as fixed or not a bug, etc.

  4. Michael Hoefer reporter

    Actually, the problem still exists after upgrading to 14.1.5:

    2015-10-01 17:47:44,274 [ 135520] ERROR - plication.impl.ApplicationImpl - Could not initialize class com.illuminatedcloud.util.IlluminatedCloudExceptionUtil java.lang.NoClassDefFoundError: Could not initialize class com.illuminatedcloud.util.IlluminatedCloudExceptionUtil at com.illuminatedcloud.intellij.settings.project.OfflineSymbolTableGenerator$3.run(SourceFile:236) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563) at com.intellij.openapi.progress.impl.CoreProgressManager$8.run(CoreProgressManager.java:367) at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137) at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:617) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:400) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56) 2015-10-01 17:47:44,275 [ 135521] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 14.1.5 Build #IU-141.2735.5 2015-10-01 17:47:44,275 [ 135521] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_31 2015-10-01 17:47:44,275 [ 135521] ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM 2015-10-01 17:47:44,275 [ 135521] ERROR - plication.impl.ApplicationImpl - Vendor: Oracle Corporation 2015-10-01 17:47:44,275 [ 135521] ERROR - plication.impl.ApplicationImpl - OS: Mac OS X 2015-10-01 17:47:44,275 [ 135521] ERROR - plication.impl.ApplicationImpl - Last Action:
    2015-10-01 17:47:44,762 [ 136008] INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 219 ms

    Just changed my password to something bogus, got no feedback. Hit Apply...no feedback. Hit Retrieve (for Org Namespace)...no feedback. Hit Generate...no feedback, but the exception was thrown in the log.

  5. Scott Wells repo owner

    That's definitely odd. Given the number of issues you're hitting, my guess is that it's something environmental. The other thing that stands out to me is that you're running IntelliJ IDEA under Oracle's Java 8. There's a host of issues when running IDEA under anything but Apple's Java 6 on a Mac that may be coming into play here:

    https://intellij-support.jetbrains.com/hc/en-us/articles/206827627-IDE-doesn-t-start-after-updating-to-Mac-OS-Yosemite-or-Mavericks

    You can change IDEA's host JRE using the following:

    https://intellij-support.jetbrains.com/hc/en-us/articles/206827547-Selecting-the-JDK-version-the-IDE-will-run-under

    I primary develop the plugin on Windows, but I have a Mac for testing and validation purposes. On that machine I'm using Apple's Java 6 JRE and IDEA 14.1.5 and just ran through the two cases that are failing for you, and I'm not seeing the same issues. Now that you're up to 14.1.5, do you mind checking out the JRE?

    I'm confident that I can get you past these issues as roughly half of my users are on Macs!

  6. Michael Hoefer reporter

    I'm confident too...but it is not the JDK. I just installed legacy Java 6 and restarted. IntelliJ is using it, but still no deploy/compile on save.

  7. Scott Wells repo owner

    Yeah, I think I know what's going on here. You said you were already developing Force.com stuff in IDEA. That means that you already had a module set up for that source root of another module type and may have even associated some of the extensions with other file types. You're going to need to address three things before the plugin is going to work properly:

    1. Create a new Illuminated Cloud-type module on your source root.
    2. Make sure that the module root is a child or descendant of the project root (I'm considering changing from a library to an SDK in IDEA plugin SDK parlance to resolve this one).
    3. Make sure that key extensions such as .cls, .trigger, .page, .component, etc., are associated with the Illuminated Cloud file types if they were associated with other file types like Java or HTML. Make sure that the .resource extension isn't associated with any file type because Illuminated Cloud performs a dynamic association based on the content-type of the corresponding meta.xml file.

    It's more of a nuisance when you're bringing in the plugin on top of an existing IDEA config, but take my word...it's very much worth it on the other side!

    Let me know how it goes. I'm definitely available to help you through these initial changes to get you going!

  8. Scott Wells repo owner

    Assuming this one was resolved with all the changes to resolve the other. Feel free to reopen if it's still reproducible.

  9. Log in to comment