Electron error message?

Hi there,

I’m getting the json below when attempting to retrieve data from my electron. any ideas? The same code works flawlessly on the photon. Any ideas what this means?

{
“ok”: false,
“error”: “Problem requesting variable: TimeoutError: message Describe reached maximum number of retransmissions”
}

Are you using any of the sleep functions?

I’m not using a sleep function, but I am a delay. The delay was simply to make the output to the serial more manageable during testing.

Just checking. I know there are network issues at the moment if your using System.sleep functions.

I’m a little late to the party but I had this same error. My issue occurred when I would call a cloud-registered function using the API while my particle device was in a loop (in particular waiting on a URC) within the main loop().

void loop(){
    while (waiting for URC) {
        if(URC arrived){
            do stuff;
        }
    }
}

To fix this either call Particle.process() to handle the other tasks, or delay() which delays for a period of time but also invokes background processes.

After fixing my code it looked something like this:

void loop(){
    while (waiting for URC) {
        if(URC arrived){
            do stuff;
        }
        delay(200); <- particle.function() calls handled here
    }
}

Hope this helped!