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

Aperta
#17,124 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
javascript, typescript
Ambito
cloud, devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
TypeScript
Stelle
4.7k
Fork
1.7k
Merge medio
1g 22h
PR unite (30g)
282

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/workers-sdk

Tutte le issue di cloudflare/workers-sdk

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.