Search Unity

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

Bug "Server can't bind" error on Meta Quest 3 using Unity Transport & Netcode

Discussion in 'Multiplayer' started by MiPa258, Oct 22, 2023.

  1. MiPa258

    MiPa258

    Joined:
    Dec 14, 2022
    Posts:
    3
    Issue Description:

    Environment:

    • Unity Versions: 2022.3.5, 2022.3.11
    • Device: Meta Quest 3
    • Networking Package: "com.unity.netcode.gameobjects": "1.5.2"
    Problem: When deploying a project to my Meta Quest 3 device, I encounter a "Server can't bind" error, preventing me from establishing a networked session.

    Steps to Reproduce:

    1. Create a new Unity project with Unity versions 2022.3.5 or 2022.3.11.
    2. Install "com.unity.netcode.gameobjects" package version 1.5.2.
    3. Build and deploy to Meta Quest 3.
    4. Observe the "Server can't bind" error upon attempting to start/host a server.
    Expected Behavior: The server should bind successfully, allowing for the creation of a networked session.

    Actual Behavior: The application fails to bind the server, resulting in a "Server can't bind" error message.
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    416
    Failure to bind indicates either that you're trying to bind to a non-local IP address, or that the application lacks network permissions. We've had reports of the latter happening Quest devices. I'd suggest making sure that the application's Android manifest has the
    INTERNET
    permission.
     
  3. MiPa258

    MiPa258

    Joined:
    Dec 14, 2022
    Posts:
    3
    Thanks for the fast response. It appears the issue was related to the INTERNET permission for me as well.
    I checked my Android manifest, and after adding the following:

    <uses-permission android:name="android.permission.INTERNET"/>
    the error disappeared.

    However, I encountered another problem: it recurs whenever I restart Unity, since the check in the meta quest support Force remove internet appears again each time.


    upload_2023-10-23_23-59-17.png
     
  4. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    416
    This might be a question better asked on the VR section of the forum. I personally don't know much about our support for the Meta Quest and you'd probably get more insights over there.