OTA update crashes old installs after adding a native module
ExpoConfirmed fix
runtimeVersion policy appVersion
Error
Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.Cause
The JS references a native module (here WebRTC) that is not compiled into the installed binary. Either the update reached an older binary, or you are testing native code over Metro on an old dev client.
Fix
Bump the app version when adding native code so the runtimeVersion changes and updates cannot reach older binaries. Test native changes on a fresh dev build (eas build --profile development or npx expo run:ios), not Fast Refresh.
More Expo errors
- Dev client red screen: No script URL provided (launcher never appears)No script URL provided
- Bundle fails with Invalid expression encountered after supabase-js updateInvalid expression encountered
- After upgrading to SDK 57, expo-font / expo-image / expo-asset config is missing
- SDK upgrade: export dies with SyntaxError after expo install --fixSyntaxError: ... Unable to determine event arguments for "onModeChange"
- expo-doctor wants TypeScript 6 but tsc reports hundreds of errors