I’m trying to allow players to reconnect if they go offline but later reconnect. However, that doesn’t seem to be working. I’ve posted this issue on the Github repo as well. I couldn’t find anything obvious in the library, e.g. a check for internet connection or state saving when offline, so posting this here as well.
Steps to reproduce
Start an app without an internet connection, e.g. with Wi-fi turned off.
Attempt to send a request when offline, e.g. PlayFabClientApi.LoginWithCustomID. The request should fail as expected.
Turn wifi on.
Attemp to send a request without restarting the app.
It was a while since I looked at the playfab code but it should be pretty straightforward. I would try with the debugger and follow the reconnect flow step by step.
Are your able to do a normal http.request() completely ignoring the playfab code?
I’ve tried it with a simple http.request() and I’m running into the same issue (which means that Playfab has nothing to do with this).
The following is the error that I get when trying to make a request after going through the mentioned steps (no wifi, start, re-enable wifi, click “Retry” from within the game):
ERROR:SCRIPT: Unable to create HTTP connection to 'http://www.google.com'. No route to host?
The same error happens whether the game is run from within defold or packaged up and run in macos or android.
We can confirm that it is a bug in Defold. We’re looking into it. It seems to have been introduced when we released the async dns lookup fix in May. I’m a bit surprised that we haven’t caught this sooner (I blame summer!).
I have tested http.request and i got this message too. nothing happens while playing, after i close game window i see this error in console. i use version 1.2.168
my request works on browser and postman.
i run defold on microsoft windows 10, and server is running on linux using node js and express, the server is answering my http request using unity and post man right now, I have active game which is connects to server. i can send you our ip and port in private message if you think this helps you to find the problem.