I’m trying to fetch JSON data from an external URL I’ve set up. Loading the JSON in browser works fine but when I run the GET request I get the error “Failed to fetch” (printing this to a label as you can see in the screen grab below)
I can see the request coming in from Thunkable in the access log and returning correctly: 187.177.78.188 - - [09/Apr/2020:13:12:37 -0700] "GET /new/jsontest.php HTTP/1.1" 200 4300 "https://x.thunkable.com/web-build/index.html?projectId=5e89384762b8c703eb38dc68" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
Do I need to set any other properties than the URL in the Web API component?
How do I debug this?
I believe it was the same result in both. Although at this moment the mobile app hasn’t been able to generate a code for over an hour (it’s stuck at “loading…”), so I can’t verify.
Trying this again, it does actually load the result when running on the live app and plugging response into the label text.
Do you know why this is happening?
Is there any way to rectify this? This would help a lot, especially since the project doesn’t seem to refresh in the app, not sure if that’s expected behaviour or not. I have to close the app and generate a new login code to see any changes.
I have no idea. glad to see it is working for you. If it is not refreshing in the companion app, perhaps this is a bug that needs to be reported? do you experience this issue consistently?
How is it supposed to work - is it supposed to hot load the new code as soon as you change something in the web interface?
I’m new to the platform but so far I’m honestly experiencing a ton of bugs throughout. Most of the time the live app gets stuck loading while trying to generate a code. And more than half of the time when I add new things to the project it just crashes without any message, so that I have to figure out what’s wrong by trial and error until it doesn’t crash.
ahh. I should refresh after each change, but this is slower than a ‘hot reload’ with something like flutter when building in an IDE on your own computer
you know, when i was messing with the web API i was experiencing crashing too. i think this is an unknown bug to the developers. If you can pinpoint exactly when it crashes, this is useful info. if you let the admins know via the Github page, they can try to pin down the issue and fix it.
There are for sure bugs. However; it gets better all the time. It just can’t be perfect and still be improved upon at the rate that they are doing. And, if you were stuck coding or on another platform, you’d either be limited by teh platform or delayed in development due to coding/syntax/spelling/anyother types of issues…
So in other words in theory if I move something in the web app it should reflect after a while, without doing anything else?
Sure, I’m not hating on Thunkable – I’m liking it, but it just doesn’t seem very stable or debuggable at the moment.
The crashes aren’t specifically to do with the Web API component. The AirTable component also constantly crashed, and several other things that I can’t remember.
Thanks, @simonu8of, the bug reports are appreciated and vital, the devs cant test all block configs. The app should reflect shortly after a block change. If I am being impatient, I will make UI changes such as changing the background color, this seems to push the updates quicker than only a block change. That said, there are times when i do a block change that is reflected immediately. I think they just have to find a sweet spot of when the system will push the build updates and stop waiting for further changes or to say, whoa too many changes too quick, better push the updates before i forget what’s going on