Skip to content

Error running saveSVG.js example on Ubuntu on version 6.0.1 #212

Closed
@lobis

Description

@lobis

Hello,

I am running into an error when I run the saveSVG.js example on a Ubuntu 20.04 host. The example runs OK for me in my windows machine. (both are using node 15).

me@host:~/share/github/radiation-transport-visualization/geometry-browser/node$ node saveSVG.js
JSROOT version 6.0.1 1/03/2021
length of data = 47513
length of dezipped =883215
making SVG
Reuse existing d3.js version 6.6.2, expected 6.1.1
Creating clones 420 takes 4 uniquevis 334
THREE.WebGLRenderer: Cannot read property 'getShaderPrecisionFormat' of undefined
/mnt/c/WSL-Ubuntu-20.04/github/radiation-transport-visualization/geometry-browser/node/node_modules/three/build/three.js:17284
                        if (_gl.getShaderPrecisionFormat === undefined) {
                                ^

TypeError: Cannot read property 'getShaderPrecisionFormat' of undefined
    at new WebGLRenderer (/mnt/c/WSL-Ubuntu-20.04/github/radiation-transport-visualization/geometry-browser/node/node_modules/three/build/three.js:17284:12)
    at Object.jsrp.createRender3D (/mnt/c/WSL-Ubuntu-20.04/github/radiation-transport-visualization/geometry-browser/node/node_modules/jsroot/scripts/JSRoot.base3d.js:318:21)
    at TGeoPainter.createScene (/mnt/c/WSL-Ubuntu-20.04/github/radiation-transport-visualization/geometry-browser/node/node_modules/jsroot/scripts/JSRoot.geom.js:1978:29)
    at TGeoPainter.prepareObjectDraw (/mnt/c/WSL-Ubuntu-20.04/github/radiation-transport-visualization/geometry-browser/node/node_modules/jsroot/scripts/JSRoot.geom.js:3087:25)
    at /mnt/c/WSL-Ubuntu-20.04/github/radiation-transport-visualization/geometry-browser/node/node_modules/jsroot/scripts/JSRoot.geom.js:4139:78

You can reproduce this on a docker container as follows (I demonstrate it for node 12, but would also fail for 15, but I don't use 15 since additional dependencies are requiered):

docker run -it ubuntu:latest

apt update
apt install -y curl git
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt install -y nodejs
node --version
npm install jsroot
git clone https://github.com/root-project/jsroot.git
cd jsroot/demo/node
node makesvg.js

After installing, the error is the following:

root@4eabd05dfaf8:/jsroot/demo/node# node makesvg.js                                                                                                                                                               JSROOT version 6.0.1 1/03/2021                                                                                                                                                                                     Reuse existing d3.js version 6.6.2, expected 6.1.1                                                                                                                                                                 THREE.WebGLRenderer: Cannot read property 'getShaderPrecisionFormat' of undefined                                                                                                                                  (node:4146) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getShaderPrecisionFormat' of undefined                                                                                                  at new WebGLRenderer (/node_modules/three/build/three.js:17284:12)                                                                                                                                                 at Object.jsrp.createRender3D (/node_modules/jsroot/scripts/JSRoot.base3d.js:318:21)                                                                                                                               at TFramePainter.JSROOT.TFramePainter.create3DScene (/node_modules/jsroot/scripts/JSRoot.hist3d.js:190:28)                                                                                                         at TH2Painter.JSROOT.TH2Painter.draw3D (/node_modules/jsroot/scripts/JSRoot.hist3d.js:1510:18)                                                                                                                     at /node_modules/jsroot/scripts/JSRoot.hist.js:6483:55                                                                                                                                                             at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                            (node:4146) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)                                                                                                                                                                                                              (node:4146) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.        
root@4eabd05dfaf8:/jsroot/demo/node#  

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions