Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Cameron Hall
@CamDHall
Yes I'm on 2.2.2. Please reference what I just put up. That's it. That's all I get back from Nakama. I understand what you're saying, but that's all that's actually being thrown.
Andrei Mihu
@zyro
I did reference what you just put up. The reason I stress it is because Unity client versions ~2.2.0 and lower (iirc) had an issue where the error message wasn't parsed out of the response, and this was fixed in 2.2.1+
So it was a common problem to see where the reason message was swallowed before the client presented it to you
If that's not the case then there's something else odd going on
You're going through nginx, right? Have you tried without it - hit Nakama directly?
Cameron Hall
@CamDHall
Yes I'm on "v2.2.2". Unity Version 2019.1.6f1. The difference for the client code is that we're using "UnityWebRequestAdapter.Instance" when we create the client, as without it we run into the Unity libc issue referenced here: heroiclabs/nakama-unity#74
I'm able to create and authenticate users properly. They all show up in the DB. But I can't do anything else until I get the connection working.
Cameron Hall
@CamDHall
Iif I hit it directly I get the same exception.
Chris Molozian
@novabyte
This is very strange it's as though you cannot reach the /ws endpoint with the right input arguments
What happens if you just navigate to your server address with the /ws
You should see an error from Nakama about an invalid session token
can you confirm you get that error?
Cameron Hall
@CamDHall
Yes. I get "Missing or invalid token"
Chris Molozian
@novabyte
Ok that's good
can you send me the output of session.AuthToken field?
I'd like to decode the session token and inspect the contents
Cameron Hall
@CamDHall
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NjYwNjI2MzQsInVpZCI6IjI1ODExYWI1LTM1YzctNDU5OC04Zjk1LWU5MzZjMGU4MmEzMiIsInVzbiI6IkZyRmpNUXRPV1kifQ.9Wu-YJOiA8lacUxuMP9qOsZds3qef0Cf7vlFxRvzjzI"
Chris Molozian
@novabyte
Ok it looks like the token is valid:
{
  "exp": 1566062634,
  "uid": "25811ab5-35c7-4598-8f95-e936c0e82a32",
  "usn": "FrFjMQtOWY"
}
It decodes correctly and the signature verifies against the default signing key
@CamDHall What version of Unity engine do you use?
Cameron Hall
@CamDHall
2019.1.6f1
Chris Molozian
@novabyte
Ok and does the problem occur in editor as well as on device?
Cameron Hall
@CamDHall
I'm not sure. Let me check
Cameron Hall
@CamDHall
Yes it occurs both in editor and on Android
Chris Molozian
@novabyte
Ok I'll test with that version of Unity engine
Chris Molozian
@novabyte
@CamDHall I ran the SDK with this code attached to a game object in Unity engine at 2019.1.6f1 version
using System;
using System.Threading.Tasks;
using Nakama;
using UnityEngine;

public class Example : MonoBehaviour
{
    private IClient _client;
    private ISocket _socket;

    private async void Awake()
    {
        _client = new Client("defaultkey", UnityWebRequestAdapter.Instance);
        _socket = _client.NewSocket();
        _socket.Closed += () => Debug.Log("Socket closed.");
        _socket.Connected += () => Debug.Log("Socket connected.");
        _socket.ReceivedError += e => Debug.LogErrorFormat("Socket error: {0}", e.Message);

        var deviceId = SystemInfo.deviceUniqueIdentifier;
        var session = await _client.AuthenticateDeviceAsync(deviceId);
        await _socket.ConnectAsync(session);
        Debug.Log("After socket connected.");
    }

    private void OnApplicationQuit() => _socket?.CloseAsync();
}
I get no errors at all
I ran it with our docker-compose file using the latest Nakama 2.6.0 release of the server
Cameron Hall
@CamDHall
I have the same code. Still getting a bad request 400 response. Our compose file is back to stock, and I get the same response. Still getting a "missing or invalid token" when I got to the ws endpoint. I'm also on 2.6.0.
Chris Molozian
@novabyte
@CamDHall can you zip up your project or some minimal example I can reproduce the issue with and I'll run it locally?
Cameron Hall
@CamDHall
@novabyte can I dm a zip?
Chris Molozian
@novabyte
Sure :thumbsup:
timdevil
@timdevil_twitter
Can anyone help me? I've installed nakama on ubuntu server. The game server seems to work fine but the developer console doesn't. When I open the browser at 7351 port it gives me a white screen instead of the login dashboard. I tried to telnet to that port and it's open. Where should I look to fix this? Thanks
Mo Firouz
@mofirouz
@timdevil_twitter what version of the game server are you running? Do you have a proxy in front of Nakama?
timdevil
@timdevil_twitter
ubuntu 18.04, nakama 2.4.0. It's a default Linode server instance. ufw status command returns "inactive". I didn't install/add any proxies.
Mo Firouz
@mofirouz
Please update to Nakama 2.6.0 - 2.5.1 is the release that has the Developer Console.
timdevil
@timdevil_twitter
Oh, my bad. I have used an old config to deploy nakama. Thank you for the fast response! You saved me some hours I guess :)
Mo Firouz
@mofirouz
Np happy to help
Abhishek Patidar
@iabhipatidar
HI…When i try to disconnect network in macOS or ios, socket disconnection is not triggered in unity ??
Chris Molozian
@novabyte
@iabhipatidar Yes it is.
HashtagGo
@HashtagGo
how to Dispose match Manually ?
Andrei Mihu
@zyro
If you have a feature question can you put it on the forum? - https://forum.heroiclabs.com/
AndreasBAT
@AndreasBAT
Hi, could a heroiclabs developer please have a look at my draft PR #368 to extend Nakama with achievement support? I dm'd @novabyte the day before yesterday but have not heard back from him
Abhishek Patidar
@iabhipatidar
@novabyte socket disconnection is working on android but not in ios. Was this ever an issue because if something like this was fixed, I’ll update the dll. (P.S I did check all the releases on github but something like this wasn’t mentioned). To be more clear the socket disconnection does work when the game is closed but not when network is cut off
Andrei Mihu
@zyro
@iabhipatidar Have you updated to the Unity client version 2.2.2? Even if you're not sure if some changelog items affect your use case you should update anyway.
@AndreasBAT We've not had a chance to look at it yet. We'll do our best because we really do want the achievements feature and we're grateful for the help, but as you can imagine we're super swamped with various ongoing pieces of work
HashtagGo
@HashtagGo
There’s a way to disable the ping pong manager ?
Mo Firouz
@mofirouz