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
RangeError: Maximum call stack size exceeded #38
Comments
Hey @marktigno, could you please share the task that's mapped to |
Hello @jan-molak, here's the task mapped on the above mentioned gherkin statement:
|
Thanks, I managed to reproduce the issue and should be able to release a fix this evening. To make it work in the meantime, please replace the export class Start implements Task {
static openHomePage() {
return new Start();
}
@step('{0} start visiting the website')
performAs(actor: PerformsTasks): PromiseLike<void> {
return actor.attemptsTo(
Open.browserOn('/')
);
}
constructor() {}
} with export class Start implements Task {
static openHomePage() {
return new Start();
}
performAs(actor: PerformsTasks): PromiseLike<void> {
return actor.attemptsTo(
Open.browserOn('/')
);
}
toString = () => '{0} start visiting the website';
constructor() {}
} |
The fix is available in serenity-js v. 1.4.2, thanks for reporting the issue! |
Hello @jan-molak! Verified the fix and it is now working. Cheers! |
I've updated serenity-js to version 1.4.1 then I did a sample test execution on it, but what happened is that all my test are failed and an RangeError has been thrown. Here's the sample log:
[12:28:57] I/launcher - Running 1 instances of WebDriver
[12:28:57] I/direct - Using ChromeDriver directly...
Feature: Country Selector
@WMPAT-19 @AcademicEcommFlow
Scenario: Change Location
× Given that I am visiting the Corporate Home Page
Failures:
Step: Given that I am visiting the Corporate Home Page - features\shared\country_selector.feature:11
Step Definition: node_modules\serenity-js\src\serenity-cucumber\webdriver_synchroniser.ts:47
Message:
RangeError: Maximum call stack size exceeded
at RegExp.[Symbol.replace] (native)
at RegExp.[Symbol.replace] (native)
at String.replace (native)
at Object.describe_as (D:\Serenity\Temp\node_modules\serenity-js\src\serenity\recording\activity_description.ts:13:20)
at Start.target.toString (D:\Serenity\Temp\node_modules\serenity-js\src\serenity\recording\step_annotation.ts:12:28)
at stringify (D:\Serenity\Temp\node_modules\serenity-js\src\serenity\recording\activity_description.ts:26:50)
at D:\Serenity\Temp\node_modules\serenity-js\src\serenity\recording\activity_description.ts:19:53
at RegExp.[Symbol.replace] (native)
at RegExp.[Symbol.replace] (native)
at String.replace (native)
From: Task:
at World.stepWrapper (D:\Serenity\Temp\node_modules\serenity-js\src\serenity-cucumber\webdriver_synchroniser.ts:72:18)
at World.stepWrapper (D:\Serenity\Temp\node_modules\serenity-js\src\serenity-cucumber\webdriver_synchroniser.ts:104:32)
at World.arity0 (eval at (D:\Serenity\Temp\node_modules\util-arity\arity.js:22:24), :3:39)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
0m00.010s
[12:29:11] I/launcher - 0 instance(s) of WebDriver still running
[12:29:11] I/launcher - chrome #1 failed 1 test(s)
[12:29:11] I/launcher - overall: 1 failed spec(s)
[12:29:11] E/launcher - Process exited with error code 1
.
.
.
.
(node:16472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property '0'
of undefined
Some of the npm scripts have failed:
protractor | wmp-serenityjs-automation@1.0.0 protractor:
protractor ./protractor.conf.js
Exit status 1 |npm ERR! Test failed. See above for more details.
The text was updated successfully, but these errors were encountered: