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

iOS - Can't find variable: globalThis

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Description

      Using 10.20.0-alpha.2 (but without actually using Hermes on iOS), reported the above crash for a user right on app startup.

      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
      ReferenceError
      Can't find variable: globalThis
      
          node_modules/realm-network-transport/dist/bundle.react-native.es.js:91:43 
          node_modules/metro-runtime/src/polyfills/require.js:340:6 loadModuleImplementation
          node_modules/realm/lib/extensions.js:60:45 exports
          node_modules/realm/lib/react-native.js:45:24 
          node_modules/metro-runtime/src/polyfills/require.js:340:6 loadModuleImplementation
          src/db/index.js:8 
          node_modules/metro-runtime/src/polyfills/require.js:340:6 loadModuleImplementation
          src/App.js:31 
          node_modules/metro-runtime/src/polyfills/require.js:340:6 loadModuleImplementation
          node_modules/metro-runtime/src/polyfills/require.js:200:45 guardedLoadModule
          index.js:86:29 
          node_modules/regenerator-runtime/runtime.js:63:44 tryCatch
          node_modules/regenerator-runtime/runtime.js:294:30 
          node_modules/regenerator-runtime/runtime.js:63:44 tryCatch
          node_modules/regenerator-runtime/runtime.js:155:28 invoke
          node_modules/regenerator-runtime/runtime.js:165:19 
          node_modules/promise/setimmediate/core.js:37:14 tryCallOne
          node_modules/promise/setimmediate/core.js:123:25 
          node_modules/react-native/Libraries/Core/Timers/JSTimers.js:248:17 
          node_modules/react-native/Libraries/Core/Timers/JSTimers.js:112:6 _callTimer
          node_modules/react-native/Libraries/Core/Timers/JSTimers.js:166:15 _callReactNativeMicrotasksPass
          node_modules/react-native/Libraries/Core/Timers/JSTimers.js:418:11 callReactNativeMicrotasks
          node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:393:11 value
          node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:11 
          node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:370:8 value
          node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:17 value
          [native code] value
          [native code] value
      

      ```

      Can you reproduce a bug?

      Not yet

      Reproduction Steps

      Regular offline (non sync) usage.

      Version

      10.20.0-alpha.2

      What SDK flavour are you using?

      Local Database only

      Are you using encryption?

      No response

      Platform OS and version(s)

      iOS 12.1.1 (iPad Mini 3)

            Assignee:
            tom.duncalf@mongodb.com Tom Duncalf (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: