Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: RangeError: Maximum call stack size exceeded error with async jasmine tests #8126

Closed
3 tasks done
BenoitZugmeyer opened this issue Mar 17, 2022 · 9 comments · Fixed by #8175
Closed
3 tasks done
Labels
Bug 🐛 Needs Investigation Issues that require more information on the problem.

Comments

@BenoitZugmeyer
Copy link

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

7.18.0

Node.js Version

17.6.0

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

When running asynchronous jasmine tests, if a test timeout, all remaining tests are failing with RangeError: Maximum call stack size exceeded with no call stack.

After investigation, the culprit seems to be the expectAsyncShim function calling itself indefinitely.

What is your expected behavior?

Remaining tests are correctly run.

How to reproduce the bug.

git clone https://gist.github.com/5d2ce35e3291993d7dbaf31961c15069 test-wdio
cd test-wdio
npm i
npm run wdio

Relevant log output

[0-0] RUNNING in chrome - /test.js
...
[0-0] Error in "test timeout"
Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
    at <Jasmine>
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
[0-0] Error in "test foo"
RangeError: Maximum call stack size exceeded
[0-0] Error in "test bar"
RangeError: Maximum call stack size exceeded

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues
@praveendvd
Copy link
Contributor

@BenoitZugmeyer Could we close this issue ? if the fix is merged

@BenoitZugmeyer
Copy link
Author

I'm not aware of a fix. But sure, close the issue when it's fixed.

@praveendvd
Copy link
Contributor

Sorry ignore the comments , I just saw the merge thought it was in wdio repo .

@christian-bromann
Copy link
Member

@BenoitZugmeyer any chance you can provide a minimal reproducible example?

@christian-bromann christian-bromann added Reproducible Example Missing and removed Needs Triaging ⏳ No one has looked into the issue yet labels Mar 28, 2022
@BenoitZugmeyer
Copy link
Author

I have, see "How to reproduce the bug"

@christian-bromann
Copy link
Member

christian-bromann commented Mar 28, 2022

Ah, cheers! I must have missed that.

Any contributions that resolves the bug are highly appreciated. Please take a look into our contribution guidelines and let us know if you have any questions. Cheers!

@christian-bromann christian-bromann added Needs Investigation Issues that require more information on the problem. and removed Reproducible Example Missing labels Mar 28, 2022
@christian-bromann
Copy link
Member

fixed in #8175

@erwinheitzman
Copy link
Member

Nice going Christian and thanks for reporting @BenoitZugmeyer 👍

@BenoitZugmeyer
Copy link
Author

Thank you very much @christian-bromann !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Needs Investigation Issues that require more information on the problem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants