Code Monkey home page Code Monkey logo

Comments (6)

novabyte avatar novabyte commented on May 28, 2024

@gupta-vaibhav do you have debug level logs output of the stream responses sent by the server?

from nakama-unity.

gupta-vaibhav avatar gupta-vaibhav commented on May 28, 2024

Chris, there were no debug level logs that printed for this. Here is the code that I used:

    local stream_id = { mode = 123, label = "my custom stream", subject = context.user_id }
    local hidden = true
    local persistence = false
    print('----registering for stream---')
    nk.stream_user_join(context.user_id, context.session_id, stream_id, hidden, persistence)
    print('----registered for stream---')

And here is the code that I used for sending the data on stream:

    print('----Sending data on stream---')
    local stream_id = { mode = 123, label = "my custom stream", subject = context.user_id }
    local payload = nk.json_encode({ some = "Data" })
    nk.stream_send(stream_id, payload)
    print('----Sent data on stream---')

Here are the logs from the server, nothing printed here:

----registering for stream---
----registered for stream---
----Sending data on stream---
----Sent data on stream---

The server was running in debug mode as it was started with " --logger.level DEBUG" option and we could see other debug level logs such as:

{"level":"debug","ts":"2018-11-26T15:07:16.708+0530","msg":"Sending *rtapi.Envelope_Rpc message","uid":"ce9e3ea6-fff8-4a40-8ac6-e4444b9c5842","sid":"6aeaa02f-63ce-4f4e-8b80-168fbdfadeb8","payload":"{\"cid\":\"676487a7-f44a-4086-9e77-614911a6cd3e\",\"rpc\":{\"id\":\"logininfo\",\"payload\":\"{\\\"activematch\\\":\\\"none\\\"}\"}}"}

Is there anything else that I need to do in order to print more detailed debug logs?

from nakama-unity.

zyro avatar zyro commented on May 28, 2024

@gupta-vaibhav One of the debug messages should have "msg":"Sending *rtapi.Envelope_StreamData message" or similar. Can you share the full log line that matches?

from nakama-unity.

gupta-vaibhav avatar gupta-vaibhav commented on May 28, 2024

@zyro I have verified a few times but there is no such log as "msg":"Sending *rtapi.Envelope_StreamData message"

I can also confirm that the server is running in debug mode, since I am getting debug logs, such as:

{"level":"debug","ts":"2018-11-28T11:42:16.815+0530","msg":"Sending *rtapi.Envelope_Rpc message","uid":"75395e64-ad0c-47b6-8f9c-02963d94acef","sid":"472aef9f-f357-4269-882e-a524ac711d00","payload":"{\"cid\":\"037b53e5-0daa-4e5e-b28e-88364f5a6dfa\",\"rpc\":{\"id\":\"logininfo\",\"payload\":\"{\\\"activematch\\\":\\\"none\\\"}\"}}"}

Despite no debug logs on server for StreamData, we are getting the logs on Unity with mode, label and subject, but no State. State was null. If it helps, here is the exact code for the stream data listener in Unity:

void _socket_OnStreamState(object sender, IStreamState stream)
    {
        Debug.Log("<color=green> _socket_OnStreamState </color>" + stream.Stream);
        Debug.Log("<color=green> _socket_OnStreamState </color>" + stream.Sender);
        Debug.Log("<color=green> _socket_OnStreamState is null </color>" + (stream.State == null));
    }

Let me know what else can I do to help debug this.

from nakama-unity.

willim-c avatar willim-c commented on May 28, 2024

I had same problem

from nakama-unity.

novabyte avatar novabyte commented on May 28, 2024

This is fixed and will be part of the next release of the client SDK.

from nakama-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.