MetaMask / MetaMask/metamask-mobile
RuntimeException: Error calling RCTDeviceEventEmitter.emit
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
Sentry Issue: [METAMASK-MOBILE-21QP](https://metamask.sentry.io/issues/4335595610/?referrer=github_integration)
```
OutOfMemoryError: std::bad_alloc
at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:264)
...
(2 additional frame(s) were not displayed)
RuntimeException: Error calling RCTDeviceEventEmitter.emit
at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:264)
...
(2 additional frame(s) were not displayed)
```
Contributor guide
Research direction
Start with the linked Sentry report and the stack trace around RCTDeviceEventEmitter.emit, NativeRunnable, and the Android React Native message queue. Trace the event path that leads to std::bad_alloc and determine the conditions that trigger it. Done means the crash is prevented and the reported failure is validated against the Sentry scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100