Search Unity

Third Party Photon Error: received package with wrong challenge

Discussion in 'Multiplayer' started by iNoMore, Jul 1, 2014.

  1. iNoMore

    iNoMore

    Joined:
    Oct 13, 2013
    Posts:
    64
    Hello,

    Lately I see this error, and its not all the time, once in a while when I enter a game session, I see this error, and it does not effect the game at all (as I can see)

    What is it? and how can I prevent it?

    Full Error:

    Code (CSharp):
    1. Info: received package with wrong challenge. challenge in/out:1473325158!=714614999 Commands in it: 1
    2. UnityEngine.Debug:LogError(Object)
    3. PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Imported/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:153)
    4. NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Imported/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:934)
    5. ExitGames.Client.Photon.<>c__DisplayClass2:<EnqueueDebugReturn>b__0()
    6. ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    This log is an "info" and harmless in all but a few cases.
    This can happen when PUN switches servers (the client might decide to switch servers but gets another message from the current one). Unless your game is not working, this is OK.
    I don't know if I maybe set Info as log level by accident. If you change the level, this message is no longer created internally but all will stay OK.

    Sorry for the confusion.
     
  3. iNoMore

    iNoMore

    Joined:
    Oct 13, 2013
    Posts:
    64
    Thanks a lot for the answer!
    where can I change the info level?
     
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    PhotonNetwork.logLevel.
    Also check if some of the code sets PhotonNetwork.networkingPeer.DebugOut. For DebugOut (the low-level debug log level), DebugLevel.WARNING is best.
     
  5. iNoMore

    iNoMore

    Joined:
    Oct 13, 2013
    Posts:
    64
    thanks a lot :)
     
  6. QuantumCalzone

    QuantumCalzone

    Joined:
    Jan 9, 2010
    Posts:
    262
    I'm getting the error too but I can't find its source of origin in networkingPeer. Did something change since July?
     
  7. vadiml

    vadiml

    Joined:
    Aug 12, 2014
    Posts:
    32
    You are right. The message turned into error with one of last updates for some reason. I thinks you can still safely skip this message.
    We will review handling of this situation in PUN soon.
     
  8. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    I checked this and think logging this in log-level Error is a bit much maybe. It's not a breaking thing.
    I changed the log and the log-level (to Warning).

    If you get this a lot, something with your connection is likely corrupted.
    You can try to turn on CRC Check to make sure packages are not corrupted when you get them. Corrupt ones will be discarded nicely if you turn this on before you connect:
    PhotonNetwork.CrcCheckEnabled = true;

    If you get this no matter where you play (in whichever network), then we want to know that! Mail us: developer@exitgames.com and include the IP you get when you log PhotonNetwork.ServerAddress.
     
  9. iNoMore

    iNoMore

    Joined:
    Oct 13, 2013
    Posts:
    64
    I do get it no matter where I play (Work or home)
    I will test it tomorrow at work again and will let you know

    Thanks for still taking the time to check this
    and sorry it took me so long to replay :\
     
  10. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    Did anyone check out if PhotonNetwork.CrcCheckEnabled = true helps?
     
  11. iNoMore

    iNoMore

    Joined:
    Oct 13, 2013
    Posts:
    64
    I did, but then I lose the first packet (or packets?) which says to the master client that the player has finished bufffing
     
  12. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    We also mailed about that. By now, I think the issue is actually the message, not the case that you get a package with a (presumably just outdated) wrong challenge.
    I will change the logging of this back to Info log-level and it should be fine.
    Unless someone can show me logs where a lot of packages got thrown away and the client did not join/leave a game (and was not switching servers due to that).

    PUN 1.28 will contain a fix for this and come soon.
     
  13. miracletechteam1

    miracletechteam1

    Joined:
    Sep 18, 2019
    Posts:
    24
    Hi Tobiass, is there any clue how to solving it?

    In my case:
    sometimes PhotonNetwork.Time return 7.182398498E+10 or something like that.
    sometimes PlayerProperties with float value was like that too, but PhotonNetwork.Time was fine.
    Also pretty rare case, PhotonNetwork.Time was fine, but after some minutes > turn to 7.182398498E-143 (maybe due to high CPU usage?)

    In 1 room, only some client like this, but others not.
    I've tried disconnect this corrupted player > then reconnect > but still happens :' )
    then i tried to disconnect > use another account > join another room > still happens
    then play with AI (this makes the photon to PhotonNetwork.OfflineMode = true) > create room > then after 5 mins, load other scene > PhotonNetwork.OfflineMode = false > join random room > sometimes no more corrupt (fixed itself)

    But the only 100% working solution is: Re-open the game :)
    I have set "PhotonNetwork.CrcCheckEnabled = true" on first game start (not logged in yet)
     

    Attached Files:

    Last edited: Feb 2, 2021
  14. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    First thing, I would update PUN. That version is quite old and should be replaced.
    Then, test again and see if the problem remains. Let us know and we look into details.
     
  15. miracletechteam1

    miracletechteam1

    Joined:
    Sep 18, 2019
    Posts:
    24
    Newer version (v2.26.1)
    makes my games get easily disconnected, so i've rollback to version 2.16 :' D

    I will try v2.23
    and will let you know if it happens again :3

    Is there any link to get Old PUN Releases?

    Thank you.
     
    Last edited: Jan 28, 2021
  16. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    No, we don't provide old versions. We're happy to fix whatever breaks using newer versions.
    You could (e.g.) capture the traffic of both versions with Wireshark. Send both pcap files to us clearly explaining which one is the old variant and which the new one. Mail us: developer@photonengine.com
     
    miracletechteam1 likes this.