Iris icon indicating copy to clipboard operation
Iris copied to clipboard

/iris studio vscode fails silently in unsupported environments

Open Quik2007 opened this issue 7 months ago • 2 comments

Problem

  1. Install Iris...
  2. Run /iris studio vscode <some dimension> (in some environment where Iris cannot open a VSCode session, like when ran in a distrobox container on linux)

You will get:

[18:42:15 INFO]: Wolwo_21 issued server command: /iris studio vsc dimension=QuamesOverworld
[18:42:15 INFO]: [Iris]: Opening VSCode. You may see the output from VSCode.
[18:42:15 INFO]: [Iris]: VSCode output always starts with: '(node:#####) electron'
[18:42:15 WARN]: java.io.IOException: Failed to show URI:file:/var/home/Quames/plugins/Iris/packs/quamesoverworld/overworld.code-workspace
[18:42:15 WARN]: 	at java.desktop/sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:124)
[18:42:15 WARN]: 	at java.desktop/sun.awt.X11.XDesktopPeer.open(XDesktopPeer.java:87)
[18:42:15 WARN]: 	at java.desktop/java.awt.Desktop.open(Desktop.java:431)
[18:42:15 WARN]: 	at Iris-3.6.5-1.20.1-1.21.4.jar//com.volmit.iris.core.project.IrisProject.doOpenVSCode(IrisProject.java:205)
[18:42:15 WARN]: 	at Iris-3.6.5-1.20.1-1.21.4.jar//com.volmit.iris.core.project.IrisProject.lambda$openVSCode$1(IrisProject.java:169)
[18:42:15 WARN]: 	at Iris-3.6.5-1.20.1-1.21.4.jar//com.volmit.iris.util.scheduling.J.attemptCatch(J.java:145)
[18:42:15 WARN]: 	at Iris-3.6.5-1.20.1-1.21.4.jar//com.volmit.iris.util.scheduling.J.attempt(J.java:132)
[18:42:15 WARN]: 	at Iris-3.6.5-1.20.1-1.21.4.jar//com.volmit.iris.util.scheduling.J.lambda$attemptAsync$2(J.java:102)
[18:42:15 WARN]: 	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1456)
[18:42:15 WARN]: 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[18:42:15 WARN]: 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[18:42:15 WARN]: 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[18:42:15 WARN]: 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[18:42:15 WARN]: 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

This should be handled properly and not silently fail just from a UX perspective.

Solution

No response

Minecraft Version

1.21

Iris Version

Iris-3.6.5-1.20.1-1.21.4

Log

https://mclo.gs/ltEmqgO

Quik2007 avatar Apr 09 '25 16:04 Quik2007

We don't support iris studio in unsupported environments. Also, generally whatever reason makes the environment unsupported is why we cant operate as intended, and why we cant safely or cleanly execute additional code to handle the exception.

AvianAeternum avatar Apr 10 '25 02:04 AvianAeternum

I do understand that you are not supporting unsupported environments, this is quite easy to infer syntactically speaking.

Yet I think the requirement of having VSCode installed in one exact way and silently failing if that assumption doesn't hold true seems bad practice. I'd suggest just adding an error message that the URI couldn't be opened and providing the path of the workspace file for manual editing.

Quik2007 avatar Apr 12 '25 05:04 Quik2007