gragland / chatgpt-chrome-extension

A ChatGPT Chrome extension. Integrates ChatGPT into every text box on the internet.
MIT License
2.83k stars 455 forks source link

"Failed to launch the browser process!" (Update: figured it out) #30

Open joshualore-home opened 1 year ago

joshualore-home commented 1 year ago

Everything else has gone fine up to the point where I run node server.js (.env file has been properly set up and everything). Am I missing something that is causing this error?

...Documents\GitHub\chatgpt-chrome-extension\node_modules\puppeteer-core\lib\cjs\puppeteer\node\BrowserRunner.js:299 reject(new Error([ ^

Error: Failed to launch the browser process! spawn C:\Program Files\Google\Chrome\Application\chrome.exe ENOENT

joshualore-home commented 1 year ago

And to further explain the issue, I am seeing the "Ask ChatGPT" option when I right click in text boxes, but this is the pop-up error I get when I click it:

"Error. Make sure you're running the server by following the instructions on https://github.com/gragland/chatgpt-chrome-extension. Also make sure you don't have an adblocker preventing requests to localhost:3000"

So it's clear that for some reason, I'm not being able to get the server running

joshualore-home commented 1 year ago

I finally figured out the problem!

When you run server.js, it attempts to open Chrome using the address C:\Program Files\Google\Chrome\Application\chrome.exe, when the proper address (on my PC at least) should be C:\Program Files (x86)\Google\Chrome\Application\chrome.exe.

There are two ways to resolve this, but rather than finding the file that contains the line of code you need to change to direct it to the right Program Files folder, the simplest is simply to copy the Google folder from Program Files (x86) and paste it in Program Files. Once I did this, everything worked perfectly.