Deserialization error: Failed to parse Operation using protocol GpBinaryV18

Options
Periodically get this warning on photon dedicated server:
What does it mean? And how to fix?

WARN Photon.SocketServer.PeerBase - Deserialization error: Failed to parse Operation using protocol GpBinaryV18 / encrypted: False. errorCode=-13, errorMsg: 'Max Size For Parameter Exceeded. size_46097, parameter_251, limit_10000'. Data:{"vals":[251,{"MapData":[91,0,5,0,191,52,220,236,250,179,0,0,7,0,1,0,56,0,0,0,7,0,0,0,0,0,2,0,99,179,0,0,3,0,103,179,0,0,4,0,106,179,0,0,5,0,246,179,0,0,6,0,254,179,0,0,203,12,0,0,2,0,255,255,255,0,0,0,0,130,255,255,255,11,0,0,1,0,0,128,0,2,1,1,0,226,0,11,0,2,1,0,0,126,0,14,1,1,0,226,0,93,0,57,1,23,0,139,0,60,1,25,0,140,0,93,0,74,1,15,0,167,0,75,1,16,0,168,0,93,0,95,1,22,0,170,0,96,1,23,0,175,0,197,1,94,1,12,0,168,0,95,1,15,0,169,0,197,1,79,1,12,0,168,0,81,1,15,0,169,0,1,0,65,1,7,0,165,0,67,1,9,0,183,0,1,0,56,1,7,0,154,0,76,1,8,0,164,0,197,1,85,1,11,0,168,0,86,1,14,0,169,0,197,1,94,1,11,0,157,0,95,1,12,0,169,0,1,0,38,1,1,0,126,0,43,1,7,0,226,0,143,0,65,1,22,0,139,0,66,1,26,0,140,0,68,0,39,1,10,0,132,0,40,1,11,0,136,0,143,0,88,1,4,0,126,0,89,1,6,0,152,0,197,1,83,1,12,0,168,0,84,1,15,0,169,0,197,1,94,1,12,0,156,0,95,1,15,0,157,0,197,1,91,1,12,0,168,0,92,1,15,0,169,0,197,1,86,1,11,0,168,0,94,1,12,0,169,0,6,0,79,1,10,0,169,0,80,1,11,0,185,0,93,0,74,1,11,0,167,0,77,1,12,0,168,0,82,0,93,1,10,0,157,0,94,1,11,0,158,0, op/ev/resp code=252. Data: F3-02-FC-02-FB-15-01-07-07-4D-61-70-44-61-74-61-43-82-E8-02-5B-00-05-00-BF-34-DC-EC-FA-B3-00-00-07-00-01-00-38-00-00-00-07-00-00-00-00-00-02-00-63-B3-00-00-03-00-67-B3-00-00-04-00-6A-B3-00-00-05-00-F6-B3-00-00-06-00-FE-B3-00-00-CB-0C-00-00-02-00-FF-FF-FF-00-00-00-00-82-FF-FF-FF-0B-00-00-01-00-00-80-00-02-01-01-00-E2-00-0B-00-02-01-00-00-7E-00-0E-01-01-00-E2-00-5D-00-39-01-17-00-8B-00-3C-01-19-00-8C-00-5D-00-4A-01-0F-00-A7-00-4B-01-10-00-A8-00-5D-00-5F-01-16-00-AA-00-60-01-17-00-AF-00-C5-01-5E-01-0C-00-A8-00-5F-01-0F-00-A9-00-C5-01-4F-01-0C-00-A8-00-51-01-0F-00-A9-00-01-00-41-01-07-00-A5-00-43-01-09-00-B7-00-01-00-38-01-07-00-9A-00-4C-01-08-00-A4-00-C5-01-55-01-0B-00-A8-00-56-01-0E-00-A9-00-C5-01-5E-01-0B-00-9D-00-5F-01-0C-00-A9-00-01-00-26-01-01-00-7E-00-2B-01-07-00-E2-00-8F-00-41-01-16-00-8B-00-42-01-1A-00-8C-00-44-00-27-01-0A-00-84-00-28-01-0B-00-88-00-8F-00-58-01-04-00-7E-00-59-01-06-00-98-00-C5-01-53-01-0C-00-A8-00-54-01-0F-00-A9-00-C5-01-5E-01-0C-00-9C-00-5F-01-0F-00-9D-00-C5-01-5B-01-0C-00-A8-00-5C-01-0F-00-A9-00-C5-01-56-01-0B-00-A8-00-5E-01-0C-00-A9-00-06-00-4F-01-0A-00-A9-00-50-01-0B-00-B9-00-5D-00-4A-01-0B-00-A7-00-4D-01-0C-00-A8-00-52-00-5D-01-0A-00-9D-00-5E-01-0B-00-9E-00-C5-01-58-01-0C-00-A8-00-59-01-0F-00-A9-00-C5-01-4A-01-0B-00-9C-00-5F-01-0C-00-9D-00-5D-00-4B-01-0C-00-A7-00-4D-01-10-00-A8-00-C5-01-5E-01-0C-00-A5-00-5F-01-0F-00-A6-00-C5-01-5E-01-0C-00-A2-00-5F-01-0F-00-A3-00-C5-01-5E-01-0C-00-9F-00-5F-01-0F-00-A0-00-C5-01-5B-01-0C-00-9C-00-5C-01-0F-00-9D-00-5D-00-53-01-0C-00-9C-00-55-01-0F-00-9D-00-5D-00-56-01-0C-00-9C-00-58-01-0F-00-9D-00-99-00-4A-01-0E-00-9F-00-50-01-0F-00-A0-00-8F-00-4B-01-0C-00-A0-00-4C-01-0D-00-A1-00-C5-01-54-01-0E-00-A8-00-56-01-0F-00-A9-00-C5-01-4A-01-0B-00-A0-00-4B-01-0C-00-A1-00-52-00-5E-01-0A-00-9D-00-5F-01-0B-00-A9-00-C5-01-53-01-0F-00-9C-00-5F-01-10-00-9D-00-C5-01-49-01-0B-00-A8-00-4A-01-19-00-A9-00-C5-01-5E-01-0F-00-9D-00-5F-01-10-00-A9-00-52-00-4A-01-0A-00-A9-00-4F-01-0B-00-AC-00-5D-00-59-01-0C-00-A8-00-5B-01-0F-00-A9-00-C5-01-4F-01-0F-00-A8-00-5E-01-10-00-A9-00-5D-00-51-01-0C-00-A8-00-53-01-0F-00-A9-00-5D-00-56-01-0C-00-A8-00-58-01-0F-00-A9-00-5C-00-4A-01-0C-00-A0-00-4B-01-0D-00-A1-00-C5-01-4E-01-0B-00-A9-00-4F-01-10-00-AB-00-C5-01-49-01-0C-00-A1-00-4B-01-0D-00-A2-00-C5-01-55-01-0C-00-9C-00-56-01-0F-00-9D-00-C5-01-58-01-0C-00-9C-00-59-01-0F-00-9D-00-C5-01-4F-01-0B-00-9D-00-50-01-0C-00-9E-00-C5-01-50-01-0F-00-9C-00-52-01-10-00-9D-00-C5-01-52-01-0C-00-9C-00-53-01-10-00-9D-00-C5-01-4A-01-0C-00-9C-00-50-01-10-00-9D-00-99-00-4A-01-0C-00-9F-00-50-01-0D-00-A0-00-3D-00-4A-01-0B-00-9F-00-50-01-0C-00-A0-00-33-00-4D-01-0B-00-9D-00-4E-01-0D-00-9F-00-33-00-4E-01-0B-00-9D-00-4F-01-0C-00-9F-00-5D-00-50-01-0C-00-9C-00-52-01-0F-00-9D-00-5D-00-59-01-0C-00-9C-00-5B-01-0F-00-9D-00-5D-00-5C-01-0C-00-9C-00-5E-01-0F-00-9D-00-5D-00-5E-01-0C-00-9D-00-5F-01-0F-00-9F-00-5D-00-5E-01-0C-00-A0-00-5F-01-0F-00-A2-00-5D-00-5E-01-0C-00-A3-00-5F-01-0F-00-A5-00-5D-00-5E-01-0C-00-A6-00-5F-01-0F-00-A8-00-5D-00-5C-01-0C-00-A8-00-5E-01-0F-00-A9-00-C5-01-49-01-10-00-A3-00-4A-01-16-00-A8-00-3D-00-4A-01-0D-00-9F; peer=GameClientPeer: PID: 1025, IsConnected: True, IsDisposed: False, Last Activity: Operation 253 at UTC 2021-07-14T03:47:39, in Room 'д̠е̠в̠к̠и̠ с̠г̠л̠у̠п̠и̠л̠а̠ я вышла за дебила под номером один какой он крокодил цветочки не дарит носки в меня кидает а̠ у̠ м̠е̠н̠я̠ н̠е̠т̠ п̠а̠р̠н̠я̠ э̠х̠ л̠а̠д̠н̠о̠', IP 80.83.239.55:29760, NetworkProtocol Udp, Protocol GpBinaryV18, JoinStage: 12

Comments

  • PixelLord
    Options
    How to increase Max Size For Parameter?
  • PixelLord
    Options
    found following code in sources:

    namespace Photon.SocketServer.Rpc.Protocols
    {
    public ref struct ReadContext
    {
    public readonly byte[] data;
    public int offset;
    public readonly CustomTypeCache PrivateCustomTypeCache;
    public readonly InboundController InboundController;
    public RequestMetaData MetaData;
    public ParameterMetaData ParamMetaData;
    public bool CollectSubTypesMetaData;
    public int ParameterMaxElementsCount;
    public int ParameterMaxSize;
    public short ErrorCode;
    public string ErrorMessage;

    public ReadContext(byte[] data, SerializeSetup setup, int offset)
    {
    this.data = data;
    this.PrivateCustomTypeCache = setup.PrivateCustomTypeCache;
    this.InboundController = setup.InboundController ?? Protocol.InboundController;
    this.offset = offset;
    this.CustomTypeId = (byte) 0;
    this.MetaData = new RequestMetaData();
    this.ParamMetaData = (ParameterMetaData) null;
    this.CollectSubTypesMetaData = false;
    this.ParameterMaxElementsCount = int.MaxValue;
    this.ParameterMaxSize = int.MaxValue;
    this.ErrorCode = (short) 0;
    this.ErrorMessage = string.Empty;
    }

    public byte CustomTypeId { get; set; }
    }
    }


    in constructor:
    this.ParameterMaxElementsCount = int.MaxValue;

    Are in PhotonPlugin has bug with this.ParameterMaxElementsCount = 10000; ???
  • PixelLord
    Options
    it is not documented feature in config.
    <Limits>
    <Inbound>
    <Properties>
    <MaxPropertiesSizePerRequest>10000/MaxPropertiesSizePerRequest> <!--by default-->
  • Tobias
    Options
    Yes, we are still working on the docs for Photon 5.
    A description of the limits is here.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @PixelLord,

    Thank you for choosing Photon!

    Not sure which exact limit in configuration is related to the warning log message in your original post.

    In any case, here is the list of the LoadBalancing application settings.
    And @Tobias already linked to the brief intro about the limits newly introduced in v5.

    Let us know if something is not clear, incorrect or not up to date.
  • chvetsov
    Options
    hi, @PixelLord
    although your question is already answered I would like to warn you about allowing big requests.
    this opens an attack vector when hackers sends big properties requests. they are broadcasted to everyone in room and clients get overwhelmed.

    Even in your case with 10K size that is already can be dangerous for some of your clients. Especially for those who on wireless connections

    best,
    ilya
  • PixelLord
    PixelLord
    edited July 2021
    Options
    JohnTube wrote: »

    I have seen this. This is has no default value about MaxPropertiesSizePerRequest configuration property, and makes it difficult to find.

  • PixelLord
    Options
    chvetsov wrote: »
    hi, @PixelLord
    although your question is already answered I would like to warn you about allowing big requests.
    this opens an attack vector when hackers sends big properties requests. they are broadcasted to everyone in room and clients get overwhelmed.

    Even in your case with 10K size that is already can be dangerous for some of your clients. Especially for those who on wireless connections

    best,
    ilya

    I understand possible attacks. We have only one specific property with large size (game map). And if detect attacks, we can filter this by plugin.
  • Tobias
    Options
    If the Map is generated (and not player designed), it's recommended to make the generation code deterministic and share a seed value instead (which is much much leaner).
    If you can apply deterministic generation to at least a part of the map, this may reduce the need to send large files.