MetaMask / MetaMask/metamask-mobile
[DETOX] Investigate Detox incompatibility with Android and `@web3modal/ethers5` module
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
### What is this about?
After adding Wallet Connect support in the test dapp ([PR #284](https://github.com/MetaMask/test-dapp/pull/284)), we saw that Detox is no longer working whenever we are in an Android environment.
After invesigating, @vinistevam saw that the problem relies on importing the ethers package `@web3modal/ethers5`. Just using the import in the test-dapp, breaks the test environment when we navigate to the test dapp.
iOS works fine.
A workaround fix has been to use the import conditionally, depending on whether we are on an Android OS ([PR #343](https://github.com/MetaMask/test-dapp/pull/343)), however we should investigate the root cause of this incompatibility.
### Scenario
_No response_
### Design
_No response_
### Technical Details
_No response_
### Threat Modeling Framework
_No response_
### Acceptance Criteria
_No response_
### Stakeholder review needed before the work gets merged
- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
### References
_No response_
Contributor guide
Research direction
Start by reproducing the test-dapp failure when importing @web3modal/ethers5 and navigating to the app on Android, then compare it with iOS behavior. Review PR #284 and the conditional-import workaround in PR #343. Done means the root cause is identified and Detox works on Android without that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- mobile, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100