Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Web] Flutter drive --chrome-binary flag has no effect #171504

Open
@lavinov-mercury

Description

@lavinov-mercury

Steps to reproduce

  1. Setup the simplest integration test running on Web: https://docs.flutter.dev/testing/integration-tests
  2. Install another Chrome instance
  3. Get the path of the new binary (I tried both relative and absolute paths)
  4. Run flutter drive with this binary
  5. Check logs to find which chrome version is used

The script for all these steps is attached.

Expected results

The binary passed in the argument is used.

Actual results

The globally installed Chrome is used:

[+2236 ms] Waiting for connection from debug service on Chrome... (completed in 8,1s)
[        ] Synced 59.0MB.
[        ] <- accept
[        ] Caching compiled dill
[  +25 ms] Launching Chromium (url = http://localhost:62293, headless = false, skipCheck = false, debugPort = null)
[        ] Will use Chromium executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[  +34 ms] Using Google Chrome 138.0.7204.93 

Code sample

Code sample
npx @puppeteer/browsers install chrome@135
# For Linux:
CHROME_BINARY_PATH=$(find "$PWD/chrome" -name "chrome" -type f 2>/dev/null | head -1)

# on MacOS use the following command:
# CHROME_BINARY_PATH=$(find "$PWD/chrome" -name "Google Chrome for Testing" -type f 2>/dev/null | head -1)

$CHROME_BINARY_PATH --version
flutter drive  \
  --driver=test_driver/integration_test.dart \
  --target=integration_test/app_test.dart \
  -d chrome \
  --browser-name=chrome \
  --chrome-binary="$CHROME_BINARY_PATH" \
  --verbose

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.0 24A335 darwin-arm64, locale ru-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] IntelliJ IDEA Community Edition (version 2023.1)
[✓] VS Code (version 1.100.0)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    found in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyt: flutter driver"flutter driver", flutter_drive, or a driver testteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions