Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-1046

UnsatisfiedLinkError librealmc.so in CI

      How frequently does the bug occur?

      Always

      Description

      After upgrading from 1.12.0 to 1.14.0 unit tests cannot run in our CI environment (LINUX on x86_64) but they do pass running locally on a Mac M1.

      Wondering what might have changed and possible direction for finding solutions.

      Stacktrace & log output

      Get this which may be related

      OpenJDK 64-Bit Server VM warning: You have loaded library /home/executor/.cache/io.realm.kotlin/1.14.0/librealmc.so which might have disabled stack guard. The VM will try to fix the stack guard now.
      It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
      

      Stack trace 1:

        java.lang.ExceptionInInitializerError
              at io.realm.kotlin.internal.interop.RealmInterop.realm_set_log_callback(RealmInterop.kt:1279)
              at io.realm.kotlin.log.RealmLog.<clinit>(RealmLog.kt:49)
        Caused by: java.lang.RuntimeException: Couldn't load Realm native libraries
              at io.realm.kotlin.internal.interop.realmc.<clinit>(realmc.java:28)
              ... 124 more
        Caused by: java.lang.reflect.InvocationTargetException
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              at io.realm.kotlin.internal.interop.realmc.<clinit>(realmc.java:26)
              ... 124 more
        Caused by: java.lang.NullPointerException
              at io.realm.kotlin.jvm.SoLoader.unpackAndInstall(SoLoader.kt:89)
              at io.realm.kotlin.jvm.SoLoader.load(SoLoader.kt:65)
              at io.realm.kotlin.jvm.SoLoader.load(SoLoader.kt:50)
              ... 129 more
        Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.realm.kotlin.log.RealmLog
        Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.realm.kotlin.log.RealmLog
        Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "SDK 24 Main Thread @coroutine#15"]
      

      Stack trace 2:

      java.lang.ExceptionInInitializerError
        Caused by: java.lang.RuntimeException: Couldn't load Realm native libraries
        Caused by: java.lang.reflect.InvocationTargetException
        Caused by: java.lang.UnsatisfiedLinkError: /home/executor/.cache/io.realm.kotlin/1.14.0/librealmc.so: /home/executor/.cache/io.realm.kotlin/1.14.0/librealmc.so: file too short
      

      Can you reproduce the bug?

      Always

      Reproduction Steps

      No response

      Version

      1.14.0

      What Atlas App Services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      Android

      Build environment

      Android Studio version: Android Studio Iguana | 2023.2.1
      Android Build Tools version: 8.2.2
      Gradle version: 8.6

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: