nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.61k stars 606 forks source link

Taskbar API is not supported on the current platform error when running console command #5002

Closed jfy133 closed 1 month ago

jfy133 commented 1 month ago

Bug report

When running nextflow console on 24.04.0-edge I get the error

May-16 13:25:36.153 [main] ERROR nextflow.cli.Launcher - @unknown
java.lang.UnsupportedOperationException: Taskbar API is not supported on the current platform
    at java.desktop/java.awt.Taskbar.getTaskbar(Taskbar.java:217)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
    at nextflow.ui.console.ConsoleRunner.loadDockIcon(ConsoleRunner.groovy:76)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
    at nextflow.ui.console.ConsoleRunner.run(ConsoleRunner.groovy:58)
    at nextflow.cli.CmdConsole.run(CmdConsole.groovy:50)
    at nextflow.cli.Launcher.run(Launcher.groovy:503)
    at nextflow.cli.Launcher.main(Launcher.groovy:657)

Expected behavior and actual behavior

nextflow console loads the console window

Steps to reproduce the problem

NXF_VER=24.04.0-edge nextflow console

Program output

Contents of - .nextflow-console.log

May-16 13:29:30.661 [main] ERROR nextflow.cli.Launcher - @unknown
java.lang.UnsupportedOperationException: Taskbar API is not supported on the current platform
    at java.desktop/java.awt.Taskbar.getTaskbar(Taskbar.java:217)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
    at nextflow.ui.console.ConsoleRunner.loadDockIcon(ConsoleRunner.groovy:76)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
    at nextflow.ui.console.ConsoleRunner.run(ConsoleRunner.groovy:58)
    at nextflow.cli.CmdConsole.run(CmdConsole.groovy:50)
    at nextflow.cli.Launcher.run(Launcher.groovy:503)
    at nextflow.cli.Launcher.main(Launcher.groovy:657)

Environment

GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

Additional context

(Add any other context about the problem here)

pditommaso commented 1 month ago

Ouch, thanks for reporting. Solved by 0ea09ccc.

pditommaso commented 1 month ago

You can tests it, cloning this repo, running make compile, and then ./launch.sh console

pditommaso commented 1 month ago

@maxulysse reported that's ok!

maxulysse commented 1 month ago

Works well for me

jfy133 commented 1 month ago

I can't test until next Tuesday earliest, so if you trust Maxime fine with me :)

pditommaso commented 1 month ago

we do 😄

jfy133 commented 1 month ago

Just as valdiation, just tested and can confirm it loads now.

Played around a bit and it all seems to work, except the 'Edit > Preferences' menu fails (error belows)

If preferences is meant to be a valid menu happy to make a new issue

Exception in thread "AWT-EventQueue-0" 
groovy.lang.MissingPropertyException: No such property: prefs for class: nextflow.ui.console.Nextflow
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67)
    at org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:163)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
    at groovy.console.ui.ConsolePreferences.<init>(ConsolePreferences.groovy:52)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
    at groovy.console.ui.Console.preferences(Console.groovy:298)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:577)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
    at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1333)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
    at groovy.lang.MetaClassImpl.invokeMethodClosure(MetaClassImpl.java:1017)
    at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1207)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
    at groovy.lang.Closure.call(Closure.java:433)
    at groovy.lang.Closure.call(Closure.java:422)
    at groovy.swing.impl.DefaultAction.actionPerformed(DefaultAction.java:38)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
    at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
    at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
    at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
    at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
    at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1029)
    at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1073)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6616)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
    at java.desktop/java.awt.Component.processEvent(Component.java:6381)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4991)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4823)
    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:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4823)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
    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$5.run(EventQueue.java:747)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    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:744)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
pditommaso commented 1 month ago

Thanks for reporting this. I've patched it via https://github.com/apache/groovy/pull/2086, but now another error is thrown. I've created an issue for it here.