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

IntelliJ IDEA 2022.1.3 & Cypress plugin Pro 3.1 #96

Closed jovancacvetkovic closed 1 year ago

jovancacvetkovic commented 2 years ago

me.mbolotov.cypress.run.CypressConfigurationType$1@3a94a6af produced wrong type

java.lang.ClassCastException: class me.mbolotov.cypress.run.CypressRunConfig cannot be cast to class me.mbolotov.cypress.run.CypressRunConfig (me.mbolotov.cypress.run.CypressRunConfig is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @50eb9b4; me.mbolotov.cypress.run.CypressRunConfig is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @899329c) at me.mbolotov.cypress.run.CypressRunConfigProducer.setupConfigurationFromCompatibleContext(CypressRunConfigProducer.kt:20) at com.intellij.execution.actions.CompatibleRunConfigurationProducer.setupConfigurationFromContext(CompatibleRunConfigurationProducer.java:30) at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:100) at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:197) at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:118) at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:100) at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:412) at com.intellij.execution.actions.ConfigurationContext.findPreferredConfiguration(ConfigurationContext.java:291) at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:284) at com.intellij.execution.actions.BaseRunConfigurationAction.findExisting(BaseRunConfigurationAction.java:60) at com.intellij.execution.actions.BaseRunConfigurationAction.fullUpdate(BaseRunConfigurationAction.java:215) at com.intellij.execution.actions.BaseRunConfigurationAction.update(BaseRunConfigurationAction.java:180) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:645) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:126) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:176) at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:127) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:112) at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:634) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:478) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:457) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:457) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:535) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:457) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:457) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:535) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:457) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:457) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:535) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:457) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:457) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:535) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:457) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:457) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:260) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$12(ActionUpdater.java:321) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$13(ActionUpdater.java:339) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$17(ActionUpdater.java:371) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:367) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$14(ActionUpdater.java:339) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176) at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$15(ActionUpdater.java:338) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31) at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:829)

mbolotov commented 2 years ago

It seems like some state of the plugin has not been cleared properly. Could you try to make a complete uninstall of the plugin and then install it back? And the same for #95

jovancacvetkovic commented 2 years ago

OK, no error now but other issue: I can not run specs from file like before only to make a run configuration for the file. Also there is a Preferences/Language/Cypress setting where it still asks for json config? I'm testing Cypress 10.2.0 as I am on MacBook with M1 processor.

jovancacvetkovic commented 2 years ago

Also, I noticed that it does not offer cypress run config but jest/mocha only when trying to add run config from the file. It does work when adding run config from the menu and selecting cypress.

mbolotov commented 2 years ago

I'm currently working on support for Cypress 10. The new configuration is not compatible with the current plugin.

Meanwhile, you can try a plugin bundle from #94. It relaxes some checks and thus it should be able to create a run configuration from the editor even for Cypress 10

mbolotov commented 2 years ago

hi @yeyalab! the plugin 3.2 supporting Cypress 10 has been released today. can we close both this issue and #95?

jovancacvetkovic commented 1 year ago

Hi, not sure :) there are some new issues I've been seeing Unable to evaluate a Cypress configuration due to 'Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 6 path $'. Evaluation result: node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'undefined/Cypress/Cache/10.2.0/Cypress/resources/app/packages/data-context/src/DataContext.js' Require stack: - /Users/jcvetkovic/workspace/puzzle/[eval] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at [eval]:1:19 at Script.runInThisContext (node:vm:129:12) at Object.runInThisContext (node:vm:305:38) at node:internal/process/execution:75:19 at [eval]-wrapper:6:22 at evalScript (node:internal/process/execution:74:60) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/jcvetkovic/workspace/puzzle/[eval]' ] }

mbolotov commented 1 year ago

@yeyalab I've uploaded 3.2.2 plugin version with a fix for this problem. While it's waiting for Jetbrains approval, you can download it directly and give a try: https://plugins.jetbrains.com/files/13987/201265/Cypress_Support_Pro-3.2.2.zip update: it has been approved by Jetbrains and available in marketplace now

mbolotov commented 1 year ago

should be fixed in 3.2.2