Closed TheBloodhoundBoy closed 5 months ago
Update: A python script with the same authentication data as Godot works on all clients (working and non-working with nakama-godot):
import requests
import json
url = "https://example.com:443/v2/account/authenticate/device?create=true"
payload = json.dumps({
"id": "{<device id>}"
})
headers = {
'Authorization': '<Auth token>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
The response is a json with the token and the refresh token, so it must be something with nakama-godot or Godot. Interestingly, authentication via Nakama-Godot works on one device across two networks, only in one network. However, the Python script works in both cases. Edit: Now also testet on nakam-godot 3.4.0. The version does not solve the problem.
@TheBloodhoundBoy do you get this issue when you connect to a locally running instance of the server via Docker? How are you hosting the server?
@lugehorsam We haven't tested it as a local instance yet, but we will, thanks for the suggestion! However, I have a feeling that it will work locally. We're hosting the server in the cloud as a Docker compose instance on an Ubuntu server. HTTP Response Server Field: nginx/1.18.0 (Ubuntu)
@TheBloodhoundBoy I think if it works locally then this sounds like an issue with your custom infrastructure setup. We aren't able to help with that but recommend a development tier Heroic Cloud (https://heroiclabs.com/heroic-cloud/) for testing your server over the internet.
We are experiencing a peculiar issue with authentication on the Nakama server in our game:
Regardless of the method used, be it authenticate_device_async or via email, it only works partially. It seems to work on roughly 50% of the devices/networks we test.
For the devices/networks where it works, we receive the message "Successful authenticated." However, for the other 50%, we receive the message "failed with result: 13, response code: 0."
Interestingly, when we set a breakpoint at this point and then continue, the request works, and the client is successfully authenticated: (File:res://addons/com.heroiclabs.nakama/client/NakamaHTTPAdapter.gd)![godot](https://github.com/heroiclabs/nakama-godot/assets/38135854/9d3e8957-7a1d-4113-8d32-1fd2753749cd)
Logs:![godot logs](https://github.com/heroiclabs/nakama-godot/assets/38135854/f059f362-4587-44da-8ad7-dc888e03bc0c)
Versions used: nakama-godot 3.3.1 Godot 4.1.3, 4.2.1