vscode-edge-devtools icon indicating copy to clipboard operation
vscode-edge-devtools copied to clipboard

Edge Tools and Flatpak: "Unable to launch browser"

Open Hvass-Labs opened this issue 2 years ago • 3 comments

Issue Type: Bug (?)

Versions

  • Linux Kubuntu 22
  • Edge browser installed as Flatpak: 103.0.1264.51
  • VSCode: 1.68.1
  • Edge Tools extension for VSCode: 2.1.0

Problem

After installing the extension "Microsoft Edge Tools for VS Code" it auto-generates launch.json. When I click "Launch Project" in the MS Edge Tools menu on the left of the screen, I get the following error message:

Unable to launch browser: "Unable to find Edge version *. Available auto-discovered versions are: ["dev"]. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable."

Attempted Solution

I have tried adding the following variants to the different configs in launch.json but they all give very similar error messages to the one above.

"runtimeExecutable": "dev",
"runtimeExecutable": "flatpak run com.microsoft.Edge",
"runtimeExecutable": "/var/lib/flatpak/exports/bin/com.microsoft.Edge",
"runtimeExecutable": "/app/extra/msedge",

Related Issues

I have searched for this problem on the internet and found various posts including https://github.com/microsoft/vscode/issues/95939 (which has been locked), but nobody seems to address the issue of having installed Edge as a Flatpak, which I think is causing the problem.

Is this a bug in VSCode or the Edge Tools extension, and is there a way to solve it?

Thanks!

Auto-Generated Context

Extension version: 2.1.0 VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-15T02:58:26.441Z) OS version: Linux x64 5.15.0-41-generic Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 5 2400G with Radeon Vega Graphics (8 x 1600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 0, 1, 1
Memory (System) 13.59GB (6.44GB free)
Process Argv --extensions-dir=/home/magnus/.var/app/com.visualstudio.code/data/vscode/extensions --reuse-window --crash-reporter-id 1d6db0cd-e10b-4c99-af6e-070b1dd3098d
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vscaat:30438848
pylanb8912:30520716
vsclangdc:30486549

Hvass-Labs avatar Jul 17 '22 13:07 Hvass-Labs

Interesting issue, thank you for bringing it up. I hope someone in the community here can help with that. I will also try to see if someone on the Linux team can help out.

codepo8 avatar Jul 18 '22 15:07 codepo8

@codepo8 could we have an option like "terminal.external.linuxExec": "gnome-terminal", to config the path for Edge binary?

For example, "vscode-edge-devtools.linuxExec": "/var/lib/flatpak/exports/bin/com.microsoft.Edge", would help to solve this problem (at least from my POV) ...

felipehw avatar Jul 25 '22 00:07 felipehw

Hi I had the same issue today. Solved it with the following configuration :

  "runtimeExecutable": "/var/lib/flatpak/app/com.microsoft.Edge/x86_64/stable/active/files/extra/msedge",

It worked for me. It may not be the cleanest way however, so we should consider it as a workaround.

jstermask avatar Sep 30 '22 13:09 jstermask

Seems like a good solution, thanks.

codepo8 avatar Oct 25 '22 18:10 codepo8