vscode-extensions-open-in-browser icon indicating copy to clipboard operation
vscode-extensions-open-in-browser copied to clipboard

Open browser failed!! Please check if you have installed the browser correctly!

Open kickgod opened this issue 6 years ago • 36 comments

Vscode Error : Open browser failed!! Please check if you have installed the browser correctly!

kickgod avatar Sep 16 '18 07:09 kickgod

Getting this error too when trying to open Google Chrome on Arch Linux.

jonathan-manzano avatar Sep 19 '18 10:09 jonathan-manzano

Get this error too on Windows 10 + Google Chrome.

seanmars avatar Sep 21 '18 18:09 seanmars

After I reinstalled the system, I installed this plugin and it looks like there is no problem.

kickgod avatar Sep 28 '18 08:09 kickgod

After I reinstalled the system, I installed this plugin and it looks like there is no problem.

Reinstalled what system?

isvictorious avatar Sep 28 '18 14:09 isvictorious

Same issue. The solution is simple. Find the name of the exec command, for google chrome in arch linux is google-chrome-stable. Edit the command name in ~/.vscode/extensions/techer.open-in-browser-2.0.0/out/config.js. Change google-chrome to google-chrome-stable. Reload vscode. As reference in the repo out/config.js

ghost avatar Oct 01 '18 05:10 ghost

After I installed Chinese version Firefox in kali Linux,the extension can't open html file no longer.

seeker-yang avatar Oct 15 '18 08:10 seeker-yang

Available with version 1.1.0

tang12138 avatar Mar 22 '19 03:03 tang12138

@b1tdust

Still not working after doing that, on ubuntu 18.04 here.

ghost avatar Mar 29 '19 13:03 ghost

I'm facing the same issue in win10...could some please help with this!!!!

seshusurendra avatar Jun 07 '19 21:06 seshusurendra

I experienced this and I found a solution for my error!

The folder that I put the .html file had an "&" in the title. Once I removed the "&" in the folder title, I haven't experienced this error.

Happy coding! :D

jaekaetea avatar Jun 21 '19 01:06 jaekaetea

error please anyone solve my problem asap

Manikanta-MK avatar Aug 09 '19 04:08 Manikanta-MK

please explain in brief for how to use this link asap https://github.com/SudoKillMe/vscode-extensions-open-in-browser/blob/master/out/config.js

Manikanta-MK avatar Aug 09 '19 05:08 Manikanta-MK

@b1tdust is right,the same browser on different OS may has different name. maybe I could figure it out.

SudoKillMe avatar Aug 09 '19 10:08 SudoKillMe

Same issue. The solution is simple. Find the name of the exec command, for google chrome in arch linux is google-chrome-stable. Edit the command name in ~/.vscode/extensions/techer.open-in-browser-2.0.0/out/config.js. Change google-chrome to google-chrome-stable. Reload vscode. As reference in the repo out/config.js

@b1tdust even after doing this procedure, same error appearing

Namratak10 avatar Sep 20 '19 19:09 Namratak10

I have The same problem, and it started after i installed nodeJs on my Computer, It didn't work either :-| After i tryed to debugg in VS-Code with Node something happend. I have checked all the settings for Live Server Extension, The settings for the envirement variables on the computer and even re-installed VS-Code but nothing work. ???

zocom-kim-vagi avatar Oct 19 '19 15:10 zocom-kim-vagi

Any suggestions ?? My Config for Live Server looks like this: { "webRoot": "${workspaceFolder}", "window.zoomLevel": 1, "liveServer.settings.CustomBrowser": "chrome"

}

zocom-kim-vagi avatar Oct 20 '19 11:10 zocom-kim-vagi

If you have a '&' in your file path, delete it.

openingsound avatar Jul 08 '20 18:07 openingsound

const chromeItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chrome",
    standardName: platform === 'win32'
        ? 'chrome'
        : (platform === 'darwin'
            ? 'google chrome'
            : 'chromium-browser'),
    acceptName: ['chromium-browser', 'chrome', 'google chrome', 'google-chrome'$
};

It is necessary to edit config in in file ~/.vscode/extensions/techer.open-in-browser-2.0.0/out/config.js. google-chrome to chromium-browser at standardName:platform

paukerspinner avatar Sep 18 '20 21:09 paukerspinner

same issue..I have installed live server too .But both are not working

sreelachu22 avatar Sep 25 '20 11:09 sreelachu22

@kickgod open-in-browser by coderfee install this extension it will work for all linux distros then press ctrl+k then D it will open your HTML file in default browser.

karthiktv2000 avatar Oct 22 '20 06:10 karthiktv2000

