MetaMask / MetaMask/metamask-mobile
TypeError: s.BackHandler.removeEventListener is not a function. (In 's.BackHandler.removeEventListener('hard...
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
Sentry Issue: [METAMASK-MOBILE-2WMR](https://metamask.sentry.io/issues/5971572496/?referrer=github_integration)
```
TypeError: s.BackHandler.removeEventListener is not a function. (In 's.BackHandler.removeEventListener('hardwareBackPress',this.onBackButtonPress)', 's.BackHandler.removeEventListener' is undefined)
at .value (node_modules/react-native-modal/dist/modal.js:459:21)
at commitDeletionEffectsOnFiber (node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6117:28)
at recursivelyTraverseDeletionEffects (node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6007:5)
at commitDeletionEffectsOnFiber (node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6121:7)
at recursivelyTraverseDeletionEffects (node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6007:5)
...
(45 additional frame(s) were not displayed)
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Sentry issue and the stack trace entry in node_modules/react-native-modal/dist/modal.js:459, then inspect how React Native handles BackHandler during component deletion. Reproduce the reported failure and determine the relevant compatibility behavior; done means the modal cleanup no longer raises the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100