Can't run httprequests from packaged build

I’m running a GET http request as a part of our login procedure. It requests character data from a database and the php script then returns it in JSON format. I use VaRest plugin to send, receive and decode the request. I developed and tested in in PIE and it works as intended.

Now the problem is that as soon as I package a client and run it as standalone, the http request fails. It gets sent ok, it gets received ok, we’re logging the response in the php script and it’s sending back a valid response. But when it reaches the client again it will be an invalid response (FHttpResponsePtr->IsValid() returns false).

Does anyone know if there are any obvious pit falls with these things? Will the PIE version bypass firewalls in a way that the standalone client won’t or is there some config that needs to be set specifically for the packaged client?

Hello Marthalion,

Is this an issue that you can reproduce without the use of the VaRest plugin? If not, it would be best to contact the creator of the plugin as they may know about the cause of this, especially if it’s only present in an old version such as 4.13.

I haven’t tried implementing the http request manually. I’m contacting the plugin creator now and if that doesn’t work I’ll try your suggestion and get back to you. Thank you!

I tried implementing a request manually and it breaks in the same way. Also tried creating a new project (default 3d person c++) with the engine we use and run the VaRest plugin from there. That worked as intended, but it’s still breaking in our main project.

I’ve tried setting bVerifyPeer to false (even though we’re not using https atm) but it made no difference. Starting the packaged client with HTTP=WinInet does make it work, but we want to move to https eventually and afaik curl would be the way to go for that.

Would there be any config setting that could cause an issue such as this?

I’m not sure of a configuration setting that would affect this. As you can’t reproduce it in a fresh project with your exact same setup, I would likely end up with the same results. Would it be possible for you to provide a version of your project that does experience the issue? If the project is too large, you could strip out as much content as possible. You could also send it privately through a private message on our [forums][1].

[1]:

Check the following suggested change to VaRest: .com/ufna/VaRest/pull/101

There was a problem with request object callbacks were being garbage collected, so they could disappear in the middle of a request. Maybe it could be related to your problem.