1.0.0-exp.8: Editor 2022.2.0b8 android build crashes due to Unity.Networking.Transport error

After building with the Default build pipeline (not the platform build pipeline for 0.51) for Android, I get a crash right at startup.

Now I know there are multiple issues with building dots projects currently (after each build editor crashes, selecting faster (smaller) build, etc.) but I did manage to get a linux (server) build working, while the android build does not.

I assume it is netcode related due to the reference to Unity.Networking.Transport errors I receive.

Is this a known issue with the current editor version (2022.2.0b8) or did I miss a specific config needed to make a netcode projects work on android?

Any help would be appreciated.

(Error below)

2022/10/05 02:32:17.516 26071 26095 Error Unity NotImplementedException: The method or operation is not implemented.
2022/10/05 02:32:17.516 26071 26095 Error Unity   at Unity.Networking.Transport.BaselibNetworkInterface.Initialize (Unity.Networking.Transport.NetworkSettings& settings, System.Int32& packetPadding) [0x00000] in <00000000000000000000000000000000>:0
2022/10/05 02:32:17.516 26071 26095 Error Unity   at Unity.Networking.Transport.NetworkInterfaceLayer`1[N].Initialize (Unity.Networking.Transport.NetworkSettings& settings, Unity.Networking.Transport.ConnectionList& connectionList, System.Int32& packetPadding) [0x00000] in <00000000000000000000000000000000>:0
2022/10/05 02:32:17.516 26071 26095 Error Unity   at Unity.Networking.Transport.NetworkStack.AddLayer[T] (T& layer, Unity.Networking.Transport.NetworkSettings& settings) [0x00000] in <00000000000000000000000000000000>:0
2022/10/05 02:32:17.516 26071 26095 Error Unity   at Unity.Networking.Transport.NetworkStack.AddLayer[T] (T layer, Unity.Networking.Transport.NetworkSettings& settings) [0x00000] in <00000000000000000000000000000000>:0
2022/10/05 02:32:17.516 26071 26095 Error Unity   at Unity.Networking.Transport.NetworkStack.CreateForSettings[N] (N& networkInterface, Unity.Networking.Transport.NetworkSettings& networkSett
1 Like

We will investigate on this. Please file a proper case of it. Looks like a problem we want to proper track

1 Like

Same problem here when building for Oculus Quest 2 (which runs on Android). But I get no error message. And I don’t have Netcode or Transport installed in my project.

I have reported it through the bug reporting system (case number: IN-18768).

I also have a minimal repo (it crashes without even creating a custom client-server bootstrap)

https://github.com/Occuros/DotsNetcodeBuildErrorSample

Hopefully, that can be investigated soon, really looking forward to testing out 1.0 on a real device.

3 Likes

Unity 2022.2.0b11 has fixed the player crashing when containing a subscene in the scene. When having set the compiler to IL2CPP. I don’t know however if the Unity Networking error has been fixed, but maybe it’s related.

For this specific issue I already posted a fix you can apply in another thread:

You need to replace in the DefaultDriverBuilder.RegisterClientDriver the call to new BaselibNetworkInterface with new UDPNetworkInterface.

        public static void RegisterClientDriver(World world, ref NetworkDriverStore driverStore, NetDebug netDebug, NetworkSettings settings)
        {
            Assert.IsTrue(ClientServerBootstrap.RequestedPlayType != ClientServerBootstrap.PlayType.Server);
            Assert.IsTrue(world.IsClient());
#if !UNITY_CLIENT
            if (UseSocketDriver(netDebug))
            {
                netDebug.DebugLog("Create client default socket network interface driver");
                var driverInstance = DefaultDriverBuilder.CreateClientNetworkDriver(new UDPNetworkInterface(), settings);
                driverStore.RegisterDriver(TransportType.Socket, driverInstance);
            }
            else
            {
                netDebug.DebugLog("Create client default IPC network interface driver");
                var driverInstance = DefaultDriverBuilder.CreateClientNetworkDriver(new IPCNetworkInterface(), settings);
                driverStore.RegisterDriver(TransportType.IPC, driverInstance);
            }
#else
            netDebug.DebugLog("Create client default socket network interface driver");
            var driverInstance = DefaultDriverBuilder.CreateClientNetworkDriver(new UDPNetworkInterface(), settings);
            driverStore.RegisterDriver(TransportType.Socket, driverInstance);
#endif
        }
1 Like

Thank you @CMarastoni with these changes the build doesn’t crash anymore (with 2022.11b editor version).

Not sure if I should mark this thread as resolved, as it still requires to modify the netcode package, or wait until the package is updated with the fix?

@Occuros please mark as resolved.