I'm having this issue on Windows. I reinstalled VS code and the extension and the same error comes up. I looked at the Github repo. but in not sure what to do. does someone know what to do? to resolve this issue?

sanjothebay avatar Feb 06 '21 04:02 sanjothebay

I'm having this issue on Windows. I reinstalled VS code and the extension and the same error comes up. I looked at the Github repo. but in not sure what to do. does someone know what to do? to resolve this issue?

same problem

surajgautamg77 avatar Jun 11 '21 13:06 surajgautamg77

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const platform = process.platform;
const chromeItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chrome",
    standardName: platform === 'win32'
        ? 'chrome'
        : (platform === 'darwin'
            ? 'google chrome'
            : 'google-chrome-stable'), //if you use google chrome stable version use this. if beta set to "google-chrome-stable".
    acceptName: ['chrome', 'google chrome', 'google-chrome', 'gc', '谷歌浏览器']
};
const chromiumItem = {
    description: "Mac",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chromium",
    standardName: "Chromium",
    acceptName: ['chromium']
};
const firefoxItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, smart and personal web browser",
    label: "Mozilla Firefox",
    standardName: "firefox",
    acceptName: ['firefox', 'ff', 'mozilla firefox', '火狐浏览器']
};
const firefoxDeveloperItem = {
    description: "Mac",
    detail: "A fast, smart and personal web browser",
    label: "Mozilla Firefox Developer Edition",
    standardName: "FirefoxDeveloperEdition",
    acceptName: ['firefox developer', 'fde', 'firefox developer edition']
};
const ieItem = {
    description: "Windows",
    detail: "A slightly outdated browser",
    label: "Microsoft IE",
    standardName: "iexplore",
    acceptName: ['ie', 'iexplore']
};
const edgeItem = {
    description: "Windows",
    detail: "A modern browser aiming to replace ie",
    label: "Microsoft Edge",
    standardName: "MicrosoftEdge",
    acceptName: ['edge', 'msedge', 'microsoftedge']
};
const safariItem = {
    description: "Mac",
    detail: "A fast, efficient browser on Mac",
    label: "Apple Safari",
    standardName: "safari",
    acceptName: ['safari']
};
const operaItem = {
    description: "Windows, Mac",
    detail: 'A fast, secure, easy-to-use browser',
    label: 'Opera',
    standardName: 'opera',
    acceptName: ['opera']
};
const browsers = [chromeItem, firefoxItem, operaItem];
if (process.platform === 'win32') {
    browsers.push(ieItem);
    browsers.push(edgeItem);
}
else if (process.platform === 'darwin') {
    browsers.push(safariItem);
    browsers.push(chromiumItem);
    browsers.push(firefoxDeveloperItem);
}
exports.default = {
    browsers: browsers,
    app: 'open-in-browser'
};
//# sourceMappingURL=config.js.map

i'm on arch linux with google chrome stable version and i solved this issue with this.

aliazhar-id avatar Jun 17 '21 04:06 aliazhar-id

I had the same problem and i changed "chrome" in setting.json (Vscode) to : "liveServer.settings.CustomBrowser": "google-chrome-stable", ps: I use manjaro !

F-Hamid avatar Jan 03 '22 16:01 F-Hamid

it woked for me !

F-Hamid avatar Jan 03 '22 16:01 F-Hamid

Workaround in Archlinux export BROWSER="/usr/bin/firefox" && code .

Or add variable BROWSER in ~/.bashrc export BROWSER="/usr/bin/firefox" then run source ~/.bashrc

