Gdevelop: Http Request does not work on native game

Created on 29 Oct 2016  路  13Comments  路  Source: 4ian/GDevelop

Hi,

I don't know if it's normal, but i didn't see anything about this on doc/wiki but http Request doesn't seems to work on native game on linux.

Thanks

馃悰 bug

All 13 comments

As far as I remember this should work properly. Can you log the requests on your server to see if requests are being received? Can you paste here a screenshot of the parameters that you set for the request action?

Thanks for your answer 4ian,

It works only when i use html build or html preview (Flask receive the post and i can get also response in variable in GD) but when I use native it don't work anymore. (Nothing in Flask)

I use linux debian and GD is compiled without error. I just get this error in linux console during the game :

Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock AL lib: (WW) ALCjackBackendFactory_init: jack_client_open() failed, 0x11 AL lib: (WW) alc_initconfig: Failed to initialize backend "jack"

But it looks like to come from the sound but sound is working.

Edit: Same problem with Raspbian

940ec3f5470d1e9ad9473fa31d2f63ab

Maybe GDevelop forgets to take the connection port into account.

Indeed it's highly possible that the port is not automatically parsed. So it will currently only work for port 80 (or 443 for https) for native games.

Great!

It works! I had to use port 80 in GD. I was obligated to run nginx proxy for redirect to port 8090. I can't make Flask run on port 80.

So good! I can now create my game interacting with Raspberry Pi GPIO and RFID cards

_PS : Is there any way to use another port instead? Or directly use python with GD?_

Great thanks

The library used by GDevelop should be able to interpret the port number
but it doesn't seem to be the case...

GDevelop forgets to set the port in the sf::Http object (instead it directly gives the "host" value to setHost).

Hi Victor,

I see you pushed a fix for http request. Is it now working? Can I git clone master version and build it again?

Otherwise, I saw http request is waiting for response to continue so it make the game freeze during http request. Is there any way to avoid this in GD?

Thanks for your work and your time.

You can try to clone the branch the fix is on (but it's not merged in the master branch yet).
No way to do an asynchronous request (not pausing the game) in GDevelop currently.

Ok thanks I will try to build from your branch.

So i will try to use bash script with flask to use Led instead of using directly python who's waiting for led & sleep instruction to return response.

Fix is working perfectly, I can now use GD web request with port. Really thanks Victor.

PS: 4ian ( and Victor ) if you always want to use GD for education, it's now working well on Raspberry Pi with beta openGL driver activated like I show on my twitter @oneil974. Maybe a small extension with c++ to use GPIO could propulse GD in the Raspberry Pi community, I'm pretty sure. But alternatively, I'm using python flask server to use GPIOZero.
If you are interested in, just let me know I could make some tests for you.

Best regards

I only have a RPi 1 that doesn't support the OpenGL driver. So I can't really test GDevelop on it.

Je peux te laisser des acces VNC et SSH au mien si 莽a t'int茅resse.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bouh picture Bouh  路  4Comments

giusreds picture giusreds  路  4Comments

blurymind picture blurymind  路  5Comments

Wend1go picture Wend1go  路  5Comments

Wend1go picture Wend1go  路  3Comments