Search Unity

host id {1} invoked wrong io operation and will be deleted - while app in the background

Discussion in 'Multiplayer' started by GamePantheon, Feb 10, 2018.

  1. GamePantheon

    GamePantheon

    Joined:
    Apr 13, 2015
    Posts:
    2
    Hello,

    When i send the app to background and wait a little bit (~60 seconds) it starts giving
    errors on UnityEngine.Networking,NetworkIdentity:UnetStaticUpdate() and it repeats last two message forever...

    We are using Unity2017.3 p3.
    Our test device is iPhone X iOS 11.2.1

    Any ideas?

    Thanks.
     
  2. GamePantheon

    GamePantheon

    Joined:
    Apr 13, 2015
    Posts:
    2
    Any ideas? Aren’t there any unity developers working on unet?
     
  3. martaaay

    martaaay

    Joined:
    Apr 13, 2009
    Posts:
    136
    I have this issue as well. It's not super reproducible, which makes this worse. If I stop host and start host again, things seem to work again. This happens to me even in offline mode.
     
  4. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    check logs please, it should point why. For ios most probably internet connection was lost and it consider as unrecoverable error... Anyway check you logs before this message happen for any other network errors.
     
  5. martaaay

    martaaay

    Joined:
    Apr 13, 2009
    Posts:
    136
    Ah ok thanks. I'll have another look. If this is the case - that it's unrecoverable in an offline mode - is there a way to recover? If online, I'd just close the connection, but in offline I'd prefer not to have to reload the scene.
     
  6. Tom_Norris

    Tom_Norris

    Joined:
    Oct 24, 2018
    Posts:
    1
    Also having this issue, it appears to happen the moment a certain amount of network traffic is sent while the app is backgrounded (in my app this takes less than two seconds) there are no errors sent prior to locking the screen, and when returning to the app the first error is "host id {1} invoked wrong io operation and will be deleted" followed immediately by "host id {1} out of bound or host has been already removed".

    At roughly the same time as the issue on the client, the server produces these errors

    Code (CSharp):
    1. Failed to send internal buffer channel:0 bytesToSend:8
    2. UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
    3.  
    4. Send Error: WrongConnection channel:0 bytesToSend:8
    5. UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
    6.  
    As another note, I reproduced this in Unity 5.6.7f1 on an iPhone 4, iPhone 5, and iPhone X