Image generation on Choropleth workflow is failing

Hi Knimers,
I’m making my first steps in “JavaScript country” and after climbing over the first hurdles I’m getting stuck on the image generation of the Google geochart I created (I have several of them and I want them to be included in a BIRT report). I’m using KNIME 4.5.2 on Windows10.

In order to get this working I made the following simplified workflow with just a Generic JavaScript View node.
afbeelding
This is the export of the above workflow.
question.knwf (9.7 KB)

I found these topics already on this subject: Generic Javascript Views -- How to SVG image generation --? and a solution of @wiswedel given in 07_Choropleth_World_Map - export image from generic javascript view - #6 by Rich_ard
But when I apply the exact “JavaScript to retrieve the generated SVG as a string” as provided in the solution I get the follow erring in my console:

ERROR Generic JavaScript View 0:100:0:67 Caught “BridgeException”: The markup in the document preceding the root element must be well-formed.

When I comment the try and catch like below this error disappears and the node can be excecuted normally.

The interactive view does shows up in the same way as without the image generation, but the actual image is not generated and giving this error:

Though the interactive view is working the console shows the following error:

ERROR Generic JavaScript View 7:102 Executing script failed after 10 attempts. The script is: ‘return document.getElementById(‘node-SINGLE’).contentWindow.knimeGenericView.getSVG();’

The knime.log shows, besides this error, the following:

2022-09-21 10:34:18,139 : DEBUG : main : : ExecuteAndOpenViewAction : : : Creating ‘Execute and Open Views’ job for 1 node(s)…
2022-09-21 10:34:18,240 : DEBUG : main : : NodeContainer : : : Generic JavaScript View 7:102 has new state: CONFIGURED_MARKEDFOREXEC
2022-09-21 10:34:18,241 : DEBUG : main : : NodeContainer : : : Generic JavaScript View 7:102 has new state: CONFIGURED_QUEUED
2022-09-21 10:34:18,438 : DEBUG : main : : NodeContainer : : : question 7 has new state: EXECUTING
2022-09-21 10:34:18,443 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : WorkflowManager : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 doBeforePreExecution
2022-09-21 10:34:18,640 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : NodeContainer : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 has new state: PREEXECUTE
2022-09-21 10:34:18,644 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : WorkflowDataRepository : Generic JavaScript View : 7:102 : Adding handler e4c9ef23-465f-4abf-adf3-5bea1458dc11 (Generic JavaScript View 7:102: ) - 2 in total
2022-09-21 10:34:18,844 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : WorkflowManager : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 doBeforeExecution
2022-09-21 10:34:19,062 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : NodeContainer : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 has new state: EXECUTING
2022-09-21 10:34:19,067 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : LocalNodeExecutionJob : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 Start execute
2022-09-21 10:34:22,160 : INFO : KNIME-Worker-140-Generic JavaScript View 7:102 : : JavaScriptViewCreator : Generic JavaScript View : 7:102 : JavaScript view - Generic JavaScript View - created. Debug output at: C:\Users\in732mel\AppData\Local\Temp\knimeViewContainer456\debug_166374926215815255011293782544854.html
2022-09-21 10:34:24,691 : ERROR : KNIME-Worker-140-Generic JavaScript View 7:102 : : CEFImageGenerator : Generic JavaScript View : 7:102 : Executing script failed after 10 attempts. The script is: ‘return document.getElementById(‘node-SINGLE’).contentWindow.knimeGenericView.getSVG();’
2022-09-21 10:34:24,883 : INFO : KNIME-Worker-140-Generic JavaScript View 7:102 : : LocalNodeExecutionJob : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 End execute (5 secs)
2022-09-21 10:34:25,100 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : WorkflowManager : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 doBeforePostExecution
2022-09-21 10:34:25,105 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : NodeContainer : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 has new state: POSTEXECUTE
2022-09-21 10:34:25,327 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : WorkflowManager : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 doAfterExecute - success
2022-09-21 10:34:25,334 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : NodeContainer : Generic JavaScript View : 7:102 : Generic JavaScript View 7:102 has new state: EXECUTED
2022-09-21 10:34:25,563 : DEBUG : KNIME-Worker-140-Generic JavaScript View 7:102 : : NodeContainer : Generic JavaScript View : 7:102 : question 7 has new state: EXECUTED
2022-09-21 10:34:25,814 : DEBUG : main : : OpenInteractiveWebViewAction : : : Open Interactive Web Node View Generic JavaScript View
2022-09-21 10:34:26,027 : DEBUG : main : : GenericJSViewNodeModel : : : Registering view at model (total count 8)

Does anyone know how to create an SVG-image out of a geochart from Google?