Timeout - Async callback was not invoked within the 30000 ms timeout
See original GitHub issueWhen running the test, I receive this error specified by jest.setTimeout.Timeout - Async callback was not invoked within the 30000 ms timeout specified by jest.setTimeout.Error:
The first one works.
it('takes a screenshot of the initial screen', async () => {
const screen = await takeScreenshot('initial');
expect(screen).toMatchBaseline();
});
The second one doesn’t work.
it('show loading, then takes a screenshot', async () => {
await press('showLoading'); // if I remove this line, it is working.
const screen = await takeScreenshot('show-loading');
expect(screen).toMatchBaseline();
});
My opinion is that when calling the press function, it doesn’t find the testID. My code:
return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
{loading && <ActivityIndicator />}
<Pressable testID="showLoading" onPress={() => setLoading(true)}>
<Text>Show Loading</Text>
</Pressable>
</SafeAreaView>
);
My repo link is here: https://github.com/burhanyilmaz/reactNativeOwl my logs exist on there.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Message "Async callback was not invoked within the 5000 ms ...
The timeout problem occurs when either the network is slow or many network calls are made using await . These ...
Read more >Async callback was not invoked within the 5000ms timeout not ...
For anyone experiencing the same issue with jest puppeteer tests, I found a workaround to make the failure message display the line where...
Read more >Troubleshooting · Jest
If a promise doesn't resolve at all, this error might be thrown: - Error: Timeout - Async callback was not invoked within timeout...
Read more >Async callback was not invoked within the 5000ms timeout ...
I have problem with api-testing with jest. What is the current behavior? Timeout - Async callback was not invoked within the 5000ms timeout...
Read more >Introduction to the Jest and Puppeteer Timeouts - Medium
Timeout - Async callback was not invoked within the 5000ms timeout ... than 30000 ms (30 seconds) the exception TimeoutError will be thrown....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks, @robwalkerco, for helping out! The library is super awesome and we’re really like to be able to take advantage of it on Android as well as iOS!! 😃
@burhanyilmaz @chrfalch We have published version 1.1.1 which fixes the issue with running the Owl tests on Android. The example project has been updated to 0.69.5 as well for reference.
Please let us know if you continue to have any Android issues after updating the library.