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

Cannot read property 'indexOf' of undefined

      How frequently does the bug occur?

      All the time

      Description

      We were using realm-websdk in our electron app but that was producing some issue in production mode (crashing app due to native issue).
      So we are trying to replace web-sdk with NodeJS-SDK and it's giving error after installation.

      As we are installing package in existing app so we cannot change electron and nodejs version yet. So we are using fixed versions for electron and node for now.

      Stacktrace & log output

      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 TypeError: Cannot read property 'indexOf' of undefined
          at Function.getFileName (webpack-internal:///…ngs/bindings.js:178)
          at bindings (webpack-internal:///…ings/bindings.js:82)
          at eval (webpack-internal:///…alm/lib/index.js:26)
          at Object../node_modules/realm/lib/index.js (main-bundle.js:90022)
          at __webpack_require__ (main-bundle.js:790)
          at fn (main-bundle.js:101)
          at Module.eval (webpack-internal:///…p/database/db.js:36)
          at eval (webpack-internal:///…/database/db.js:819)
          at Module../app/database/db.js (main-bundle.js:1913)
          at __webpack_require__ (main-bundle.js:790)
          at fn (main-bundle.js:101)
          at Module.eval (webpack-internal:///…b/LicenseUtils.js:5)
          at eval (webpack-internal:///…LicenseUtils.js:124)
          at Module../app/lib/LicenseUtils.js (main-bundle.js:2272)
          at __webpack_require__ (main-bundle.js:790)
          at fn (main-bundle.js:101)
      

      Can you reproduce the bug?

      Yes, always

      Reproduction Steps

      • npm i realm
      • start electron app
      • app will crash with error (Cannot read property 'indexOf' of undefined)

      Version

      v11.0.0

      What SDK flavour are you using?

      Atlas App Services (auth, functions, etc.)

      Are you using encryption?

      No, not using encryption

      Platform OS and version(s)

      MacOs M1 Chip

      Build environment

      ELECTRON: 12.3
      REACTJS: 17.0.2
      NodeJS: 14.17.0

      Cocoapods version

      1.11.2

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

              Created:
              Updated: