Browser Run remote binding reports TLS certificate name mismatch in wrangler dev

Open
#17,124 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Domain
cloud, devtools

Research direction

The report concerns the Browser Run remote binding in wrangler dev, reached through the diagnostic Worker's /browser route and its withTimeout helper. The cause is not identified, so the first step is reproducing the TLS NotValidForName failure and finding which hostname or certificate is involved in the managed connection. Done would mean a confirmed cause, or a safe diagnostic path that does not disable TLS verification.

Written by the indexing model from the issue text.

Description

Summary

A minimal Browser Run screenshot request through a remote binding in wrangler dev produced a TLS certificate name mismatch. The underlying cause is unknown; this report does not assume the fault lies with Cloudflare.

Environment

  • macOS
  • Wrangler 4.155.0
  • Miniflare 5.20261023.2-beta
  • workerd 1.20261023.1
  • Node 25.2.1 and, in a separate run with the same installed dependencies, Node 24.22.3
  • Compatibility date: 2026-10-23
  • Browser binding: "browser": { "binding": "BROWSER", "remote": true }

The original local configuration also included an AI binding, local assets and the nodejs_compat flag. The AI request was tested separately and is outside this report.

Code actually executed

These are exact excerpts from the diagnostic Worker. The unrelated AI branch and surrounding handler are omitted:

const withTimeout=(work,stage)=>Promise.race([work,new Promise((_,reject)=>setTimeout(()=>reject(Error(`local timeout in ${stage} after 20000ms`)),20000))]);
if(path==='/browser'){
 console.log('BROWSER_CALL_START');
 const res=await withTimeout(env.BROWSER.quickAction('screenshot',{html:'<!doctype html><html><body><p>Connection test</p></body></html>',viewport:{width:200,height:100,deviceScaleFactor:1},screenshotOptions:{type:'jpeg',quality:70}}),'browser');
 const bytes=new Uint8Array(await res.arrayBuffer());
 const type=res.headers.get('content-type')||'';
 return Response.json({service:'browser',ok:res.ok&&type.includes('image/jpeg')&&bytes.length>100,httpStatus:res.status,contentType:type,bytes:bytes.length,elapsedMs:Date.now()-start});
}

The Worker was started with wrangler dev and the /browser route was requested once per run. The test content was a short, non-sensitive HTML page.

Observed results

On 22 November 2026, around 22:44 Israel time (UTC+2), under Node 25.2.1:

  • Runtime log: TLS handshake failed: invalid peer certificate: NotValidForName
  • Error reference: qdh7kkk4fo98h09iqmo3ah5s
  • The diagnostic handler returned its local timeout after 20 seconds.

On 22 November 2026, around 22:53 Israel time (UTC+2), under Node 24.22.3:

  • The same TLS error appeared.
  • Error reference: kam8q5a3b782qvrgfrvva7br
  • The diagnostic handler again returned its local timeout after 20 seconds.

The 20-second timeout was imposed by the diagnostic code, not reported as a Cloudflare service timeout.

Expected result

The request returns a JPEG screenshot of the test page.

Unknowns

The development logs did not expose the hostname or certificate names for the failed managed connection. We have not identified whether the cause is local configuration, an intermediary or the remote service. Could you suggest a safe way to diagnose this remote binding connection without disabling TLS verification?

Dominant language
TypeScript
Stars
4.7k
Forks
1.7k
Avg merge
1d 22h
Merged PRs (30d)
282

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/workers-sdk

All issues in cloudflare/workers-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.