Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-993

Missing realm-wrappers.dll

      What happened?

      I don't even know if I should post it here, but someone on stack overflow told me to do so (and also noone on mongodb forum is responding for 19 days).

      I'm making a plugin for SCP Secret Laboratory server. I used before MongoDB driver as a connector to my DB, but I had some issues with it and someone told me to try realm. And I have problem with missing realm-wrappers file.
      Excatly, I have MongoDB server on my VPS, and whenever the plugin tries to connect to that, it throws error.
      I tried also compiling realm-wrappers on myself on linux (but due to .so file, it wasn't loading) and on windows, but it was throwing same error as I wrote below named as "second error".

      Also, here's a plugin loader which one I'm using --> plugin loader link

      Repro steps

      1. put plugin into Plugins folder.
      2. put dependencies to dependencies folder.
      3. restart server.
        4.1. boom, error on loading dependencies (with realm-wrappers.dll)
        4.2 boom, error on event (w/o realm-wrappers.dll)

      Version

      10.21.1.0

      What Atlas Services are you using?

      Local Database only

      What type of application is this?

      Unity

      Client OS and version

      Linux, I think it's debian 11 with pterodactyl panel.

      Code snippets

      `public async Task MongoDBConnect() {
      var app = App.Create("my-realm");

      var user = await app.LogInAsync(Credentials.Anonymous());
      
      var mongoClient = user.GetMongoClient("mongodb://user:password@ip:port/&authSource=admin&connectTimeoutMS=1000&socketTimeoutMS=1000&serverSelectionTimeoutMS=1000");
          var database = mongoClient.GetDatabase("db");
          collection = (IMongoCollection<PlayerModel>)database.GetCollection<PlayerModel>("playerdatas");
      

      }`

      Stacktrace of the exception/crash you're getting

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      The code is throwing this error on first line:
      
      System.TypeInitializationException: The type initializer for 'Realms.Sync.AppHandle' threw an exception. ---> System.DllNotFoundException: realm-wrappers
          at (wrapper managed-to-native) Realms.SynchronizationContextScheduler.install_scheduler_callbacks(Realms.SynchronizationContextScheduler/get_context,Realms.SynchronizationContextScheduler/post_on_context,Realms.SynchronizationContextScheduler/release_context,Realms.SynchronizationContextScheduler/is_on_context)
      
      and its second error after I added realm-wrappers.dll as a dependency which was generated by Visual Studio.
      
      realm-wrappers.dll[0m" caused an exception.
          System.BadImageFormatException: 0x0x7f0195798020
          File name: 'In memory assembly'
              at (wrapper managed-to-native) System.AppDomain.LoadAssemblyRaw(System.AppDomain,byte[],byte[],System.Security.Policy.Evidence,bool)
              at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence, System.Boolean refonly) [0x0000e] in <05089c1b6989455fb1452c627044bac4>:0 
              at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0 
              at (wrapper remoting-invoke-with-check) System.AppDomain.Load(byte[],byte[],System.Security.Policy.Evidence)
              at System.AppDomain.Load (System.Byte[] rawAssembly) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0 
              at (wrapper remoting-invoke-with-check) System.AppDomain.Load(byte[])
              at System.Reflection.Assembly.Load (System.Byte[] rawAssembly) [0x00005] in <05089c1b6989455fb1452c627044bac4>:0 
              at PluginAPI.Loader.AssemblyLoader.TryGetAssembly (System.String path, System.Reflection.Assemblyassembly) [0x00007] in <daac6f5711f648cd8233e51784f7642b>:0
      

      Relevant log output

      No response

            Assignee:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: