Exception: cannot serialize(): ExitGames.Client.Photon.ByteArraySlice

Options
An error occurs when running the demo on the self-built server, when a player joins the room。
stack show as below:
Exception: cannot serialize(): ExitGames.Client.Photon.ByteArraySlice
ExitGames.Client.Photon.Protocol16.Serialize (ExitGames.Client.Photon.StreamBuffer dout, System.Object serObject, System.Boolean setType) (at <3378b7e0b2ad4a0498ca132d9a70ddbd>:0)
ExitGames.Client.Photon.Protocol16.SerializeParameterTable (ExitGames.Client.Photon.StreamBuffer stream, ExitGames.Client.Photon.ParameterDictionary parameters) (at <3378b7e0b2ad4a0498ca132d9a70ddbd>:0)
ExitGames.Client.Photon.Protocol16.SerializeOperationRequest (ExitGames.Client.Photon.StreamBuffer stream, System.Byte operationCode, ExitGames.Client.Photon.ParameterDictionary parameters, System.Boolean setType) (at <3378b7e0b2ad4a0498ca132d9a70ddbd>:0)
ExitGames.Client.Photon.PeerBase.SerializeOperationToMessage (System.Byte opCode, ExitGames.Client.Photon.ParameterDictionary parameters, ExitGames.Client.Photon.EgMessageType messageType, System.Boolean encrypt) (at <3378b7e0b2ad4a0498ca132d9a70ddbd>:0)
ExitGames.Client.Photon.PhotonPeer.SendOperation (System.Byte operationCode, ExitGames.Client.Photon.ParameterDictionary operationParameters, ExitGames.Client.Photon.SendOptions sendOptions) (at <3378b7e0b2ad4a0498ca132d9a70ddbd>:0)
Photon.Realtime.LoadBalancingPeer.OpRaiseEvent (System.Byte eventCode, System.Object customEventContent, Photon.Realtime.RaiseEventOptions raiseEventOptions, ExitGames.Client.Photon.SendOptions sendOptions) (at Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs:966)
Photon.Realtime.LoadBalancingClient.OpRaiseEvent (System.Byte eventCode, System.Object customEventContent, Photon.Realtime.RaiseEventOptions raiseEventOptions, ExitGames.Client.Photon.SendOptions sendOptions) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2095)
Photon.Pun.Simple.Internal.NetMsgSends.Send (System.Byte[] buffer, System.Int32 bitposition, UnityEngine.Object refObj, Photon.Compression.SerializationFlags flags, System.Boolean flush) (at Assets/Photon/Simple/Utilities/Networking/NetAdapters/NetMsgSends.cs:120)
Photon.Pun.Simple.NetMaster.SerializeAllAndSend () (at Assets/Photon/Simple/Core/NetMaster/NetMaster.cs:359)
Photon.Pun.Simple.NetMaster.PostSimulate () (at Assets/Photon/Simple/Core/NetMaster/NetMaster.cs:211)
Photon.Pun.Simple.NetMaster.Update () (at Assets/Photon/Simple/Core/NetMaster/NetMaster.cs:174)

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @weixudong,

    Thank you for choosing Photon!

    If I'm not mistaken you also send an email about this right?
    Anyways, there are two solutions to this:

    - use serialization protocol v1.8 with Photon Server v5
    - remove of "Assets\Photon\Simple"
  • emotitron
    Options
    I have made a change to Simple's send/rcv methods to check for older protocol to handle this (not released yet). Though Simple should not be sending anything if you aren't using any NetObjects in your scene. So that suggests you also have an older Pun2? Be sure to get current, as there were a lot of fast fixes made after Simple was added.

    Or, just continue to delete the Simple folder, as it sounds like you aren't using those extensions.
  • emotitron
    Options

    Delete PhotonUtilities as well if you delete Simple.