Javascript Error preventing connection (SOLVED)



  • Good Day Gents

    This is primarily directed towards Chris Hamm.

    I recommissioned a previously operational genuine duet wifi that had been un used for around three months, upon trying to connect via the web interface i get the following message.

    "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:

    Message: Uncaught TypeError: Cannot read property 'current' of undefined
    URL: http://192.168.88.244/js/dwc.js
    Line: 933:27
    Error object: {}"

    I can connect via YAT/Pronterface and running M552 returns the fact that it has connceted and the SSID and password.

    but the web browers all fail to connect, I have tried Edge, IE, Opera, Firefox & Chrome. All return the same error message.

    My 6 other boards are join the network just fine, it just this one that has decide to play up.

    (Edit) ALL firmware and software has been updated via USB to the LATEST versions. using the "fallback procedure 1"

    RepRapFirmware for Duet 2 WiFi/Ethernet version 2.03beta2 running on Duet WiFi 1.0 or 1.01

    DWC 1.22.6

    Any ideas ?



  • Post with version of DWC, Reprapfirmware and Wifi Server are you running.


  • administrators

    @calvinx, please verify the firmware versions on your Duet. To verify that 2.03beta2 is running, send M115. To verify the version of DWC, look on the Settings General page.

    If the versions are correct, try pressing control-F5 in your browser to force a complete reload of DWC.
    Your browser may have cached old versions of some of the DWC files.



  • @dc42 said in Javascript Error preventing connection:

    @calvinx, please verify the firmware versions on your Duet. To verify that 2.03beta2 is running, send M115. To verify the version of DWC, look on the Settings General page.

    If the versions are correct, try pressing control-F5 in your browser to force a complete reload of DWC.
    Your browser may have cached old versions of some of the DWC files.

    Yat replies:

    "SENDING:M115
    FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 2.03beta2 ELECTRONICS: Duet WiFi 1.0 or 1.01 FIRMWARE_DATE: 2019-02-16b1"

    DWC was updated with the latest file as per the instructions, cant check on the "General Page" as the javascript error is preventing me from connecting to the DWC...

    clearing browser cache on all programs or ctrl-F5 doesnt chang things, i had already tried all those.



  • in the terminal i can get the following:

    SENDING:M552 S1
    WiFi module started
    WiFi module is connected to access point Cosmos Wireless, IP address 192.168.88.244

    so logic would dictate that you open a web browser and input the ip address and then press connect, which i can do, but when i press connect i get the error message i listed and it fails to connect.

    It should be noted, that if i am here, as an engineer I have logically and methodically followed all written guides that i can find on this issue, seeking help here is a last resort not a first hold my hand and spoon feed me please.


  • administrators

    The most likely cause is that the DWC files are not quite right. I suggest you move the SD card to a PC, rename the existing /www folder, create a new one, and extract the DWC 1.22.6 files into to it.



  • @dc42 said in Javascript Error preventing connection:

    The most likely cause is that the DWC files are not quite right. I suggest you move the SD card to a PC, rename the existing /www folder, create a new one, and extract the DWC 1.22.6 files into to it.

    Already tried that too....


  • administrators

    Have you tried deleting HTML5 local storage for the Duet's IP address in your browser? It's usually I the same settings as deleting cookies.

    Or you could try DWC 2.0RC5.



  • @dc42 said in Javascript Error preventing connection:

    Have you tried deleting HTML5 local storage for the Duet's IP address in your browser? It's usually I the same settings as deleting cookies.

    Or you could try DWC 2.0RC5.

    Tried clearing the cache too, next stop was to try a different. DWC.

    strangely it's only this board. As I went to my stores and dug out a new 1.04 board and it connects fine, when I first commissioned the first board it was a pain to connect via wifi, I bought a few ethernet modules but never got round to fitting the module to this one.


  • administrators

    @calvinx said in Javascript Error preventing connection:

    strangely it's only this board. As I went to my stores and dug out a new 1.04 board and it connects fine, when I first commissioned the first board it was a pain to connect via wifi, I bought a few ethernet modules but never got round to fitting the module to this one.

    That is indeed odd. Have you tried moving the SD card from one of the working boards to this one?


  • administrators

    Please send over your config.g. This problem indicates that DWC1 attempts to read a non-existent temperature from an HTTP response.



  • Hi Chris

    Sorry for the delay, I had to travel for a few days doing work related crap..

    @chrishamm said in Javascript Error preventing connection:

    Please send over your config.g. This problem indicates that DWC1 attempts to read a non-existent temperature from an HTTP response.

    As requested, if its an issue in the config.g it wouldnt make sense as the file has not changed since being used succefully on a previous occassion.

    P3_Steel_config.g



  • OK Gents

    I have overcome the issue, in a very strange way. And I dont fully understand what the root cause of the issue was. Hopefully some other can advise.

    I tried resetting the wifi network and I used Pronterface did all required and after I rebooted I started receiving the message "WiFi reported error: no known networks found"

    Which left me thinking hmmmm, I wonder.

    So I switched over to YAT, cleared the network that was saved then I input the following command: M587 S"Your SSID" P"your-network-password"

    This reported as successful with the M552 S1 reporting connected to my network.

    And I am now able to connect using the web interface with no issue.

    Now I wanted to check why I could connect when I couldnt before. So I carried out all as before but with pronterface. I noticed that using the M587 command in pronterface saves the SSID & Password all in Upper case instead of what it wa supposed to be, so that solved that part of the mystery.

    What I dont fully understand is why the web browser found the printer and would open its IP address but would stumble when trying to connect, and why clearing the saved networks (which are all the same as before and havent changed for years) and using YAT to reconnect fixed the problem.

    And the config.g is still the same as when I couldnt connect.

    So its solved, but why is it solved and what was the root cause ?


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.