Web API issues?!


I’m developing an IoT app with Thunkable and having some problems with Web API I think…

Here is what is happening:
When opening the app I get the following screen which is ok:

Then I’m moving to a different screen, for example device edit or add new devices, and I get following which is nok. Should be same as above:

Now this is what bugs me. First I don’t understand what I’m doing wrong that is not working.
Next if I’m in 4G network it works ok but if I’m on wifi is not working. Even if when on wifi when starting the app it works.

Here is the code that I’m having:

Hey @Pop_Gheorghe - the only difference I see (aside from the device names) is that the settings icon for device3 is not aligned correctly.

Is that the issue you’re facing, or was it something else?


Isuse is that if I do loops inside of a web api call they are executed without getting the data from the web api call. For example above code should get from the first web api call 2 devices, and act accordingly. Some times it gets 2 which’s correct and some time only 1 which is wrong probably due to connection issues. But, what I would wish is the code first to resolve the web api call and then to pass to the for loop. Now they are running in parallel.

I can say I dont experience that issue. My apps only runs code after getting the data as long as the code i need to wait for data is held within the ‘then do’ section of that section of code

Probably I’m wrong but after making several test with for/while/if loops that was my conclusion. Also above screenshot shows that the for is ended without getting device2 status .I’m using web api in web api call, maybe is somehow related. And also this was more obvious on WiFi network vs. 4G network.