"Server failed to bind" for host on Meta Quest 3 | Unity Transport, Netcode

Issue Description:

Error:

Server failed to bind. This is usually caused by another process being bound to the same port. Unity.Netcode.Transports.UTP.UnityTransport:ServerBindAndListen(NetworkEndPoint)
Unity.Netcode.Transports.UTP.UnityTransport:StartServer()
Unity.Netcode.NetworkManger:StartHost()
UnityEngine.XR.Interaction.Toolkit.UI.XRUIInputModuleDoProcess()

[Netcode] Host is shutting down due to network transport start failure of UIUnityTransport!
Unity.Netcode.NetworkConnectionManager:TransportFailure EventHandler(Boolean)
Unity.Netcode.NetworkManger:StartHosrt()
UnityEngine.XR.Interaction.Toolkit.UI.XRUIInputModuleDoProcess()

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:

  • Create a new Unity project with Unity versions 2022.3.5 or 2022.3.11.
  • Install "com.unity.netcode.gameobjects" package version 1.5.2.
  • Setup openxr

  • Setup netcode for gameobjects

  • Build and deploy to Meta Quest 3.

  • 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.

Already answered on your other thread, but this is likely due to the application lacking the INTERNET permission in its Android manifest.

Hi Simon, I added the internet permission at my android manifest (@ plugin/android/AndroidManifest.xml) and I set build to custom manifest.
which is basically this:

<?xml version="1.0" encoding="utf-8"?>
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools">



android:theme=" @ /UnityThemeSelector">







And still have this same issue :/

Ok, I found what was the problem:
At Project Settings > OpenXR > Meta quest support (click at the cog)
Uncheck the option "Force Remove Internet Permission"
9649136--1372670--upload_2024-2-17_14-19-14.png

1 Like