Roboroads/laravel-tinker

[Bug]: 2.6.0 crashes with SSH Interpreter

evgeek opened this issue · 10 comments

Short bug description

After plugin update from 2.5.1 to 2.6.0 it doesn't work

Extended bug description

First attempt to run Laravel Tinker crashes with below error. Additional attempts do nothing. The problem is only with the remote (vagrant) interpreter, the host interpreter works well. Remote interpreter works with running tests from IDE and running scripts, problem only with Laravel Tinker plugin :(

java.lang.ClassCastException: class com.intellij.remote.ColoredRemoteProcessHandler cannot be cast to class com.intellij.execution.process.OSProcessHandler (com.intellij.remote.ColoredRemoteProcessHandler and com.intellij.execution.process.OSProcessHandler are in unnamed module of loader com.intellij.util.lang.PathClassLoader @47d384ee)
	at nl.deschepers.laraveltinker.util.PhpArtisanTinkerUtil.run(PhpArtisanTinkerUtil.kt:100)
	at nl.deschepers.laraveltinker.util.TinkerConsoleUtil.runTinkerWithFile(TinkerConsoleUtil.kt:32)
	at nl.deschepers.laraveltinker.linemarkerprovider.TinkerRunLineMarkerProvider.getLineMarkerInfo$lambda$0(TinkerRunLineMarkerProvider.kt:29)
	at com.intellij.codeInsight.daemon.NavigateAction.actionPerformed(NavigateAction.java:61)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:333)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:307)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:356)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:307)
	at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.performAction(EditorGutterComponentImpl.java:2222)
	at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.invokeGutterAction(EditorGutterComponentImpl.java:2164)
	at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.mouseReleased(EditorGutterComponentImpl.java:2142)
	at com.intellij.openapi.editor.impl.EditorImpl.processMouseReleased(EditorImpl.java:2348)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.lambda$runMouseReleasedCommand$1(EditorImpl.java:3977)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.runMouseReleasedCommand(EditorImpl.java:3979)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.mouseReleased(EditorImpl.java:3861)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6656)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
	at java.desktop/java.awt.Component.processEvent(Component.java:6421)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:790)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:763)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:761)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:666)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:614)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:569)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:994)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:994)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Your project is not the problem

  • I tried using a fresh laravel install - I'm fairly certain it has nothing to do with my project.

How to reproduce?

Try to run any code with 2.6.0 plugin and Vagrant interpreter I guess

Expected behavior

Plugin works with remote interpreter

Screenshots

Local interpreter:
Screenshot 2023-04-19 at 14 58 57

Remote interpreter:
Screenshot 2023-04-19 at 15 01 37

IDE & Version

2023.1

PHP Version

8.2

OS and version

MacOS 13.0.1

Laravel Tinker plugin version

2.6.0

Interpreter type

Remote

Laravel Version

10.4.1

Tinker version

2.8.1

Psysh version

v0.11.13

Additional Context

The plugin is great, thanks!

Yep, i was afraid of this. Will be fixed in 2.6.1 :)

same problem here, so tinker is no longer working, would be happy to see a fix soon, cause it´s my daily helper ❤️ 😊 working without it, is a mess 🙈

working without it, is a mess 🙈

I'm so sorry, hehe.. 🥲

I'm trying to release a fix before the week ends, so JB can accept it monday/tuesday.

@Roboroads pardon, do you have an idea, when this will be fixed ??? thanks !!
i donated 10€ - hope it helps a bit 🙈 😊

Dontaion was not needed but welcome either way, thanks <3

I've been working on this for a couple of weeks. Coming sunday is my next planned time to work on this 😊

you deserve that, hope more people donate, so you don´t lose interest in this wonderful piece of software you created ❤️

@michabbb I wasn't going to. Also, I fixed it today :)

@Roboroads i can confirm: the latest version is working again. thanks so much !!! 💪 👍

@Roboroads btw... in case you remember my issue with seeing the output twice: it´s gone with this update 😁

@michabbb it might have been that pty flag I removed for the other bug. It wasn't needed before, i'm not sure why i added it, its gone now and fixes multiple issues. Oops 😬

Thanks for testing as well!