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

MaxListenersExceededWarning #19

Open
varac opened this issue Jun 8, 2021 · 9 comments
Open

MaxListenersExceededWarning #19

varac opened this issue Jun 8, 2021 · 9 comments

Comments

@varac
Copy link

varac commented Jun 8, 2021

taiko-screencast fails to record a screencast for me with the following error:

❯ taiko --observe ptf-demo.js --plugin taiko-screencast
 ✔ Browser opened
 ✔ Navigated to URL https://admin.oas.…
 ✔ Clicked element matching text "Login"  1 times
 ✔ Clicked element matching text "Login with OAS"  1 times
 ✔ Wrote demo into the textBox with label Username 
 ✔ Wrote ***** into the textBox with label Password 
 ✔ Clicked element matching text "Remember me"  1 times
 ✔ Clicked element matching text "Sign in"  1 times
 ✔ Clicked link below nextcloud 1 times
 ✔ Clicked element matching text "Log in with OpenAppStack"  1 times
 ✔ Clicked element matching text "Continue with demo"  1 times
 ✔ Pressed the Escape key
 ✔ Clicked link with text Documents  1 times
(node:91768) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 21 handlerActingOnNewSession listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
Error: Unsupported action removeListener on client
    at Object.get (/home/varac/lib/node_modules/taiko/lib/taiko.js:159:15)
    at Object.onceWrapper (node:events:510:17)
    at EventEmitter.emit (node:events:406:35)
    at initCRI (/home/varac/lib/node_modules/taiko/lib/connection.js:88:18)
    at async /home/varac/lib/node_modules/taiko/lib/connection.js:106:19
    at async /home/varac/lib/node_modules/taiko/lib/connection.js:106:19
    at async /home/varac/lib/node_modules/taiko/lib/connection.js:106:19
    at async /home/varac/lib/node_modules/taiko/lib/connection.js:106:19
    at async /home/varac/lib/node_modules/taiko/lib/connection.js:106:19
    at async /home/varac/lib/node_modules/taiko/lib/connection.js:106:19
✔ Browser closed

Without taiko-screencats, the script runs successful. Here's the demo.js.txt

@sriv
Copy link
Contributor

sriv commented Jun 10, 2021

hi, thanks for reporting this. I am unable to run your script since it seems to be using an internal URL/credentials.

The stacktrace suggests that for some reason taiko-screencast prevents the removeListener to be fired. This is strange.

Would it be possible for you to share a script that hits a public url?

Also, please share what version of taiko you are using.

@varac
Copy link
Author

varac commented Jun 10, 2021

Also, please share what version of taiko you are using.

I'm using 1.2.5 (Chromium: 88.0.4314.0) RELEASE and latest taiko-screencast.
I'll send you credentials for a test server since there's no public url for the components I'm testing.

@ghost
Copy link

ghost commented Aug 23, 2021

have same problem with 1.2.5

@sriv
Copy link
Contributor

sriv commented Aug 24, 2021

This was a problem with taiko-screencast rather than taiko itself. I've made some changes and v0.0.2 is out. Can you please try with [email protected] and see if the problem still exists @dvag-michael-boiman ?

thanks

@ghost
Copy link

ghost commented Aug 24, 2021

wow thanks, this was fast. I will try it today and give u feedback

@ghost
Copy link

ghost commented Aug 24, 2021

I tryed it with gauge + taiko 1.2.7 and screencasts 0.0.2
Now the problem if u have more than one scenario (only one need to have screencast capturing) the task not ending.
I See the log that the gif was saved, but it is not ending. maybe I try to stop the screencast without the await?
await screencast.stopScreencast(); --> screencast.stopScreencast();
or is there a possibility to kill the process with something like screencast = null; ?

@sriv
Copy link
Contributor

sriv commented Aug 24, 2021

I need to verify this, but the API should be as before, i.e. await screencast.stopScreencast() should terminate the screencast.

@ghost
Copy link

ghost commented Aug 24, 2021

i don't see nothing in the log of gauge & taiko, if u have an idea where I can find more logs let me know

@ghost
Copy link

ghost commented Aug 25, 2021

I go back to 0.0.1 running worser than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants