[Error] After Loading Scene Go straight to OnLeftRoom()

Options
Hi all
I am new on Photon and I've been trying to use it for a month or two now. I made it work in some cases, but now I am facing a really weird issue which I cannot comprehend myself, for that reason I am asking here.

Before starting with the problem I will add the information about the versioning just in case is needed:
Unity 2019.4.17f1
Photon Pun 2 - Free Version 2.28.3
Let me know if there is something else I missed.

The issue is the next, I have a simple Launcher just add a name and connect to the server. I followed the steps in the intro and everything worked well.
Then I start adding modifications to the model which I will need to use, basically is a Car with a rigidbody in it and 4 wheelColliders inside the GO.

I have separated the Movement of the model into 2 scripts, the first one:
Drive just holds the logic that need to go to the RB and the wheelColiders to get the movement.
PlayerMovementManager controll the inputs of it, at this time is a simple slider to add speed or reduce it.

At the beginning I didn't find any issue on what was going on.
Now after adding some Debugging lines I got to this:
[7.234] SupportLogger OnConnectedToMaster().
PUN Basics Tutorial/Launcher: OnConnectedToMaster() was called by PUN
[7.327] SupportLogger OnJoinRoomFailed(32758,Game does not exist).
PUN Basics Tutorial/Launcher:OnJoinRoomFailed() was called by PUN. No random room available, so we create one.
[7.961] SupportLogger OnCreatedRoom(Room: '1725877' visible,open 1/4 players.).  GameServer:wss://GCAMS028.exitgames.com:19091
[7.975] SupportLogger OnJoinedRoom(Room: '1725877' visible,open 1/4 players.).  GameServer:wss://GCAMS028.exitgames.com:19091
PUN Basics Tutorial/Launcher: OnJoinedRoom() called by PUN. Now this client is in a room.
We load the Scene 1 

Here is where it go trickier and at the beginning it just disconnected without any log neither errors.
We are Instantiating LocalPlayer from Velodrome
Registered PhotonView: 1001
Exiting receive thread (inside loop). Server: wss://GCAMS028.exitgames.com:19091:0 Error: An exception has occurred while receiving.
Disconnecting because: Exception

Here is where there is a LogError comming from Proton but there is nothing more than the disconnection error is because an exception.
Could someone point me to the right direction? Am I doing something wrong?

Seems after I increased the PhotonNetwork.NetworkingClient.LoadBalancingPeer.DisconnectTimeout = 30000;
Instead of 10000 it can a bit further but then seems there is a error before it was a timeout issue.

To me seems I might be sending to much information to photon but I am not sure how can I controll that and I saw similar games but with different prefabs that works.

As I said, I did used as a base the Photon.Pun tutorial and I am not far away from there.
Thank you so much for any help you can bring.

Comments

  • I am also getting this error. have you found the solution to this???

  • No. Also there is no answer from photon...

  • chaarmi
    Options

    For anyone experiencing this issue => Exiting receive thread (inside loop). Server: XXXXX

    Here is the solutions that have worked for our team:

    1. Check to see if the scene that you are loading is not MASSIVE in size.
    2. Check to see if the scene being loaded is not sending/receiving data in the first frame (Wait a while before sending/receiving sync information with Photon).

    TO TEST AND SEE IF THIS IS THE CASE:

    1. Create a FULLY EMPTY dummy scene in unity and add it to the build settings
    2. Connect to Photon and try and use that EMPTY scene to see if works (Which it most likely should). This will alert you that your issue lies in the scene you were trying to load (Due to one of the above items OR something else in that specific scene).

    Hope the above solution helps out others going through the same issues!

    Nav Gupta => Former Unity 3D Live Help Expert Team Member and now Founder and CEO of Chaarmi Worlds Inc. making the future metaverse!! Check us out at Chaarmi.com!