question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OnServerConnect is never called

See original GitHub issue

For some reason the function in UnityNetworkServer:

private void OnServerConnect(NetworkMessage netMsg)

is never called before:

private void OnReceiveAuthenticate(NetworkMessage netMsg)

So for any request from the client _connections is empty and all requests to the server fail.

UnityEditor.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
CrHashercommented, Apr 29, 2020

Please see pull request with fix for this issue.

0reactions
dgkanatsioscommented, May 20, 2020

Closing because of #18

Read more comments on GitHub >

github_iconTop Results From Across the Web

OnServerConnect is not called - Questions & Answers
Hi! I'm trying to call the OnServerConnect function when client connects. I simply have this code void OnServerConnect (){ Debug.
Read more >
OnServerAddPlayer(NetworkConnection conn) Never ...
Ok I'm new to Playfab and am really struggling to get two players spawned into a room in Unity. I have a matchmaking...
Read more >
NetworkManager.OnServerConnect - Scripting API
Called on the server when a new client connects. Unity calls this on the Server when a Client connects to the Server. Use...
Read more >
Error 'No suitable method found to override' in Unity
I have included using Mirror , and the class inherits from Network Manager. Unity version 2021.3.5f1. I'd greatly appreciate any help! c# ...
Read more >
Starting server/host after cancelling client connection ...
Disconnection is never called. The client is also observed to continue to try to connect despite cancellation -> if you cancel quickly and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found