• You might be able to solve this easily enough by setting a flag for when you are doing HTTP access and on the timer side. What seems to happen is that during a page request a timer is called and then you get this error.

    What I found solved it was if you set a flag like:

    function pageRequest(res, req) {
        servingPage=true;
    
        // all your code
    
        servingPage=false;
    
    }
    

    and then after in your setInterval function

    setInterval(function() {
        if (servingPage) return;
    
        // your code here
    
    },milliseconds)
    

    Then this generally resolves the problem.

    For some reason the timers for Espruino in the ESP32 port are very fussy and what I've learned is refactoring your code to use as few as possible really makes your app run more smoothly.

    G

About

Avatar for MisterG @MisterG started