Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2611

Realm 12.x + Electron package fails to load on macOS Catalina (10.15.x)

      How frequently does the bug occur?

      Always

      Description

      Hello, I recently experienced a crash in an app using realm 12.x and after checking the issue, I found that the realm module is not loading properly on macOS Catalina.

      This issue has been occurring since realm 12.x and is working fine in 11.x.x.

      After a successful build on macOS Sonoma and creating an executable package, I get the same error when I install and run that package on macOS Catalina. In other words, it doesn't seem to matter what OS you're building.

      Also on macOS Sonoma and nearby versions, the issue does not occur, but on Catalina (10.15.x), an error occurs in the console window as shown below, and the Electron app may not load properly:

      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
      Uncaught Error: dlopen(/Users/test/Documents/sources/simple-example-realm-electron/node_modules/realm/generated/ts/realm.node, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
        Referenced from: /Users/test/Documents/sources/simple-example-realm-electron/node_modules/realm/generated/ts/realm.node (which was built for Mac OS X 12.6)
        Expected in: /usr/lib/libc++.1.dylib
      
          at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2131)
          at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18)
          at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2131)
          at Module.load (node:internal/modules/cjs/loader:1126:32)
          at node:internal/modules/cjs/loader:967:12
          at Function.<anonymous> (node:electron/js2c/asar_bundle:2:13327)
          at Function._load (node:electron/js2c/renderer_init:2:4757)
          at Module.require (node:internal/modules/cjs/loader:1150:19)
          at require (node:internal/modules/cjs/helpers:121:18)
          at Object.<anonymous> (native-node.mjs:22:22)
      

      Stacktrace & log output

      No response

      Can you reproduce the bug?

      Always

      Reproduction Steps

      1. Clone this repository:
      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
      https://github.com/jooy2/simple-example-realm-electron.git
      
      1. run command
      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
      $ cd simple-example-realm-electron
      $ npm i
      $ npm run start
      
      1. Check the issues shown in the developer console.

      Version

      12.2.1

      What services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      macOS Catalina 10.15.7

      Build environment

      • NodeJS 16.16.0 (or later)
      • Electron 27.0.2
      • macOS Catalina 10.15.7 or macOS Sonoma 14.0
      • Xcode 12.4 or Xcode 15.0.1

      Cocoapods version

      No response

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

              Created:
              Updated:
              Resolved: