- Home /
Unity Package Manager UI Error Socket IO Unity after updating from 2017.3 to 2018.1.0f2 Nodejs
So, I've updated to the latest stable release of unity and I am currently experiencing this error.
I am on Windows 10 with latest updates.
Same issue happened a while ago when I updated to 2018 but when it was on it's beta version.
The error is this:
C:/Users/georg/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.package-manager-ui@1.8.8/Editor/Sources/Services/Packages/Package.cs(27,60): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.LINQ.FirstOrDefault<UnityEditor.PackageManager.UI.PackageInfo>(this System.Collections.Generic.IEnumerable<UnityEditor.PackageManager.UI.PackageInfo>, System.Predicate<UnityEditor.PackageManager.UI.PackageInfo>)' and `System.Linq.Enumerable.FirstOrDefault<UnityEditor.PackageManager.UI.PackageInfo>(this System.Collections.Generic.IEnumerable<UnityEditor.PackageManager.UI.PackageInfo>, System.Func<UnityEditor.PackageManager.UI.PackageInfo,bool>)'
A workaround is to delete the unity package manager ui folder from your cache at C:\Users{Your Username Here}\AppData\Local\Unity\cache\packages\packages.unity.com
Any ideas?
Answer by darvath · Jun 12, 2018 at 05:53 PM
Since I couldn't find anything on the internet, I found out that this is a very specific issue.
TL;DR: Socket IO (socket.io) is incompatible with current unity version (2018.1+), and might also create conflicts with other code too, such as Post Processing Stack disregarding the version of unity
I was using Socket IO Unity [https://github.com/floatinghotpot/socket.io-unity][1] which is also available in the asset store for sale. DO NOT BUT IT UNTIL IT GETS UPDATED
It seems that the developers of the libraries required for socket.io have declared variables etc at a system level without using proper namespaces thus resulting in code conflicts with the package manager of unity and with other libraries also.
For example the Post Processing Stack conflicts with the Socket IO Unity library.
The error is obviously resolved after removing the socket io libraries.
The socket io project is left untouched for at least 4 months now, and the source code for SocketIoClientDotNet.dll and the other 2 does not seem to be available, so a socket io project cannot be completed as of now in unity.
As I mentioned in my original post you can get away with removing the folder of the package manager every time you start unity, but this becomes annoying pretty fast.
PS: The socket io unity libraries are developed by a third party and have no actual connection with the socket.io project
[1]: https://github.com/floatinghotpot/socket.io-unity