juliolimareis avatar Apr 19 '22 22:04 juliolimareis

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const platform = process.platform;
const chromeItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chrome",
    standardName: platform === 'win32'
        ? 'chrome'
        : (platform === 'darwin'
            ? 'google chrome'
            : 'google-chrome-stable'), //if you use google chrome stable version use this. if beta set to "google-chrome-stable".
    acceptName: ['chrome', 'google chrome', 'google-chrome', 'gc', '谷歌浏览器']
};
const chromiumItem = {
    description: "Mac",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chromium",
    standardName: "Chromium",
    acceptName: ['chromium']
};
const firefoxItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, smart and personal web browser",
    label: "Mozilla Firefox",
    standardName: "firefox",
    acceptName: ['firefox', 'ff', 'mozilla firefox', '火狐浏览器']
};
const firefoxDeveloperItem = {
    description: "Mac",
    detail: "A fast, smart and personal web browser",
    label: "Mozilla Firefox Developer Edition",
    standardName: "FirefoxDeveloperEdition",
    acceptName: ['firefox developer', 'fde', 'firefox developer edition']
};
const ieItem = {
    description: "Windows",
    detail: "A slightly outdated browser",
    label: "Microsoft IE",
    standardName: "iexplore",
    acceptName: ['ie', 'iexplore']
};
const edgeItem = {
    description: "Windows",
    detail: "A modern browser aiming to replace ie",
    label: "Microsoft Edge",
    standardName: "MicrosoftEdge",
    acceptName: ['edge', 'msedge', 'microsoftedge']
};
const safariItem = {
    description: "Mac",
    detail: "A fast, efficient browser on Mac",
    label: "Apple Safari",
    standardName: "safari",
    acceptName: ['safari']
};
const operaItem = {
    description: "Windows, Mac",
    detail: 'A fast, secure, easy-to-use browser',
    label: 'Opera',
    standardName: 'opera',
    acceptName: ['opera']
};
const browsers = [chromeItem, firefoxItem, operaItem];
if (process.platform === 'win32') {
    browsers.push(ieItem);
    browsers.push(edgeItem);
}
else if (process.platform === 'darwin') {
    browsers.push(safariItem);
    browsers.push(chromiumItem);
    browsers.push(firefoxDeveloperItem);
}
exports.default = {
    browsers: browsers,
    app: 'open-in-browser'
};
//# sourceMappingURL=config.js.map

i'm on arch linux with google chrome stable version and i solved this issue with this.

What's this file name and where did you put it?

eferro70 avatar Jun 22 '22 14:06 eferro70

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const platform = process.platform;
const chromeItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chrome",
    standardName: platform === 'win32'
        ? 'chrome'
        : (platform === 'darwin'
            ? 'google chrome'
            : 'google-chrome-stable'), //if you use google chrome stable version use this. if beta set to "google-chrome-stable".
    acceptName: ['chrome', 'google chrome', 'google-chrome', 'gc', '谷歌浏览器']
};
const chromiumItem = {
    description: "Mac",
    detail: "A fast, secure, and free web browser built for the modern web",
    label: "Google Chromium",
    standardName: "Chromium",
    acceptName: ['chromium']
};
const firefoxItem = {
    description: "Windows, Mac, Linux",
    detail: "A fast, smart and personal web browser",
    label: "Mozilla Firefox",
    standardName: "firefox",
    acceptName: ['firefox', 'ff', 'mozilla firefox', '火狐浏览器']
};
const firefoxDeveloperItem = {
    description: "Mac",
    detail: "A fast, smart and personal web browser",
    label: "Mozilla Firefox Developer Edition",
    standardName: "FirefoxDeveloperEdition",
    acceptName: ['firefox developer', 'fde', 'firefox developer edition']
};
const ieItem = {
    description: "Windows",
    detail: "A slightly outdated browser",
    label: "Microsoft IE",
    standardName: "iexplore",
    acceptName: ['ie', 'iexplore']
};
const edgeItem = {
    description: "Windows",
    detail: "A modern browser aiming to replace ie",
    label: "Microsoft Edge",
    standardName: "MicrosoftEdge",
    acceptName: ['edge', 'msedge', 'microsoftedge']
};
const safariItem = {
    description: "Mac",
    detail: "A fast, efficient browser on Mac",
    label: "Apple Safari",
    standardName: "safari",
    acceptName: ['safari']
};
const operaItem = {
    description: "Windows, Mac",
    detail: 'A fast, secure, easy-to-use browser',
    label: 'Opera',
    standardName: 'opera',
    acceptName: ['opera']
};
const browsers = [chromeItem, firefoxItem, operaItem];
if (process.platform === 'win32') {
    browsers.push(ieItem);
    browsers.push(edgeItem);
}
else if (process.platform === 'darwin') {
    browsers.push(safariItem);
    browsers.push(chromiumItem);
    browsers.push(firefoxDeveloperItem);
}
exports.default = {
    browsers: browsers,
    app: 'open-in-browser'
};
//# sourceMappingURL=config.js.map

i'm on arch linux with google chrome stable version and i solved this issue with this.

What's this file name and where did you put it?

You have to set default extension name in plugin open-in-browser with new as gc, google-chrome,chrome in vs code setting extensions. It work fine!! :)

thanhtai9606 avatar Jun 23 '22 04:06 thanhtai9606

I'm currently facing this problem with windows10 Pls how do I fix it

SamAkins280 avatar Aug 09 '22 18:08 SamAkins280

it woked for me !

Hello sir, My name is Venuchaitanya, can you please assist me in doing this, as I'm tired of resolving this on my Windows: 8.1 PC with i5 config. . My mail ID is [email protected], I will be glad to get help. Thanks

Venuchaitanya7777 avatar Feb 18 '23 06:02 Venuchaitanya7777