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

[Cucumber rerun feature] TypeError: Cannot read property 'line' of undefined #975

Closed
Gump0422 opened this issue Aug 29, 2021 · 7 comments
Closed
Labels
bug @serenity-js/cucumber Adapter for Cucumber.js
Milestone

Comments

@Gump0422
Copy link

Gump0422 commented Aug 29, 2021

Hi, all
When using

rerun:@rerun.txt

Error: TypeError: Cannot read property 'line' of undefined
[rerun:execute] at CucumberMessagesParser.scenarioDetailsFor (/Users/tab.wu/Study/cucum/serenity-js-cucumber-protractor-template/node_modules/@serenity-js/cucumber/src/listeners/messages/parser/CucumberMessagesParser.ts:185:26)
[rerun:execute] at CucumberMessagesParser.parseTestCaseStarted (/Users/tab.wu/Study/cucum/serenity-js-cucumber-protractor-template/node_modules/@serenity-js/cucumber/src/listeners/messages/parser/CucumberMessagesParser.ts:87:37)
[rerun:execute] at EventEmitter.CucumberMessagesListener.options.eventBroadcaster.on (/Users/tab.wu/Study/cucum/serenity-js-cucumber-protractor-template/node_modules/@serenity-js/cucumber/src/listeners/messages/CucumberMessagesListener.ts:50:41)
[rerun:execute] at EventEmitter.emit (events.js:203:15)
[rerun:execute] at EventEmitter.emit (domain.js:448:20)

Plz refer to example:
https://github.com/Gump0422/serenity-js-cucumber-protractor-template

You can run with commads:
npm install
npm test
npm rerun

@jan-molak
Copy link
Member

jan-molak commented Aug 29, 2021

I can reproduce it, thanks. Checking.

@Gump0422 Gump0422 changed the title Cucumber rerun feature issue: Error: TypeError: Cannot read property 'line' of undefined [Cucumber rerun feature] Error: TypeError: Cannot read property 'line' of undefined Aug 30, 2021
@Gump0422 Gump0422 changed the title [Cucumber rerun feature] Error: TypeError: Cannot read property 'line' of undefined [Cucumber rerun feature] TypeError: Cannot read property 'line' of undefined Aug 30, 2021
@jan-molak jan-molak added the @serenity-js/cucumber Adapter for Cucumber.js label Aug 30, 2021
@Gump0422
Copy link
Author

Hi @jan-molak,
What should I do to help finish rerun progress?

@jan-molak
Copy link
Member

Hi @Gump0422 - after a couple of hours of debugging I believe that the issue is with Cucumber.js, so am working on creating a repo demonstrating the problem and reporting that to the Cucumber team.

Thanks for offering to help; at the moment I think I just need to continue down this rabbit hole and make sure the problem is fixed at the source.

If you'd like to help me secure more time for open-source development of Serenity/JS and submitting this and other fixes to Cucumber, please consider becoming a GitHub sponsor of Serenity/JS.

@Gump0422
Copy link
Author

Gump0422 commented Sep 1, 2021

HI, @jan-molak
Thanks for your nice work and support, Serenity/JS is a good test framework and I am so interested, I will consider your advice to be a sponsor of it, since I have a job now, I have to ensure it will not be conflict with my job.

@jan-molak
Copy link
Member

Confirmed bug in Cucumber.js - cucumber/cucumber-js#1783

@viper3400
Copy link
Sponsor Collaborator

@jan-molak, issue should be solved in cucumber-js since version 8.4.0.

Should be solved then in the latest Serenity/JS 3.0 RC as well:

"@cucumber/cucumber": "^8.6.0",

Most likely not solved in the Serentiy/JS 2.x branch:

"@cucumber/cucumber": "^7.3.2",

@viper3400 viper3400 added bug and removed blocked labels Oct 23, 2022
@jan-molak jan-molak added this to the 3.0 milestone Dec 19, 2022
@jan-molak
Copy link
Member

Closing as this issue should be resolved in 3.0.0-RC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug @serenity-js/cucumber Adapter for Cucumber.js
Projects
None yet
Development

No branches or pull requests

3 participants