SnapmakerJS crashes under Linux


#1

I’m using SnapmakerJS under Linux it works exactly as under Windows. So only difference is when I try to upload and preview an image.

Error 1
when uploading an image nothing appears in the drawing area. Nevertheless the function preview is available.

Error 2
Pushing the Preview button lets SnapmakerJS crash completely.

This doesn’t happen with the pre-installed images.

Here is the console output:


[I] ❯ 2 ❯❯ ✔ ❯ ./snapmakerjs                                                                             ❮ ~/b/Snapmakerjs-2.2.2-linux-x64 ❮
del folder /home/cs/bin/Snapmakerjs-2.2.2-linux-x64/resources/app/web/images/_cache
[ '20180207174059_snap-logo-square-256x256.png',
  '20180207174103_20180207174059_snap-logo-square-256x256.nc',
  '20180207174114_snap-logo-square-256x256.png',
  '20180207174116_20180207174114_snap-logo-square-256x256.nc',
  'snap-logo-square-256x256.png',
  'snap-logo-square-256x256.png.svg' ]
2018-02-07T16:44:33.762Z - info: init Loading configuration from "/home/cs/.cncrc"
2018-02-07T16:44:33.881Z - info: init Starting the server at http://127.0.0.1:40379
{ image: 
   { fieldName: 'image',
     originalFilename: 'Tux.png',
     path: '/tmp/F4EdPKNqfx60_9Ly79jNqYz0.png',
     headers: 
      { 'content-disposition': 'form-data; name="image"; filename="Tux.png"',
        'content-type': 'image/png' },
     size: 11913,
     name: 'Tux.png',
     type: 'image/png' } }
{"type":"laser","mode":"bw","stage":1,"isReady":false,"isPrinting":false,"port":"-","jogSpeed":1500,"workSpeed":288,"originSrc":"./images/_cache/Tux.png","originWidth":265,"originHeight":314,"imageSrc":"./images/_cache/Tux.png","sizeWidth":26.5,"sizeHeight":31.4,"gcodeSrc":"-","bwThreshold":128,"direction":"Horizontal","quality":10,"contrast":50,"brightness":50,"whiteClip":255,"algorithm":"FloyedSteinburg","dwellTime":42,"subMode":"svg","clip":true,"optimizePath":true,"vectorThreshold":128,"isInvert":false,"turdSize":2}
2018-02-07T16:44:56.244Z - error: uncaughtException: ENOENT: no such file or directory, open '../web/images/_cache/Tux.png' date=Wed Feb 07 2018 17:44:56 GMT+0100 (CET), pid=4438, uid=1000, gid=1000, cwd=/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/resources/app/app, execPath=/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/snapmakerjs, version=v6.5.0, argv=[/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/snapmakerjs], rss=146726912, heapTotal=46223360, heapUsed=38424016, loadavg=[0.5986328125, 0.82958984375, 0.99560546875], uptime=2952, trace=[column=null, file=null, function=Error, line=null, method=null, native=true], stack=[Error: ENOENT: no such file or directory, open '../web/images/_cache/Tux.png',     at Error (native)]
2018-02-07T16:44:56.245Z - error: uncaughtException: ENOENT: no such file or directory, open '../web/images/_cache/Tux.png' date=Wed Feb 07 2018 17:44:56 GMT+0100 (CET), pid=4438, uid=1000, gid=1000, cwd=/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/resources/app/app, execPath=/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/snapmakerjs, version=v6.5.0, argv=[/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/snapmakerjs], rss=146755584, heapTotal=46223360, heapUsed=38539432, loadavg=[0.5986328125, 0.82958984375, 0.99560546875], uptime=2952, trace=[column=null, file=null, function=Error, line=null, method=null, native=true], stack=[Error: ENOENT: no such file or directory, open '../web/images/_cache/Tux.png',     at Error (native)]
2018-02-07T16:44:56.250Z - error: uncaughtException: ENOENT: no such file or directory, open '../web/images/_cache/Tux.png' date=Wed Feb 07 2018 17:44:56 GMT+0100 (CET), pid=4438, uid=1000, gid=1000, cwd=/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/resources/app/app, execPath=/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/snapmakerjs, version=v6.5.0, argv=[/home/cs/bin/Snapmakerjs-2.2.2-linux-x64/snapmakerjs], rss=145928192, heapTotal=46223360, heapUsed=38592032, loadavg=[0.5986328125, 0.82958984375, 0.99560546875], uptime=2952, trace=[column=null, file=null, function=Error, line=null, method=null, native=true], stack=[Error: ENOENT: no such file or directory, open '../web/images/_cache/Tux.png',     at Error (native)]

#2

Hi, I re-verify at Ubuntu 16.04 http://releases.ubuntu.com/16.04.3/ubuntu-16.04.3-desktop-amd64.iso. It works as expected. That means I can’t reproduce issue. by myself, I need your aid.

From the log you pasted, It’s a failure causing by unable to copy the file into _cahce directory.

  1. Please help me check if you can reproduce the issue every time.
  2. Please tell me which linux distribution that you used so that I can reproduce the issue. It would be great that you give a iso download link. so that I can install it in my virtual box.
  3. Could you do follow steps to help me?

Upload your image
cd xxxx/Snapmakerjs-2.2.2-linux/resources/app/web/images/_cache/
ls

Check if the folder include the image you upload previously.

Bests,
David


#3

SnapmakerJS under Linux do their best to make the application programming interface perfect. I also get proper information about interface on https://netgears.support/netgear-genie-support