mbolotov / intellij-cypress

IntelliJ-Cypress plugin: https://plugins.jetbrains.com/plugin/13819-intellij-cypress Pro version: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro
MIT License
35 stars 5 forks source link

webstorm throws kotlin.KotlinNullPointerException when trying to create run configuration #2

Closed brain4711 closed 4 years ago

brain4711 commented 4 years ago

I'm getting the following exception in the webstorm error log (bottom right corner) when creating a new Cypress Run Configuration from the Webstorm GUI.

In my workspace I hava a Nx-Monorepo with an angular app and the default cypress configuration

Webstorm version: 2019.3.4 Buildversion: 193.6911.28 Cypress: 3.8.2

kotlin.KotlinNullPointerException
    at me.mbolotov.cypress.run.CypressRunConfig.suggestedName(CypressRunConfig.kt:75)
    at com.intellij.execution.impl.RunConfigurable.suggestName(RunConfigurable.kt:943)
    at com.intellij.execution.impl.RunConfigurable.createNewConfiguration(RunConfigurable.kt:935)
    at com.intellij.execution.impl.ConfigurationSettingsEditorWrapper$2.linkSelected(ConfigurationSettingsEditorWrapper.java:183)
    at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:142)
    at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:356)
    at com.intellij.ui.components.labels.LinkLabel$MyMouseHandler.mouseReleased(LinkLabel.java:330)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
    at java.desktop/java.awt.Component.processEvent(Component.java:6416)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
[...]
mbolotov commented 4 years ago

Hi @brain4711 I've committed a check for nulls, it will not fail with exception there. But if one get a run config with null values then we still have a problem since it will fail later at other steps. So if you are stably getting a run config with null values - I need exact steps to reproduce this issue.

dubrox commented 4 years ago

I ended up with the same exception, but then followed the method described in the README, which creates a test configuration with a pre-filled name, and I could proceed without issues.

Glad to see that the null pointer exception will be available in the next release :D

brain4711 commented 4 years ago

Yep, no exceptions with release 1.2.1 Awesome work! Thanks to @mbolotov