puppeteer icon indicating copy to clipboard operation
puppeteer copied to clipboard

[Bug]: `puppeteer.limits` throws an error when used inside a durable object

Open benank opened this issue 6 months ago • 1 comments

Minimal, reproducible example

Steps to reproduce:

  1. Set up the browser rendering example from here.
  2. Add this line inside the durable object's fetch method:
let limits = await puppeteer.limits(this.env.BROWSER);
  1. Deploy the worker and trigger it using an HTTP request.
  2. Observe that you get this error:
TypeError: endpoint.fetch is not a function at PuppeteerWorkers.limits

The limits method works as expected when used within a worker. However, when inside a durable object, it fails and throws an error.

Error string

TypeError : endpoint.fetch is not a function at PuppeteerWorkers.limits

Bug behavior

  • [ ] Flaky
  • [ ] PDF

Background

No response

Expectation

I am expecting the limits function to run and tell me the current browser rendering limits on my account so that I can wait if all my limits are used up before connecting to a browser in my durable object.

Reality

It throws an error when calling the limits function inside a durable object.

Puppeteer configuration file (if used)

No response

Puppeteer version

0.0.12

Node version

20.11.1

Package manager

npm

Package manager version

9.8.1

Operating system

macOS

benank avatar Aug 13 '24 17:08 benank