I found a solution - but my solution makes me belive the initial problem is caused by a bug or miss-configuration.
How to solve:
- Install “KNIME Bundled Chromium Browser (legacy)”
- 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.
- Export your preferences to a file
- 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
- 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)