Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question [Wire]: Unity.Services.Wire.Internal.WebSocketInvalidStateException: WebSocket is not in open state.

Discussion in 'Lobby' started by orcunsari, May 13, 2023.

  1. orcunsari

    orcunsari

    Joined:
    Jul 21, 2016
    Posts:
    23
    I get this error whenever I exit playmode. What might cause this issue and how can I trace it?
     
  2. orcunsari

    orcunsari

    Joined:
    Jul 21, 2016
    Posts:
    23
  3. neviovalsa

    neviovalsa

    Joined:
    Jun 24, 2019
    Posts:
    33
    Not really an answer but I get the same error, and for me is because I try to call ` LobbyEvents.UnsubscribeAsync();` when I exit play mode.

    I'm assuming the wire socket simply shuts down before the rest of the app so you can't send web requests anymore.

    I couldn't find a way to check whether the socket is open from code so I guess I'll just keep this error for now.
    It's ugly but it shouldn't cause any issues in production