-
-
Notifications
You must be signed in to change notification settings - Fork 562
Troubleshooting
This page contains issues people have had trying to resolve. Many problems have been solved before. Please take a look at the following resources for troubleshooting.
You may also want to visit the FAQ if your questions are about common installation problems.
Please bear the following precautions in mind when troubleshooting:
- NEVER PLUG OR UNPLUG COMPONENTS WHEN THEY ARE POWERED
- TURN OFF SPINDLE AND MOTOR POWER WHEN MAKING A DRY-RUN FOR TROUBLESHOOTING SERIAL TRANSMISSION
- Experienced unexpected errors during data transmission
- Troubleshoot Electron app on Windows
- Compilation Problems
Some symptoms of data transmission issues may be:
- Web interface stops updating Axis positions although the machine is still moving
- A job finishes, but the web interface shows the job still in progress (the pause button is still lit and the start button is disabled)
- The toolhead is in a different location than the GCode indicated
- Console reports errors, but the sent line is valid GCode, as in this screenshot:
Possible resolutions for data transmission issues may be:
- Update your Arduino firmware to address a known serial communication bug: https://github.com/grbl/grbl/wiki/Known-Bugs
- Bypass any intermediate stops between the computer running cncjs and your Arduino (USB Hubs, Extension cables, etc.) and plug the Arduino directly into the computer running cncjs.
- Use a shielded USB cable, at the shortest length possible to reduce electrical interference.
- Install ferrite cores on each end of the USB cable, or use a shielded USB cable that has built-in ferrite cores.
- Turn off any nearby electrical components, unplug them, and move them away from the area. Any piece of metal nearby can act as an antenna for electrical interference.
- Separate your motor driver cables and spindle cables from your signal cables (USB and limit switch wires). The current flowing through the motor and spindle cables can induce electrical signals into nearby cables, causing interference. This may be more difficult than it seems. Basically, just make sure they don't run parallel while touching. If they do touch (like at a mounting point), make sure they cross and go on different paths.
-
Go to https://github.com/electron/electron/releases, and download a zip file that matches your target platform. For example, you can download
electron-{version}-win32-x64.zip
when running the x64 version of Windows. -
Extract the ZIP file to a folder. For example: C:\Temp\electron-{version}-win32-x64\.
-
Change current working directory to C:\Users{Username}\AppData\Local\Programs\cncjs-app\resources\app\.
-
Run C:\Temp\electron-{version}-win32-x64\electron.exe main.js -vvv, then you will be able to see verbose output with
-vvv
.
CNCjs can be tricky to compile. It is a large body of Javascript code that has many dependencies on external libraries and frameworks. The compilation tools and the project are configured to compile well on powerful computers with good network connectivity. Compiling on systems with limited resources, such as a Raspberry Pi, or an entry-level cloud container, or a computer with a slow network connection, can be challenging. Sometimes the compilation (with "npm install") will run for a long time, only to fail late in the process. Here are some situations that have arisen:
Sometimes the compilation fails and, near the end, these lines appear:
npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
When I had that problem, it turned out that the compiler tool ("npm") was trying to use a lot of network connections at once, in hopes of speeding up the process of fetching dependencies by doing a lot of it in parallel. Unfortunately, that overloaded some server or router, which just refused to respond anymore. The solution is to tell npm to be less aggressive:
$ npm set maxsockets 3
The default value for maxsockets is 50. Dialing it down to 3 solved all of my ETIMEDOUT problems, without slowing things down much. You might try some intermediate values if 3 seems too conservative.
Sometimes a compile runs for a long time then fails with messages that include
error code ELIFECYCLE
I have diagnosed at least one of these failures to an "out of memory" condition on the computer. The compiler (in this case, typically the "webpack" component) wants to use more memory than the system has. This is especially a problem with free-plan cloud containers that have only 256MB of RAM.
Sometimes you can work around this by splitting up the compilation into substeps. The cncjs compilation configuration tries to run some steps in parallel, which saves time on sufficiently powerful computers, but needs more memory. Instead doing everything automatically with "npm install", you can run the last phases separately, with
$ npm run build-prod-app
$ npm run build-prod-web
Sometimes that works.
Join CNCjs Users Group on Facebook to share your experiences with other people.
Site: https://cnc.js.org
- Introduction
- Installation
- Using Pendants
-
Raspberry Pi Setup Guide
- System Setup & Preparation
- Install Node.js & CNCjs
- Install Node.js via Package Manager (Recommended)
- Install Node.js via Node Version Manager (NVM) (Alternative)
- Install Node.js Manually (Alternative)
- Use PM2 to auto-start CNCjs (Optional)
- Use Port 80 (Optional)
- Maintain
- Additional Setup Options:
- CNCjs UI on Pi - Adventures in PiLand
- Pi with Arduino Due
- Electron App
- User Guide
- Tool Change
- Troubleshooting
-
FAQ
- Forgot your password?
- How can I enable WebGL in my browser?
- Raspberry Pi: Error opening serial port "ttyAMA0"
- Webcam Streaming with Raspberry Pi
- Restream RTSP to M-JPEG
- Connect to an Arduino using WiFi
- Install Native Addons with Node.js v4
- Install Serialport on OS X El Capitan
- Kernel panic issue on macOS Sierra for devices using the CH340G, CH34G or CH34X chipset
- Testing without Arduino board
- Development
- API
- Wiki History
- Resources
- About