Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to launch on Chrome when using CHROME_EXECUTABLE with new SDK DAPs #4249

Closed
mootw opened this issue Nov 5, 2022 · 2 comments
Closed
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug
Milestone

Comments

@mootw
Copy link

mootw commented Nov 5, 2022

To Reproduce
Steps to reproduce the behavior:

  1. Use a non-standard chrome executable and have it defined in ENV.

Expected behavior
VSCode to launch using the web platform.

** actual behavior **
Error shows in debug console

No supported devices found with name or id matching 'chrome'.

The following devices were found:
Linux (desktop) • linux • linux-x64 • Arch Linux 6.0.2-arch1-1

Exited (1).

Screenshots
If applicable, add screenshots to help explain your problem.

user settings

{
  "workbench.iconTheme": "material-icon-theme",
  "editor.fontSize": 15,
  "editor.cursorSmoothCaretAnimation": true,
  "dart.warnWhenEditingFilesOutsideWorkspace": false,
  "editor.largeFileOptimizations": false,
  "files.autoSave": "afterDelay",
  "dart.env": {
    "CHROME_EXECUTABLE": "/usr/bin/google-chrome-stable",
  },
  "dart.flutterSdkPath": "/home/USERNAME/development/flutter",
  "editor.stickyScroll.enabled": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
}

flutter doctor -v

[✓] Flutter (Channel beta, 3.4.0-34.1.pre, on Arch Linux 6.0.2-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.4.0-34.1.pre on channel beta at /home/USERNAME/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 71520442d4 (4 weeks ago), 2022-10-05 16:38:28 -0500
    • Engine revision db0cbb2145
    • Dart version 2.19.0 (build 2.19.0-255.2.beta)
    • DevTools version 2.18.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /home/USERNAME/Android/Sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = google-chrome-stable

[✓] Linux toolchain - develop for Linux desktop
    • clang version 14.0.6
    • cmake version 3.24.2
    • ninja version 1.11.1
    • pkg-config version 1.8.0

[✓] Android Studio (version 2021.2)
    • Android Studio at /opt/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Arch Linux 6.0.2-arch1-1
    • Chrome (web)    • chrome • web-javascript • Google Chrome 106.0.5249.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
@mootw mootw added the is bug label Nov 5, 2022
@DanTup DanTup added this to the v3.54.0 milestone Nov 5, 2022
@DanTup DanTup added in flutter Relates to running Flutter apps in debugger Relates to the debug adapter or process of launching a debug session important Something important! labels Nov 5, 2022
@DanTup DanTup changed the title Launching web platform using extension does not work with non-standard chrome executable Unable to launch on Chrome when using CHROME_EXECUTABLE with new SDK DAPs Nov 5, 2022
@DanTup
Copy link
Member

DanTup commented Nov 5, 2022

This appears to be an issue with the SDK DAPs. It works correctly with them disabled.

The value is passed to the DA via toolArgs in the launch config:

"toolEnv": {
    "FLUTTER_HOST": "VSCode",
    "PUB_ENVIRONMENT": "vscode.dart-code",
    "CHROME_EXECUTABLE": "google-chrome-stable"
},

It's possible (likely?) toolEnv is not being handled correctly (in which case we should review why we have split env and toolEnv and if it would be better to merge them in the extension before sending to the DA, or teaching the DA about them).

@DanTup DanTup closed this as completed in 57a5511 Nov 7, 2022
@DanTup DanTup removed the important Something important! label Nov 7, 2022
@DanTup
Copy link
Member

DanTup commented Nov 7, 2022

This is fixed for the next VS Code extension release. You'll be able to remove the setting that forces the use of the legacy debug adapters once you have the next extension version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug
Projects
None yet
Development

No branches or pull requests

2 participants