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]: page.waitForResponse results in "Buffer is not defined" error when reading response #18
Comments
I wanted to share I am getting a very similar error on my worker which was previously working from a few days ago where I take a screenshot of my own site.
This is the error I get when viewing the CF worker logs:
|
Same here. |
Same here. |
update your dependencies incl. node to node 18 lts and try to add: similar: |
@denu5 Thank you. I tried all Node versions from 16 to 19 (with nodejs_compact flag enabled), but it didn't help. |
I have the same problem even though i enabled nodejs_compact flag |
I had the same problem when initializing the browser and I found a comment in Cloudflare's Discord with this solution: import { Buffer } from 'node:buffer';
import puppeteer from "@cloudflare/puppeteer";
globalThis.Buffer = Buffer; Basically, import the Hope that helps. |
@bhanderivaibhav That error can be due to a mismatch between the variable name defined in
and in the worker
Also check #15 (comment) |
@apeacock1991 Can you try with the latest versions of wrangler (
|
The solution by @roelmagdaleno fixed the problem for me. Thank you! |
Bug description
Steps to reproduce the problem:
You'll need to adjust the URL/matcher, but when you call
res.buffer()
(or .text() or .json()) it raises aBuffer is not defined
error.I tested the same code on the core Puppeteer library and it worked fine.
Puppeteer version
0.0.4
Node.js version
16
npm version
9.5.1
What operating system are you seeing the problem on?
macOS
Relevant log output
No response
The text was updated successfully, but these errors were encountered: