Browser rendering binding env does not work

For Workes & Pages, what is the name of the domain?

None yet

What is the error number?

no error numbr

What is the error message?

No error message

What is the issue or error you’re encountering

I am trying to use the browser rendering api and I can not get it to work. When trying to access the binding in the env var nothing is there

What steps have you taken to resolve the issue?

I have does the simplest wrangler worker install I can and it still does not work

What are the steps to reproduce the issue?

Bind a headless browser instance running on Cloudflare’s global network.

Docs: Configuration - Wrangler

[browser]
binding = “MY_BROWSER”

export default {
async fetch(request, env) {
const browser = await puppeteer.launch(env.MYBROWSER);
const page = await browser.newPage();
await page.goto(“https://example.com”);
const metrics = await page.metrics();
await browser.close();
return Response.json(metrics);
},
};

  • Nothing is in my env vars. I try to console.log. And there is nothing
  • If i add other bindings to my wrangler.toml they work fine

Help would be appreciated

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.