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

What is causing this: EACCES: permission denied, posix_spawn '/Applications/Google Chrome.app' #196

Closed
Chandy8626 opened this issue Feb 22, 2025 · 3 comments
Labels
duplicate This issue or pull request already exists invalid This doesn't seem right

Comments

@Chandy8626
Copy link

Chandy8626 commented Feb 22, 2025

$ bun run src/index.ts
✔ Enter the Amazon base URL … www.amazon.com
139 |                 }
140 |                 return res;
141 |             }, {}),
142 |             stdio,
143 |         });
144 |         this.#browserProcess = childProcess.spawn(this.#executablePath, this.#args, {
                                                  ^
EACCES: permission denied, posix_spawn '/Applications/Google Chrome.app'
    path: "/Applications/Google Chrome.app",
 syscall: "posix_spawn",
   errno: -13,
    code: "EACCES"

      at spawn (node:child_process:614:33)
      at spawn (node:child_process:14:39)
      at new Process (/Users/aaron/.bun/install/cache/@puppeteer/[email protected]@@@1/lib/esm/launch.js:144:45)
      at launch (/Users/aaron/.bun/install/cache/@puppeteer/[email protected]@@@1/lib/esm/launch.js:49:12)
      at <anonymous> (/Users/aaron/.bun/install/cache/[email protected]@@@1/lib/esm/puppeteer/node/BrowserLauncher.js:66:32)

Bun v1.2.3 (macOS arm64)
error: script "start" exited with code 1

Please bear with me as I'm not well-versed in running things in CLI. What is causing the above error?

@treetrum
Copy link
Owner

treetrum commented Feb 22, 2025

This does just seem like something wrong with your puppeteer installation. Unfortunately, there's only so much with I can help on that front. You might have some luck googling for your error: I.e. puppeteer EACCES: permission denied, posix_spawn '/Applications/Google Chrome.app'

Outside of that though. I can see here that it seems like you're entering the url like this:

✔ Enter the Amazon base URL … www.amazon.com

Can you instead try entering the url with https:// at the start? I.e. as https://www.amazon.com?

It won't solve your puppeteer issue, but I suspect that will be the next issue you run into.

@treetrum
Copy link
Owner

treetrum commented Feb 22, 2025

Have you done any modifications to the index.ts file to change the executablePath? This almost seems like you've pointed Puppeteer to an incorrect installation location of Chrome. I get the same error if I change the executablePath to an incorrect value.

If so, It's really hard for me to debug things I haven't written. If you've modified the script at all, unfortunately, you're likely going to be on your own for debugging.

However in this case, it does appear like you've maybe provide the wrong executable path. On a mac, the path should likely look like this: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

@inlikealion inlikealion added duplicate This issue or pull request already exists invalid This doesn't seem right labels Feb 23, 2025
@inlikealion
Copy link
Collaborator

Closing this out, but feel free to check #149 and #175 for pointers on how to fix puppeteer and Chrome. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants