SudoKillMe / vscode-extensions-open-in-browser

81 stars 42 forks source link

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

Open kickgod opened 5 years ago

kickgod commented 5 years ago

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

jonathan-manzano commented 5 years ago

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

seanmars commented 5 years ago

Get this error too on Windows 10 + Google Chrome.

kickgod commented 5 years ago

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

isvictorious commented 5 years ago

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

Reinstalled what system?

ghost commented 5 years ago

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

seeker-yang commented 5 years ago

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

tang12138 commented 5 years ago

Available with version 1.1.0

ghost commented 5 years ago

@b1tdust

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

seshusurendra commented 5 years ago

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

jaekaetea commented 5 years ago

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

Manikanta-MK commented 5 years ago

error please anyone solve my problem asap

Manikanta-MK commented 5 years ago

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

SudoKillMe commented 5 years ago

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

Namratak10 commented 4 years ago

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

zocom-kim-vagi commented 4 years ago

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 commented 4 years ago

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

}

openingsound commented 4 years ago

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

paukerspinner commented 3 years ago
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

sreelachu22 commented 3 years ago

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

karthiktv2000 commented 3 years ago

@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.

sanjothebay commented 3 years ago

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?

surajgautamg77 commented 3 years ago

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

aliazhar-id commented 3 years ago
"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.

F-Hamid commented 2 years ago

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 commented 2 years ago

it woked for me !

juliolimareis commented 2 years ago

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

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

eferro70 commented 2 years ago
"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?

thanhtai9606 commented 2 years ago
"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!! :)

SamAkins280 commented 2 years ago

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

Venuchaitanya7777 commented 1 year ago

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 venuchaitanya7777@gmail.com, I will be glad to get help. Thanks

k-byun commented 1 year ago

I went to Manage Extensions after opening the settings > then entered "google-chrome". After that, it's working like a charm.

JOJ0 commented 1 year ago

@aliazhar-id you posted a lot of code without any context, thus I'd like to second what @eferro70 asked already: Where is this file and what did you change excatly? In my humble opinion and kindly speaking: Your post is not very helpful like this. Please elaborate. Me and probably others would appreciate it :-)

@thanhtai9606 you seem to have understodd what @aliazhar-id ment, since you quoted their code and answered. Unfortunately I don't understand your sentence. Could you please rephrase?

What I tried so far on my system:

Question to the extension developer @kickgod: Is setting exact paths for this setting supported? Should it work or do you only handle exectuable names like chrome, google-chrome and so on. How are paths handled? Are fully qualified paths handled at all?

aliazhar-id commented 1 year ago

@aliazhar-id you posted a lot of code without any context, thus I'd like to second what @eferro70 asked already: Where is this file and what did you change excatly? In my humble opinion and kindly speaking: Your post is not very helpful like this. Please elaborate. Me and probably others would appreciate it :-)

@thanhtai9606 you seem to have understodd what @aliazhar-id ment, since you quoted their code and answered. Unfortunately I don't understand your sentence. Could you please rephrase?

What I tried so far on my system:

  • I'm on arch-like distro (Manjaro)
  • I'd like to use chrome and only have problems with that (launching firefox or opera works out of the box)
  • I tried to set the exact name that chrome has on my system. Launching chrome from the shell on my system is done like this:
$ google-chrome-stable
  • The exact location of this executable on my system is:
$ which google-chrome-stable
/usr/bin/google-chrome-stable
  • Setting this exact path in the vscode settings for the open-in-browser extension does not work!

Question to the extension developer @kickgod: Is setting exact paths for this setting supported? Should it work or do you only handle exectuable names like chrome, google-chrome and so on. How are paths handled? Are fully qualified paths handled at all?

ugh, that was a long time ago. sorry if that confused you all

So, what I did at that time was, open ~/.vscode/extensions/techer.open-in-browser-2.0.0/out/config.js (in my case arch linux, ofc)

then update the code like this (read the comments I gave in the code below) :

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-beta".
    acceptName: ['chrome', 'google chrome', 'google-chrome', 'gc', '谷歌浏览器']
};

I don't really remember it, but as far as I remember, it's been a long time, guys

Berreycode commented 10 months ago

Try intalling an earlier version of the browser extention. This should in most cases fix the problem if you had a recent update.

JOJ0 commented 10 months ago

Try intalling an earlier version of the browser extention. This should in most cases fix the problem if you had a recent update.

The initial issue is 5 years old. That old of a version I should install? That what you suggesting? Thanks for clarifying, I'll give it a try after that. Thanks!

kkzxak47 commented 5 months ago

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

Thanks!

I am using manjaro, vscode-oss, the path is ~/.vscode-oss/extensions/techer.open-in-browser-2.0.0/out/config.js