Browser Rendering Env Binding in local dev is not set?

In my local wranger dev I can see logs saying it will bind browser but when I print out env from fetch or queue param its undefined. I assume it's why I am seeing this error trying to launch puppeteer.
const browser = await puppeteer.launch(env.CRAWLER_BROWSER);
const browser = await puppeteer.launch(env.CRAWLER_BROWSER);
✘ [ERROR] TypeError: Cannot read properties of undefined (reading 'fetch') at PuppeteerWorkers.launch
⛅️ wrangler 3.85.0
-------------------

Your worker has access to the following bindings:
- Durable Objects:
- MY_DURABLE_OBJECT: MyDurableObject
- Queues:
- CRAWLER_QUEUE: queues-crawler (local)
- Browser:
- Name: CRAWLER_BROWSER
- AI:
- Name: AI
╭───────────────────────────╮
│ [b▲ [WARNING] Using Workers AI always accesses your Cloudflare account in order to run AI models, and so will incur usage charges even in local development.

⎔ Starting local server...
[wrangler:inf] Ready on http://localhost:8787
Recieved fetch request env: {
AI: Ai {
fetcher: Fetcher {},
logs: [],
options: {},
lastRequestId: null,
aiGatewayLogId: null
},
MY_DURABLE_OBJECT: DurableObjectNamespace {},
CRAWLER_QUEUE: WorkerQueue {}
}
⛅️ wrangler 3.85.0
-------------------

Your worker has access to the following bindings:
- Durable Objects:
- MY_DURABLE_OBJECT: MyDurableObject
- Queues:
- CRAWLER_QUEUE: queues-crawler (local)
- Browser:
- Name: CRAWLER_BROWSER
- AI:
- Name: AI
╭───────────────────────────╮
│ [b▲ [WARNING] Using Workers AI always accesses your Cloudflare account in order to run AI models, and so will incur usage charges even in local development.

⎔ Starting local server...
[wrangler:inf] Ready on http://localhost:8787
Recieved fetch request env: {
AI: Ai {
fetcher: Fetcher {},
logs: [],
options: {},
lastRequestId: null,
aiGatewayLogId: null
},
MY_DURABLE_OBJECT: DurableObjectNamespace {},
CRAWLER_QUEUE: WorkerQueue {}
}
1 Reply
MrBithles
MrBithlesOP2mo ago
Oh its not supported in local
Local mode support does not exist for Browser Rendering so --remote is required.
https://developers.cloudflare.com/browser-rendering/platform/wrangler/ But doing --remote breaks queues
▲ [WARNING] Queues are not yet supported in wrangler dev remote mode.
So I can't use queues and browser together 😦
Cloudflare Docs
Wrangler | Browser Rendering docs
Wrangler is a command-line tool for building with Cloudflare developer products.
Want results from more Discord servers?
Add your server