I get this error spammed whenever I enter playmode or rebuild scripts. This is really problematic getting used to always having 1 error always in the log.
Yeah would definitely want some fix or temporary hack for this. If I edit something manually, it gets restored with this warning:
āThe package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered: ā
Iām using the 2020.3.22f1 on Windows 7 SP1 with the same kind of errors.
I used both the Addressables: 1.18.19 and 1.19.11, with the same set of errors:
SocketException: The Socket operation succeeded.
SocketException: An attempt was made to access a Socket in a way that is forbidden by its access permissions.
Both error code 0 and 10013 from SocketError Enum (System.Net.Sockets) | Microsoft Learn.
Its related to the Socket 10013 error caused by the call System.Net.NetworkInformation.Ping.
It seems that āpingā (ICMP) calls uses socket type SOCK_RAW, which have a different set of rules to be used (TCP/IP raw sockets - Win32 apps | Microsoft Learn). They are different from normal SOCK_STREAM/SOCK_DGRAM used in TCP/UDP connections. Those dont need admin privilege to bind.
I was able to reproduce the same kind of system errors using Python sockets
calling socket.socket(socket.AF_INET, socket.SOCK_RAW), giving the same error, but calling socket.socket(socket.AF_INET, socket.SOCK_STREAM) not.
The error is solved by calling it with elevated admin privileges, both on python or unity.
A simple temporary fix could be achieved with these steps:
Have a backup of your project;
Close the Unity Hub.exe (Dont forget the close in the system tray also);
Find the Unity Hub.exe and right click into properties;
Under Compatibility tab, check the box ārun this program as administratorā;
This will cause UAC screen to pop every time you open the unity hub, but once you open the unity editor through it, it will also inherit the same elevated privileges. Once the editor is opened this way, thereās no other SocketExceptions errors, at least for me.