question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timeout - Async callback was not invoked within the 30000 ms timeout

See original GitHub issue

When 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:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
chrfalchcommented, Sep 19, 2022

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!! 😃

1reaction
robwalkercocommented, Sep 28, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found