Java errors
-
I've converted my CR-10 Mini to a Duet2 Wifi and Due7 for control. All the wiring is complete and tests correctly (machine moves in the correct directions, exturder heats up, thermistors read temps correctly, fans run, etc). I've also updated the Duet2 to the latest available firmware versions.
Problem is, any time I try to submit a gcode file to print, I get the following JavaScript error:
***JavaScript Error
A JavaScript error has occurred so the web interface has closed the connection to your board. It is recommended to reload the web interface now. If this happens again, please contact the author and share this error message:
Version: 1.22.6
Message: TypeError: reduce of empty array with no initial value
URL: http://duet3dp/js/dwc.js
Line: 1413:31
Error object: {}***After that the whole controller loses its mind and requires a reboot to get the web interface to start responding again.
I've tried files sliced with Cura and Slic3r, same results for both. I can send manual gcode commands and they work just fine. I can reproduce the error in the latest FireFox and Chrome browsers.
Help!!
-
Please post your config.g file. Also, can you confirm that you are running firmware 2.02?
-
Appologies for the lack of config.g, attached below.
Firmware:
Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
Firmware Electronics: Duet WiFi 1.02 or later
Firmware Version: 2.02(RTOS) (2018-12-24b1)
WiFi Server Version: 1.22
Web Interface Version: 1.22.6config.g (be gentle):
; Configuration file for Duet WiFi (firmware version 1.21)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2 on Tue Jan 08 2019 13:17:15 GMT-0500 (Eastern Standard Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Network
M550 P"Duet3DP" ; Set machine name
M552 S1 ; Enable network
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Drives
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X80.00 Y80.00 Z400.00 E93.03 ; Set steps per mm
M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
M203 X3000.00 Y3000.00 Z300.00 E1500.00 ; Set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z100.00 E5000.00 ; Set accelerations (mm/s^2)
M906 X800.00 Y800.00 Z800.00 E800.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X300 Y220 Z300 S0 ; Set axis maxima; Endstops
M574 X1 Y1 Z1 S1 ; Set active high endstops; Z-Probe
M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed
M557 X15:15 Y15:195 S20 ; Define mesh grid; Heaters
M307 H0 B0 S1.00 ; Disable bang-bang mode for the bed heater and set PWM limit
M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C; Fans
;M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on; Tools
M563 P0 S"Nozzle" D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C -
I should add: this is a single nozzle/extruder printer and I have some suspicions my tool/fan lines are incorrect...
-
Further fiddling this morning is pointing at user error (of some kind):
If I remove the bed/ext heat commands from my gcode file and manually pre-heat the bed and extruder, the print starts correctly and no Java errors.
Mistake in my tool definitions... or something?
-
Even if your config or the commands in your GCode file are incorrect, that shouldn't cause the browser to disconnect. Can you post a GCode file that exhibits the error on DropBox, Google Drive or another file sharing site, and post a link to it here? Then I will try to reproduce the problem.
-
0_1548609111163_xyzCalibration_cube.gcode
I've attached the gcode file in question - and thank you so much for the quick feedback!!
-
I wasn't able to reproduce your issue, however I don't have exactly the same setup. But I did find a possible timing issue in DuetWebControl that may explain your issue. Please download upload file dwc.js.gz from https://www.dropbox.com/s/qlk90c2pa9z5sch/dwc.js.gz?dl=0 and upload it through the Settings/General page of Duet Web Control.
[Note to self and chrishamm: the change is in line 1411 of jwc.js. Was:
if (fileInfo.filament.length > 0) {
Changed to:
if (fileInfo.filament.length > 0 && status.extrRaw.length > 0) {
]