realm-js: iOS - Can't find variable: globalThis
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
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)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (12 by maintainers)
Commits related to this issue
- Update CHANGELOG.md — committed to realm/realm-js by kraenhansen 2 years ago
Hey @cristianoccazinsp, I think that’s a coincidence, from what I can see this would just 100% not work on iOS 11 (which I tested on) and from the sounds of things 12. I’ve got a fix in review, so hopefully we can get that into the next Hermes branch release (which is currently blocked on some test issues but we are working to resolve those this week)
I was able to reproduce this on iOS 11, so will investigate further tomorrow.
@cristianoccazinsp I believe this was released with
10.20.0-beta.5and10.16.0