Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

web_compiler_test fails on LUCI in Dart SDK

Aperta Adatta ai principianti
#10,032 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
73/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, flutter
Ambito
testing

Direzione di ricerca

Leggi web_compiler_test.dart intorno alle righe 37–45 e confronta le sue opzioni di Chrome con web_driver_service.dart intorno alle righe 361–369. Esegui il test webdriver che non passa su LUCI o in una configurazione headless comparabile; il lavoro è terminato quando il test seleziona il renderer skwasm previsto invece di ripiegare su canvaskit.

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

Descrizione

Recently devtools webdriver tests failed on LUCI in Dart SDK: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8668669452558670145/+/u/test_devtools/stdout?format=raw

Gemini had this to say:

Root Cause of the web_compiler_test.dart Failure on Windows

In web_compiler_test.dart:66-86, the test opens DevTools with ?compiler=wasm and checks that <body flt-renderer="..."> equals 'skwasm', but got 'canvaskit':

  1. When ?compiler=wasm is passed, flutter_bootstrap.js:116-125 calls _flutter.loader.load without forcing a renderer (rendererConfig = {}), letting Flutter's FlutterLoader pick the first compatible build from _flutter.buildConfig.builds (skwasm first, then canvaskit).

  2. FlutterLoader requires browserEnvironment.webGLVersion > 0 for skwasm (checked via canvas.getContext('webgl2') / canvas.getContext('webgl') in browser_environment.js:69-81), whereas canvaskit does not check webGLVersion > 0.

  3. web_compiler_test.dart:37-45 starts Chrome with only 'args': ['--headless']:

    driver = await createDriver(
      uri: Uri.parse('http://127.0.0.1:${ChromeDriver.port}'),
      desired: {
        ...Capabilities.chrome,
        Capabilities.chromeOptions: {
          'args': ['--headless'],
        },
      },
    );
    
  4. Starting in Chrome 139+ (LUCI uses Chrome 155), Chrome disabled automatic fallback to its bundled SwiftShader for WebGL on headless VMs without a hardware GPU unless --enable-unsafe-swiftshader is passed (which is why flutter_tools added SwiftShader flags when rolling Chrome 145+). On the GPU-less Windows LUCI VM, getContext('webgl2') returns null (webGLVersion == -1), causing FlutterLoader to reject the skwasm build and fall back to canvaskit.

Upstream Change Needed in flutter/devtools

In web_compiler_test.dart:37-45, pass the SwiftShader flags (and optionally CHROME_EXECUTABLE as 'binary') in Capabilities.chromeOptions, matching web_driver_service.dart:361-369:

    driver = await createDriver(
      uri: Uri.parse('http://127.0.0.1:${ChromeDriver.port}'),
      desired: {
        ...Capabilities.chrome,
        Capabilities.chromeOptions: {
          if (Platform.environment['CHROME_EXECUTABLE'] case final chromeExe?)
            'binary': chromeExe,
          'args': [
            '--headless',
            if (Platform.isLinux || Platform.isWindows) ...[
              '--use-gl=angle',
              '--use-angle=swiftshader',
              '--enable-unsafe-swiftshader',
              '--disable-gpu-sandbox',
            ],
          ],
        },
      },
    );

Do these words make sense to you, @kenzieschmoll ?

Lingua principale
Dart
Stelle
1.7k
Fork
407
Merge medio
3g 14h
PR unite (30g)
15

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 flutter/devtools

Tutte le issue di flutter/devtools

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.