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

stack_overflow using puppeteer #106

Closed
roachadam opened this issue Feb 25, 2021 · 6 comments
Closed

stack_overflow using puppeteer #106

roachadam opened this issue Feb 25, 2021 · 6 comments

Comments

@roachadam
Copy link

Error
image

Code Snippit
image

Steps to reproduce:

  1. Use puppeteer to launch browser and visit page as shown in code above.
  2. Compile files via bytenode
  3. Run code and observe overflow.

Environment:
Win10 x64
Node v14.15.5
"puppeteer": "^5.5.0",
"puppeteer-extra": "^3.1.17",
"puppeteer-extra-plugin-stealth": "^2.7.5", // I disabled this and error still occurs.
"puppeteer-extra-plugin-user-data-dir": "^2.2.11"

I did find some similar issues such as #57

I'll do some more digging with puppeteer to see if it is using the Function prototype anywhere, but I'm not sure yet if that's the case here.

Great project btw.

@roachadam
Copy link
Author

Can confirm it is occurring either on the goto function call, or the subsequent delay call
static delay = ms => new Promise(res => setTimeout(res, ms));

@OsamaAbbas
Copy link
Collaborator

Check this comment.

Let me know if it solves your issue.

@roachadam
Copy link
Author

Check this comment.

Let me know if it solves your issue.

I had looked into that issue as well, but nowhere am I using the evaluate function. I look into a few of the puppeteer functions but I couldn't find any usage there either.

@roachadam
Copy link
Author

Further research indicating that this is happening on request interception. Trying to narrow it down if its from request continue/abort or that I'm handling the function asynchronously.

@roachadam
Copy link
Author

Ok, last update here I think. I assume this is related to the known asyncarrow function issue. Although in the docs it was only mentioned in the context of electron, which is not the case here.

This causes stack overflow:
image

This, however, functions properly.

image

@OsamaAbbas
Copy link
Collaborator

The README file should be updated to reflect this issue.

Closing now as there is nothing that we can do to fix puppeteer (or electron too). It seems that the async arrow functions cause a crash whenever two contexts come into contact (node.js with electron, or node.js with puppeteer). This is definitely a C++ bug that most likely should be fixed in v8 itself.

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