Mac b16: DllNotFoundException: libMonoPosixHelper.dylib

Upgraded to b16 on Mac and getting a DLL not found exception on libMonoPosixHelper.

DllNotFoundException: libMonoPosixHelper.dylib
System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip)
(wrapper remoting-invoke-with-check) System.IO.Compression.DeflateStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode,bool,bool)
System.IO.Compression.GZipStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen)
System.IO.Compression.GZipStream..ctor (System.IO.Stream compressedStream, CompressionMode mode)
(wrapper remoting-invoke-with-check) System.IO.Compression.GZipStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode)
Chunk.ParseData (System.Byte[] zippedData) (at Assets/Scripts/models/Chunk.cs:201)

Error traces to the GZipStream in the below snippet…

       using (var msi = new MemoryStream(zippedData)) {
            using (var mso = new MemoryStream()) {
                using (var gs = new GZipStream(msi, CompressionMode.Decompress)) {

Appreciate any advice…

Confirmed it’s present on the file system.

/Applications/Unity/Unity.app/Contents$ find .  | grep -i posixhelper

./Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
./il2cpp/libil2cpp/externals/MonoPosixHelper.cpp
./il2cpp/libil2cpp/externals/MonoPosixHelper.h
./il2cpp/libil2cpp/os/Posix/PosixHelpers.cpp
./il2cpp/libil2cpp/os/Posix/PosixHelpers.h
./Mono/lib/libMonoPosixHelper.dylib
./MonoBleedingEdge/lib/libMonoPosixHelper.dylib
./PlaybackEngines/MacStandaloneSupport/Variations/macosx32_development_mono/UnityPlayer.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
./PlaybackEngines/MacStandaloneSupport/Variations/macosx32_nondevelopment_mono/UnityPlayer.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
./PlaybackEngines/MacStandaloneSupport/Variations/macosx64_development_mono/UnityPlayer.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
./PlaybackEngines/MacStandaloneSupport/Variations/macosx64_nondevelopment_mono/UnityPlayer.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
./PlaybackEngines/MacStandaloneSupport/Variations/universal_development_mono/UnityPlayer.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
./PlaybackEngines/MacStandaloneSupport/Variations/universal_nondevelopment_mono/UnityPlayer.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib

Could we get a bug report # please?

Is this a bug in 5.4beta? I ran into this trying to read from the serial port on a mac.

Filed a bug report: 810964

Actually, I don’t think that this issue is related to that one on Unity answers. The libMonoPosixHelper.dylib file is shipped with the Unity installation as part of Mono. It is not a separate dylib as discussed in that answer.

This looks a lot like a known bug that found internally and corrected in Unity 5.5 (which is currently in closed alpha). to work around the issue until then, you could try using a third-party library for compression.

I wonder though, you mentioned that upgrading to b16 caused this issue. Did the same GZipStream code work in an earlier version of Unity? I thought that this was a long-standing problem, but I may be misunderstanding it.