Detox: Detox timeout of 120000ms exceeded. at before all hook
Description
I know this issue is out there asked at several pages, but still I am unable to resolve it Detox timeout of 120000ms exceeded. at before all hook, I already asked for the same in stack-overflow here which after an initial comment was never responded back again.
Steps to Reproduce
Created a sample react-native project using expo create-react-native-app awesome
(which can be anything)
placed the latest expo.app in bin as my iOS config is:
“detox”: { “configurations”: { “ios.sim”: { “binaryPath”: “bin/Exponent.app”, “type”: “ios.simulator”, “name”: “iPhone 7” } }, “test-runner”: “mocha” },
running with the script
"e2e": "detox test --loglevel verbose --configuration ios.sim --debug-synchronization 1000"
my test.js has:
const { reloadApp } = require('detox-expo-helpers');
describe('Mobile Test', () => {
before(async () => {
await reloadApp();
});
it('should have welcome screen', async () => {
await waitFor(element(by.id('welcome'))).toBeVisible().withTimeout(1000);
await expect(element(by.id('welcome'))).toBeVisible();
});
Also, placed the testID in app.js (tried attaching the testID to both parent view and child text which did not help)
<View style={styles.container} testID='welcome'>
<Text >Open up App.js to start working on your app!</Text>
</View>
I am using the following environment libraries:
DevDependencies:
* "@babel/core": "^7.0.0-beta.54",
* "detox": "^8.0.0",
* "detox-expo-helpers": "^0.2.0",
* "jest-expo": "~27.0.0",
* "mocha": "^5.2.0",
* "react-native-scripts": "^1.14.1",
* "react-test-renderer": "16.3.1"
Dependencies:
*Expo: "^28.0.0",
*React: "16.3.1",
*React-Native: "^0.55.4"
* Node: 8.11.3
* Device: iphone 7 vs 11.2
* Xcode: 9.2
* macOS: macOS Sierra vs 10.12.6.
I wasn’t even able to find the element i.e the test fails/timeouts on the before all hook,
though I am able to see the simulator show the welcome message
But the same works in a lower versions of detox, expo, react-native
i.e. if using Detox: 7.2.0, expo: 25.0.0, react-native:0.52.0 it works perfectly and am able to write different test cases. So,
- I wish to know is there any compatibility matrix of the version dependencies of Detox with expo, react-native. If not, could you please upload/update it somewhere in documentation.
- Is there something I am missing in setup of detox with expo other than as stated in here(P.S: I know it was an outdated repo, but I can’t figure out something working other than using it as a base project for setup along with detox-expo-helpers repo)
- Also, the latest documentation doesn’t have anything related to Detox Expo setup for android, is it down the line or should we figure it out with few attempts of our own
Device and verbose Detox logs
The verbose detox logs along with debug-synchronization logs are in this doc: (P.S: I didn’t find any synchronization log entries though) DetoxVerboselogs.docx
The device logs are in this text file: debug.txt and console log entries are here: consoleEntries.docx
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 31 (4 by maintainers)
I am seeing the same issue, I have been using detox for a year now, I upgraded from 7.4.0 to 8.2.3 and when I run tests, detox starts the simulator and opens the app but does not run any tests and after a while the tests are terminated with the “Timeout of 520000ms exceeded” error. below are full logs
RN: 0.56.0 node: v8.8.1 detox: 8.2.3
Expo support is and will only be supported by the community. Compatibility matrix can be accepted as an addition to docs if someone can research submits a PR. This however will only be can only be supported by the community as we are not using Expo internally.
If you have issues with a project that you want help with please submit verbose log, and device logs. We will never be able to guess the problem. If the issue arises on a new project from template this is great news, create a demo project with a simple, compilable abd repeoducable bug, and link it in the issue.
Remember, https://twitter.com/mweststrate/status/1012405297795813376?s=09