3.2 JSON Parse error: Unrecognized token '<' Password bug



  • Hello,
    After updating to RRF 3.2, I am getting this error:

    Connection interrupted, attempting to reconnect...
    JSON Parse error: Unrecognized token '<'
    

    It appears to happen continuously.

    Screen Shot 2021-01-06 at 11.58.48 PM.png

    Does anyone know what may have caused this?

    Im not completely sure exactly what files were required to be installed, so I may be missing some system files. I have these:

    Screen Shot 2021-01-07 at 12.04.21 AM.png

    Are there any that I should add or remove?

    Thank you for your time! 🙂


  • Moderator

    I suggest you try updating again by uploading this zip file as is without extracting it to the system tab.

    https://github.com/Duet3D/RepRapFirmware/releases/download/3.2/Duet2and3Firmware-3.2.zip


  • administrators

    If it happens right after connecting try to delete the dwc*.json files from /sys.



  • @chrishamm

    I assume you mean the "dwc-settings.json" and the "dwc2settings.json", correct?

    What exactly do they do? Do I need to worry about settings being reset?



  • @Phaedrux

    Unfortunately this did not work. I still get the same "JSON Parse error: Unrecognized token '<' "


  • Moderator

    Is that after a fresh upload of the zip file?
    Clear your browser cache?



  • @Phaedrux

    Correct, that is after a fresh upload of the zip file. This is how I uploaded it: DWC > Files > System > Selected "Upload System Files" on the right side of the screen. > Uploaded .zip file.

    Clearing the browser cache unfortunately did not fix the issue.

    Seems to happen around 45 seconds after connection is established.

    Screen Shot 2021-01-07 at 12.46.15 PM.png


  • Moderator

    Does it still happen if you delete the 3 .JSON files? (after downloading a backup of course)

    Can you upload those .json files here?



  • @Phaedrux

    Ive been deleting the files via the DWC. Is that sufficient, or should I do it through "sys" on the SD card?

    Will there be any sensitive information on the .JSON files that I need to scrub?


  • Moderator

    Deleting them in DWC should be sufficient.

    You can open the JSON files in a text editor to see what's in them first if you wish. I don't think there's anything sensitive in there though.

    Also post your config.g and the results of M122 if possible so we can see which board it is and what firmware is actually installed.



  • @Phaedrux

    Cool, yes, deleting them in DWC does appear to delete them in the "sys" folder.

    Unfortunately it appears that .JSON files cannot be uploaded to the forum. I can copy and paste the info from a text editor if you'd like, but deleting them did not appear to fix the issue.

    Here is the config.g file:

    ; Creality.
    ; 0:/sys/config.g
    ; Configuration file for Duet WiFi (firmware version 3.1.1).
    ; Executed by the firmware on start-up.
    ; 2020/01/05/20:24.
    
    ; General Preferences.
    G90               ; Set all axes (not extruders) to absolute positioning.
    M83               ; Set all extruders (not axes) to relative positioning.
    M550 P"Creality"  ; Set machine name.
                      ; P (Machine name): Creality.
    M669 K0           ; Set kinematics type and parameters.
                      ; K (Kinematics type): 0 (Cartesian).
    
    ; Network.
    M551 P"REDACTED"  ; Set machine password.
                         ; P (Password): ...
    M552 S1              ; Set network.
                         ; S (Networking): 1 (Enable networking as a client).
    M586 P0 S1           ; Set network protocols.
                         ; P (Protocol type): 0 (HTTP or HTTPS).
                         ; S (Protocol command): 1 (Enable).
    M586 P1 S0           ; Set network protocols.
                         ; P (Protocol type): 1 (FTP or SFTP).
                         ; S (Protocol command): 0 (Disable).
    M586 P2 S0           ; Set network protocols. 
                         ; P (Protocol type): 1 (Telnet or SSH).
                         ; S (Protocol command): 0 (Disable).
    
    ; Drives.
    M569 P0 S1                                 ; Set motor driver direction.
                                               ; P (Motor drive number): 0 (X motor board label, X motor).
                                               ; S (Direction of movement): 1 (Forward).
    M569 P1 S1                                 ; Set motor driver direction.
                                               ; P (Motor drive number): 1 (Y motor board label, Y motor).
                                               ; S (Direction of movement): 1 (Forward).
    M569 P2 S1                                 ; Set motor driver direction.
                                               ; P (Motor drive number): 2 (Z1 motor board label, Left Z [Z1] motor).
                                               ; S (Direction of movement): 1 (Forward).
    M569 P3 S1                                 ; Set motor driver direction.
                                               ; P (Motor drive number): 3 (E0 motor board label, E0 motor).
                                               ; S (Direction of movement): 1 (Forward).
    M569 P4 S1                                 ; Set motor driver direction.
                                               ; P (Motor drive number): 4 (E1 motor label, Right Z [Z2] motor).
                                               ; S (Direction of movement): 1 (Forward).
    M584 X0 Y1 Z2:4 E3                         ; Set drive mapping.
                                               ; X (Driver number for X motor): 0 (X motor label).
                                               ; Y (Driver number for Y motor): 1 (Y motor label).
                                               ; Z (Driver number for Z motor): 2 & 4 (Z1 motor label & E1 motor label).
                                               ; E (Driver number for E motor): 3 (E0 motor label).
    M671 X-25:535 Y250:250 S20 F1.0            ; Set positions of z screws.
                                               ; X (X coordinates of Z screws): ...(-25mm X, 0mm Y offset on left. 25mm X, 0mm Y offset on right.) 0 (-22, 535), 1 (520, 250).
                                               ; Y (Y coordinates of Z screws): ...
                                               ; S (Maximum correction to apply to each Z screw [mm]): 20.
                                               ; F (Fudge factor): 1.0.
    M350 X16 Y16 Z16 E16 I1                    ; Set microstepping and interpolation.
                                               ; X (Stepping mode for the X axis): 16 (1/16 step).
                                               ; Y (Stepping mode for the Y axis): 16 (1/16 step).
                                               ; Z (Stepping mode for the Z axis): 16 (1/16 step).
                                               ; E (Stepping mode for the extruder): 16 (1/16 step).
                                               ; I (Microstepping interpolation mode): 16(Enable).
    M92 X80.00 Y80.00 Z400.00 E824.00          ; Set axis steps per unit.
                                               ; X (Steps/mm for X axis): 80.00.
                                               ; Y (Steps/mm for Y axis): 80.00.
                                               ; Z (Steps/mm for Z axis): 400.00.
                                               ; E (Steps/mm for extruder): 824.00.
    M566 X480.00 Y480.00 Z12.00 E10000.00      ; Set maximum instantaneous speed change (jerk).
                                               ; X (Maximum instantaneous speed change for X axis [mm/min]): 480.00.
                                               ; Y (Maximum instantaneous speed change for Y axis [mm/min]): 480.00.
                                               ; Z (Maximum instantaneous speed change for Z axis [mm/min]): 12.00.
                                               ; E (Maximum instantaneous speed change for extruder [mm/min]): 10,000.00.
    M203 X21000.00 Y21000.00 Z900.00 E1500.00  ; Set maximum speeds.
                                               ; X (Maximum speed for X axis [mm/min]): 21,000.00.
                                               ; Y (Maximum speed for Y axis [mm/min]): 21,000.00.
                                               ; Z (Maximum speed for Z axis [mm/min]): 900.00.
                                               ; E (Maximum speed for extruder [mm/min]): 1,500.00.
    M201 X500.00 Y500.00 Z20.00 E10000.00      ; Set maximum print move accelerations.
                                               ; X (Maximum acceleration for X axis [mm/s^2]): 500.00.
                                               ; Y (Maximum acceleration for Y axis [mm/s^2]): 500.00.
                                               ; Z (Maximum acceleration for Z axis [mm/s^2]): 20.00.
                                               ; E (Maximum acceleration for extruder [mm/s^2]): 10,000.00.
    M906 X1500 Y1500 Z1100 E1400 I30           ; Set maximum motor currents.
                                               ; X (X drive maximum motor current [mA]): 1500.
                                               ; Y (Y drive maximum motor current [mA]): 1500.
                                               ; Z (Z drive maximum motor current [mA]): 1100.
                                               ; E (Extruder maximum motor current [mA]): 1400.
                                               ; I (Motor current idle factor): 30.
    M84 S30                                    ; Set idle timeout in seconds of inactivity.
                                               ; Stop idle hold.
                                               ; S (Idle time out[seconds]): 30.
    
    ; Axis Limits.
    M208 X0 Y0 Z0 S1        ; Set axis minimum.
    M208 X475 Y500 Z500 S0  ; Set axis maximum.
    
    ; Endstops.
    M574 X1 P"xstop" S1  ; Set endstop configuration.
                         ; X (Position of X endstop): 1 (Low end).
                         ; P (Pin name): xstop.
                         ; S (Endstop type): 1 (Switch type).
    M574 Y1 P"ystop" S1  ; Set endstop configuration.
                         ; Y (Position fo Y endstop): 1 (Low end).
                         ; P (Pin name): ystop.
                         ; S (Endstop type): 1 (Switch type).
    M574 Z0              ; Set endstop configuration.
                         ; Z (Position fo Z endstop): 0 (None).
    
    ; Z-Probe.
    M558 K0 P8 F60 H2 R0 T6000 A1 B1 C"!^zprobe.in"  ; Set Z probe type.
    M950 S0 C"!^zprobe.in"                           ; Create GPIO/servo pin.
    G31 P500 X53.100 Y9.000 Z0.400 K0                ; Set Z probe.
    M557 X56:475 Y25:475 P4                          ; Define Z probe mesh grid (This is probe grid, not nozzle grid).
    
    ; Heater, Bed.
    M308 S0 P"bedtemp" Y"thermistor" A"Bed Temp" T100000 B3950 R4700  ; Set sensor parameters.
    M950 H0 C"bedheat" Q10 T0                                         ; Create heater.
    M307 H0 V0 B0 S1.0                                                ; Set heating process parameters.
    M140 H0                                                           ; Set bed heater.
    M143 H0 S120                                                      ; Set maximum heater temperature (deg C).
    
    ; Heater, Extruder 1.
    M308 S1 P"e0temp" Y"thermistor" A"Extr. 1 Temp" T100000 B4725 C7.06e-8  ; Set (Extruder 1) temperature sensor parameters.
                                                                            ; S (Sensor number): 1.
                                                                            ; P (Pin name): e0temp.
                                                                            ; Y (sensor type): thermistor.
                                                                            ; A (Sensor name): Extr 1. Temp.
                                                                            ; T (Thermistor resistance at 25 deg C): 100,000.
                                                                            ; B (Beta value): 4725.
                                                                            ; C (Coefficient): 7.06e-8.
    M950 H1 C"e0heat" T1                                                    ; Create heater (extruder 1).
                                                                            ; H (Heater number): 1.
                                                                            ; C (Pin name): e0heat.
                                                                            ; T (Temperature sensor number): 1.
    M307 H1 R1.481 C620.7:352.3 D6.65 I0 B0 S1.00 V24.1                     ; Set heating process parameters.
                                                                            ; H (Heater number): 1.
                                                                            ; R (Heating rate): 1.481.
                                                                            ; C (Dominant time constant of heating process [seconds]): 620.7 (print fans off) : 352.3 (print fans fully on).
                                                                            ; D (Dead time [seconds]): 6.65.
                                                                            ; I (Invert PWM signal): 0 (Not inverted).
                                                                            ; B (Bang bang control): 0 (Disabled).
                                                                            ; S (Maximum PWM frequency to use): 1.00.
                                                                            ; V (Vin calibration supply voltage): 24.1.
    M143 H1 S285                                                            ; Set maximum heater temperature (deg C).
    
    ; Fans, Print Cooling.
    M950 F0 C"fan0" Q100                        ; Create fan.
                                                ; F (Fan number): 0.
                                                ; C (Pin name): fan0.
                                                ; Q (PWM frequency [Hz]): 100.
    M106 P0 L0.2 X1.0 B0.3 H-1 R1 C"Print Fan"  ; Set fan.
                                                ; P (Fan number): 0.
                                                ; L (Minimum fan speed): 0.2.
                                                ; X (Maximum fan speed): 1.0.
                                                ; B (Blip time [seconds]): 0.3.
                                                ; H (Thermostatic control): -1 (Disabled).
                                                ; R (Restore fan speed): 1 (To the value it has when the print was paused).
                                                ; C (Name): Print Fan.
    
    ; Fan, Heat Break.
    M950 F1 C"fan1" Q100                                  ; Create fan.
                                                          ; F (Fan number): 1.
                                                          ; C (Pin name): fan1.
                                                          ; Q (PWM frequency [Hz]): 100.
    M106 P1 S1.0 L0.5 X1.0 B0.3 H1 T45 C"Heat Break Fan"  ; Set fan.
                                                          ; P (Fan number): 1.
                                                          ; S (Fan speed): 1.0.
                                                          ; L (Minimum fan speed): 0.2.
                                                          ; X (Maximum fan speed): 1.0.
                                                          ; B (Blip time [seconds]): 0.3.
                                                          ; H (Enable thermostatic control): 1 (Extruder temp sensor).
                                                          ; T (Thermostatic trigger temperature [C]): 45.
                                                          ; C (Name): Heat Break Fan.
    
    ; Fans, Case.
    M308 S2 Y"drivers" A"Driver Temp"                    ; Set (stepper drivers) temperature sensor.
                                                         ; S (Sensor number): 2.
                                                         ; Y (Sensor type): drivers (Main board stepper drivers).
                                                         ; A (Sensor name): Driver Temp.
    M308 S3 Y"mcu_temp" A"CPU Temp"                      ; Set (CPU/MCU) temperature sensor.
                                                         ; S (Sensor number): 3.
                                                         ; Y (Sensor type): mcu_temp (CPU/MCU).
                                                         ; A (Sensor name): CPU Temp.
    M950 F2 C"fan2" Q25000                               ; Create fan.
                                                         ; F (Fan number): 2 (Case fan).
                                                         ; C (Pin name): fan2.
                                                         ; Q (PWM frequency [Hz]): 25,000.
    M106 P2 L0.8 X1.0 B0.1 H2:3 T40:65 C"Case Fan"       ; Set fan.
                                                         ; P (Fan number): 2 (Electronics).
                                                         ; L (Minimum fan speed): 0.8.
                                                         ; X (Maximum fan speed): 1.0.
                                                         ; B (Blip time [seconds]): 0.1.
                                                         ; H (Thermostatic control): 2 (stepper drivers) : 3 (CPU/MCU).
                                                         ; T (Thermostatic trigger temperature [C]: 40-65 (Proportional range).
                                                         ; C (Name); Case Fan.
    
    ; Tools.
    M563 P0 S"Extr. 1 Tool" D0 H1 F0                       ; Define tool.
                                                           ; P (Tool number): 0 (Extruder 1).
                                                           ; S (Tool name): Extr. 1 Tool.
                                                           ; D (Extruder drive): 0.
                                                           ; H (Heater): 1 (Extruder 1).
                                                           ; F (Fan mapped): 0 (Print cooling fan).
    G10 P0 X0 Y0 Z0 R0 S0                                  ; Set tool offset and temperature.
                                                           ; P (Tool number): 0.
                                                           ; X (X offset): 0.
                                                           ; Y (Y offset): 0.
                                                           ; Z (Z offset): 0.
                                                           ; R (Standby temperature): 0.
                                                           ; S (Active temperature: 0.
    M591 D0 P3 C"e0stop" S1 R75:125 E3.0 A1 L25.44         ; Configure filament sensing.
                                                           ; D (Extruder drive number): 0.
                                                           ; P (Type of sensor): 3 (Duet3D rotating magnet sensor).
                                                           ; C (Pin name): e0stop.
                                                           ; S (Filament monitoring): 1 (Enabled).
                                                           ; R (Filament movement tolerance [%]): 75:125.
                                                           ; E (Extrusion length [mm]): 3.0.
                                                           ; A (Check extruder motion): 1 (Check all extruder motion).
                                                           ; L (Filament length per rotation of the sense wheel [mm]): 25.44.
    
    ; Display.
    M575 P1 B57600 S1     ; Set serial communications parameters.
                          ; P (Serial channel number): 1 (Auxiliary serial port).
                          ; B (Baud rate): 57,600.
                          ; S (Mode): 1 (PanelDue, checksum required).
    
    ; Automatic Power Saving.
    M911 S23.5 R24.0 P"M913 X0 Y0 G91 M83 G1 Z3 E-2 F2400"  ; Set auto save on power loss.
                                                            ; S (Auto save threshold [V]): 23.5.
                                                            ; R (Resume threshold [V]): 24.0.
                                                            ; P (Commands on power loss): ...
    
    ; CPU Temperature Compensation.
    M912 P0 S-4.7  ; Set electronics temperature monitor adjustment.
                   ; P (Temperature monitor channel): 0 (Default).
                   ; S (Value to be added to temperature reading [C]): -4.7 (Lower number decreases displayed cpu temp.)
    
    ; Pressure Advance.
    M572 D0 S0.06  ; Set extruder pressure advance.
                   ; D (Extruder number): 0.
                   ; S (Pressure advance amount [seconds]): 0.06.
    
    ; Miscellaneous
    M501  ; Load saved parameters from non-volatile memory.
    
    ; Select tool.
    T0  ; Select first tool.
    


  • M122:

    === Diagnostics ===
    RepRapFirmware for Duet 2 WiFi/Ethernet version 3.2 running on Duet WiFi 1.02 or later
    Board ID: 08DGM-917DA-G4MS8-6J1DD-3S46R-1STHB
    Used output buffers: 3 of 24 (11 max)
    === RTOS ===
    Static ram: 23460
    Dynamic ram: 74108 of which 40 recycled
    Never used RAM 14472, free system stack 180 words
    Tasks: NETWORK(ready,162) HEAT(blocked,295) MAIN(running,448) IDLE(ready,19)
    Owned mutexes: WiFi(NETWORK)
    === Platform ===
    Last reset 00:06:49 ago, cause: power up
    Last software reset at 2021-01-06 23:23, reason: User, GCodes spinning, available RAM 14472, slot 1
    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
    Error status: 0x00
    Aux0 errors 0,0,0
    MCU temperature: min 16.0, current 19.8, max 20.7
    Supply voltage: min 24.0, current 24.2, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes
    Driver 0: position 0, standstill, SG min/max not available
    Driver 1: position 0, standstill, SG min/max not available
    Driver 2: position 0, standstill, SG min/max not available
    Driver 3: position 0, standstill, SG min/max not available
    Driver 4: position 0, standstill, SG min/max not available
    Driver 5: position 0
    Driver 6: position 0
    Driver 7: position 0
    Driver 8: position 0
    Driver 9: position 0
    Driver 10: position 0
    Driver 11: position 0
    Date/time: 2021-01-07 13:19:54
    Cache data hit count 498401202
    Slowest loop: 8.01ms; fastest: 0.21ms
    I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
    === Storage ===
    Free file entries: 10
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest read time 5.6ms, write time 0.0ms, max retries 0
    === Move ===
    DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000
    === MainDDARing ===
    Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
    === AuxDDARing ===
    Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
    === Heat ===
    Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
    Heater 1 is on, I-accum = 0.0
    === GCodes ===
    Segments left: 0
    Movement lock held by null
    HTTP is idle in state(s) 0
    Telnet is idle in state(s) 0
    File is idle in state(s) 0
    USB is idle in state(s) 0
    Aux is idle in state(s) 0
    Trigger is idle in state(s) 0
    Queue is idle in state(s) 0
    LCD is idle in state(s) 0
    Daemon is idle in state(s) 0
    Autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 16.82ms; fastest: 0.00ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
    HTTP sessions: 1 of 8
    - WiFi -
    Network state is active
    WiFi module is connected to access point 
    Failed messages: pending 0, notready 0, noresp 0
    WiFi firmware version 1.25
    WiFi MAC address ec:fa:bc:2d:dd:0f
    WiFi Vcc 3.39, reset reason Turned on by main processor
    WiFi flash size 4194304, free heap 27136
    WiFi IP address 192.168.1.44
    WiFi signal strength -71dBm, mode 802.11n, reconnections 0, sleep mode modem
    Clock register 00002002
    Socket states: 0 0 0 0 0 0 0 0
    === Filament sensors ===
    Extruder 0: pos 0.00, errs: frame 0 parity 0 ovrun 0 pol 0 ovdue 0
    

  • Moderator

    In the General tab of DWC do you have Save settings in local storage and Save cache in local storage checked or unchecked? Either way can you try toggling that?

    Also, your wifi signal strength is pretty borderline.

    WiFi signal strength -71dBm

    Is the printer far from the router?



  • @Phaedrux

    Save settings in local storage: Unchecked.
    Save cache in local storage: Checked.

    Screen Shot 2021-01-07 at 2.07.12 PM.png

    Ill try toggling both and see if there is any change.

    Yeah, its pretty far from the router, though Ive never had any issues before using 1.21, 2.0.3, or 3.1.1 (even when it was in a steel case, lol).


  • Moderator

    @Charlie Also try with both off and both on.

    I'm just poking in the dark here. I'm not certain it's related.



  • @Phaedrux

    Definitely will do. Your guesses are way more educated than mine, so I greatly appreciate it. Ill let you know the results.


  • Moderator

    My theory is that it's trying to save the cache or settings on the SD card and the weak wifi signal is causing issues.

    I'm not sure which storage the "local storage" is referring to. It's a bit ambiguous and I never got clarification last time it came up. It's either the SD card as in local to the machine, or the browser side, as in local to the viewer.

    @chrishamm will know for sure, but he's probably sleeping like a baby at the moment. 😉



  • @Phaedrux

    Unfortunately all four configurations (emptying browser cache each time) still had the same error come up.


  • Moderator

    My last suggestion is to manually replace the contents of the /www folder with a fresh set from https://github.com/Duet3D/RepRapFirmware/releases/download/3.2/DuetWebControl-SD.zip

    And if that doesn't work, try a fresh SD card.

    And if that doesn't work, wait for chrishamm



  • @Phaedrux

    Unfortunately manually replacing the www folder did not change anything, and neither did a new SD card. Thank you for your input though!



  • @chrishamm

    If you have any insight, I would greatly appreciate it.


  • administrators

    @Charlie Some response doesn't seem right, no valid JSON should start with '<' so you're getting an error. Try to open the developer console with F12 and check the log for further details. You should be able to see an error trace in there.

    What browser are you using? Can you open DWC from a different device?



  • @chrishamm

    Thank you for your response.

    I opened the developer console in Safari (Develop > Show Web Inspector > Console). I found the following errors and warnings:

    Screen Shot 2021-01-08 at 12.58.28 PM.png

    Im currently using Safari.



  • The first error does not seem to be the cause of the issue, and was resolved by inserting a blank "dwc-plugins.json" file in the sys/ folder using DWC.

    The subsequent errors seem to be the cause of the issue. Ive diffchecked both the "pollconnector.js" and the "BaseConnector.js" files against the files in GitHub and they appear to be identical. Im pretty out of my depth when it comes to coding, so any help would be greatly appreciated.


  • Moderator

    Can you test with Chrome just to see if it's isolated to safari on your machine? What MacOS and Safari version are you running?


Log in to reply