Error running Roonbridge on CoreElec

Roon Core Machine

Khadas VIM 4, Amlogic A311D2 SBC, 8Gb RAM running CoreELEC 20.0-Nexus_nightly_20221022.

Networking Gear & Setup Details

Not relevant yet.

Connected Audio Devices

HDMI

Number of Tracks in Library

Not relevant yet.

Description of Issue

Having done an installation following the guidelines at [Turning An Android Box (CorElec) Into A Roon Endpoint | by Malindra Perera | Medium](https://Turning a CoreElec Box Into A Roon Endpoint).

Doing the ./check.sh test succesfully, but at startup I get following error/

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Base.Utils' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /storage/RoonBridge/RoonMono/lib/../lib/libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
  at Interop+Sys..cctor () [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.IO.File.Exists (System.String path) [0x00043] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.TryLoadTzFile (System.String tzFilePath, System.Byte[]& rawData, System.String& id) [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.TryGetLocalTzFile (System.Byte[]& rawData, System.String& id) [0x0000f] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.GetLocalTimeZoneFromTzFile () [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.GetLocalTimeZone (System.TimeZoneInfo+CachedData cachedData) [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo+CachedData.CreateLocal () [0x00018] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo+CachedData.get_Local () [0x0000c] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.get_Local () [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.DateTime.get_Now () [0x00008] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at Base.Utils..cctor () [0x00000] in <fac7667afb4c4476b0d0a445ba7a05bb>:0 
   --- End of inner exception stack trace ---
  at Sooloos.App.Main (System.String[] argv) [0x00000] in <cae42061ef074c03a60398b317b75a07>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Base.Utils' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /storage/RoonBridge/RoonMono/lib/../lib/libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
  at Interop+Sys..cctor () [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.IO.File.Exists (System.String path) [0x00043] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.TryLoadTzFile (System.String tzFilePath, System.Byte[]& rawData, System.String& id) [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.TryGetLocalTzFile (System.Byte[]& rawData, System.String& id) [0x0000f] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.GetLocalTimeZoneFromTzFile () [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.GetLocalTimeZone (System.TimeZoneInfo+CachedData cachedData) [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo+CachedData.CreateLocal () [0x00018] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo+CachedData.get_Local () [0x0000c] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.get_Local () [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) [0x00000] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at System.DateTime.get_Now () [0x00008] in <6a2b61f9dcec4fcea2ab16dbc47496b7>:0 
  at Base.Utils..cctor () [0x00000] in <fac7667afb4c4476b0d0a445ba7a05bb>:0 
   --- End of inner exception stack trace ---
  at Sooloos.App.Main (System.String[] argv) [0x00000] in <cae42061ef074c03a60398b317b75a07>:0 
./start.sh: line 37: kill: (1454) - No such process

Any possibility to remedy this?

I’ve moved your post to the #tinkering category of the forum, since the CoreElec box is not officially supported by Roon Labs.

The Tinkering category has many tinkering enthusiasts, and it is likely that you will get a response here.

I don’t have a remedy, but I have the same issue and can share some thoughts.

In my case I am running a Mecool M8S Pro L (S912 chip), which limits me to using Coreelec 9.2.8 (the end of the line for that chip - you have a different chip than me but it is worth checking which versions of Coreelec work with your hip).

When I look at the end of that error, the unhandled exception happens when the System.DateTime.get_Now method gets called. That might be a clue. I have tried making sure my date, time, timezone, and time server information is set on Coreelec, but even after rebooting I still have the same problem when I run the start.sh script.

Feels like we’re so close to getting this to work (at least according to Melinda’s instructions that we are both following). But it might be a deep rabbit hole too…

Eureka!

Fixed it!!

What seems to be happening is that RoonBridge is looking for the DLL located at /Storage/RoonBridge/RoonMono/lib/libmono-native.so but cannot find it. Turns out, libmono-native.so is just an alias that points to the actual file “lib mono-native.so.0.0.0”. For some reason RoonBridge is choking on this alias, so I renamed it from “libmono-native.so” to “libmono-native.soBAD” and then named “libmono-native.so.0.0.0” to “libmono-native.so”. Then I ran ./start.sh again from the RoonBridge directory and it worked just like in Melindra’s description!

1 Like

Great. Many thanks for chasing this to the end. Will proceed accordingly. Thanks again.