• Sun 2020.04.26

    While trying out the online IDE

    https://www.espruino.com/ide/

    and loading working code (it was working Feb 2017) I notice that orange 'Module Wifi not found' errors pop up.

    The call detail appears to remain the same:

    https://www.espruino.com/Reference#http
    https://www.espruino.com/Reference#Wifi



    Snippet is pretty basic

    var wifi = require("Wifi");
    
    function c() {
    
    wifi.connect("2WIRE", {password: "33212052"},
      function(err){
      if(err)console.log(err);
      else console.log("connected!");
    });
    
    }
    
    function g() {
      
    require("http").get("http://pur3.co.uk/h­ello.txt", function(res) {
    
      res.on('data', function(data) {
        console.log("HTTP> "+data);
      });
      res.on('close', function(data) {
        console.log("Connection closed");
      });
    });
    
    }
    
    

    Console output

    >>> Sent
    >>> Loading modules
    loadModule(Wifi)
    loadModule(http)
    ERROR: getURL("https://www.espruino.com/modules­/http.min.js") error : Not Found
    ERROR: getURL("https://www.espruino.com/modules­/Wifi.min.js") error : Not Found
    ERROR: getURL("https://www.espruino.com/modules­/http.js") error : Not Found
    WARNING: [notify_warn] Module http not found
    ERROR: getURL("https://www.espruino.com/modules­/Wifi.js") error : Not Found
    WARNING: [notify_warn] Module Wifi not found
    >>> Minifying
    

    Which when loading in the browser also confirms a 404

    https://www.espruino.com/modules/http.mi­n.js
    404
    https://www.espruino.com/modules/http.js­
    404
    



    Surprisingly I get the 'Hello World' text back, but when I attempt to view any of the connection details, such as the IP or AP:

    >console.log( wifi.getIP() );
    undefined
    =undefined
    Uncaught Error: Function "a" not found!
     at line 1 col 165
    ...ce(15,-1);else if("OK"==d){a(null,b);return}return h}
                                  ^
    in function "c" called from line 1 col 25
    g=void 0;var b;c&&(b=c(a))?(g=e,c=b):clearTimeout(d);­void 0=...
                            ^
    in function "g" called from line 2 col 4
    g(f)}b=b.substr(a+1);if(p&&d)return q("");"\n"==b[0]&&(b=b.s...
       ^
    in function called from system
    Uncaught Error: Function "a" not found!
     at line 1 col 15
    if(void 0===d)a("Timeout");else{if("+CIFSR:STAIP­"==d.substr(...
                  ^
    in function "c" called from line 1 col 15
    g=void 0;c&&c();void 0===g&&0<k.length&&f.cmd.apply(f,k.shif.­..
                  ^
    

    I can see the wifi variable is populated,

    >wifi
    ={
      connect: function (a,b,c) { ... },
      disconnect: function (a) { ... },
      startAP: function (a,b,c) { ... },
      stopAP: function (a) { ... },
      scan: function (a) { ... },
      getIP: function (a) { ... },
    
    . . . . 
    
    >e()
    {
      "VERSION": "2v04",
      "GIT_COMMIT": "3956264e",
      "BOARD": "ESPRUINOWIFI",
    

    Is it possible this last 2V05 is the culprit?

    I'll try some reflashing in the mean time. But that wont work if the modules aren't there, correct? (yes)

    Minification and Esprima are both set to No Minification and offline

About

Avatar for Robin @Robin started