Bar Charts fails in batch mode

I have a workflow which works fine when executed in Knime but fails when I run it in the console. It seems to be related to the bar chart nodes. I created a minimal example, which has the same problems.

barchartfail

BarChartFail.knwf (10.9 KB)

I execute the workflow like this:

"C:\Program Files\KNIME\knime.exe" -nosplash -consoleLog -noexit -nosave -reset --launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=BarChartFail.knwf

The error is:

ERROR    KNIME-Worker-3-Bar Chart 3:148 CEFImageGenerator        Executing script failed after 10 attempts. The script is: 'return document.getElementById('node-SINGLE').contentWindow.dynamicJSNode.getSVG();'

I tried on two PCs, same error. Any ideas?
I have other flows which run fine in batch mode, but none of them contain bar charts (or any other JavaScript Visualisation Nodes)

@masgo have you tried converting the imager to a PNG file before export?

Thank you for the suggestion. The results are surprising. When I run the Workflow normally, I am getting a normal PNG output. But when I run it from the console I no longer get the previous error. I am getting a PNG (with the dimensions I set) but just look at it:

Here is the flow, if someone want to try. Maybe there is something wrong with my installation?
BarChartFail2.knwf (14.5 KB)

I found a solution - but my solution makes me belive the initial problem is caused by a bug or miss-configuration.

How to solve:

  1. Install “KNIME Bundled Chromium Browser (legacy)”
  2. Go to Preferences → JavaScript Views → set headless browser to “Bundled Headless Chromium” (version 91 in my case)

I can not explain why the following steps are needed. Looks like KNIME is somehow ignoring my local preferences. But on the other hand it obeys them, because it uses my custom DB drivers.

  1. Export your preferences to a file
  2. Remove everything except the first line, last line, and the line
/instance/org.knime.js.core/js.core.headlessBrowser=org.knime.ext.seleniumdrivers.multios.ChromiumImageGenerator

  1. Call the batch mode with the -preferences parameter and provide the file from above.
"C:\Program Files\KNIME\knime.exe" -noexit -nosplash -consoleLog -nosave -reset --launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=workflow.knwf -preferences=preferences.epf

(you probably want to remove -noexit after you confirmed it works)

There still seems to be some kind of bug, because knime crashes liks this. But the image writer is the very last node on my flow and all images are written correctly before the crash.

Exception in thread "Thread-5" java.lang.IllegalStateException: Executor has been shut down
        at org.apache.sshd.common.util.ValidateUtils.createFormattedException(ValidateUtils.java:213)
        at org.apache.sshd.common.util.ValidateUtils.throwIllegalStateException(ValidateUtils.java:207)
        at org.apache.sshd.common.util.ValidateUtils.checkState(ValidateUtils.java:184)
        at org.apache.sshd.common.util.threads.NoCloseExecutor.execute(NoCloseExecutor.java:100)
        at java.base/sun.nio.ch.AsynchronousChannelGroupImpl.executeOnPooledThread(Unknown Source)
        at java.base/sun.nio.ch.Invoker.invokeIndirectly(Unknown Source)
        at java.base/sun.nio.ch.Invoker.invoke(Unknown Source)
        at java.base/sun.nio.ch.Invoker.invoke(Unknown Source)
        at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$WriteTask.completed(Unknown Source)
        at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.