MetaMask / MetaMask/metamask-mobile

RuntimeException: Error calling RCTDeviceEventEmitter.emit

Open
#9,841 1 comment 0 reactions 0 assignees View on GitHub
area-sentry regression-prod-7.23.0 team-mobile-platform
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.