I have a Xamarin Forms app built with App Center and pushed to the Play Store. For at least a week the pre-launch report has failed on a specific device (Huawei P8 Lite - Android 5.0) with the following error:
FATAL EXCEPTION: main
Process: net.gameswithgravitas.tictactoe, PID: 19258
android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'AndroidTimeZones' threw an exception. ---> System.DllNotFoundException: libmono-native.so
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <500cec83919e4287bff01b35e8a7fe03>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <500cec83919e4287bff01b35e8a7fe03>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <500cec83919e4287bff01b35e8a7fe03>:0
at System.IO.File.Exists (System.String path) [0x00043] in <500cec83919e4287bff01b35e8a7fe03>:0
at System.TimeZoneInfo+AndroidTimeZones.GetDefaultTimeZoneDB () [0x0000a] in <500cec83919e4287bff01b35e8a7fe03>:0
at System.TimeZoneInfo+AndroidTimeZones..cctor () [0x00000] in <500cec83919e4287bff01b35e8a7fe03>:0
--- End of inner exception stack trace ---
A search on the internet for System.DllNotFoundException: libmono-native.so
suggests it's normally caused by a version mismatch between the app and the shared Mono runtime on the device. In this case, it's a release build that is not using the shared runtime, and also works fine on other devices.
Has any one else had a similar issue with pre-launch reports? Or has any other idea?
It seems there could be some left over Mono shared runtime on the specific device Firebase uses (I have no idea what their test lab does underneath), or something wrong with Xamarin on Huawei P8 Lites in general (but that seems unlikely).