amazon-kindle-bulk-downloader icon indicating copy to clipboard operation
amazon-kindle-bulk-downloader copied to clipboard

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

Open Chandy8626 opened this issue 10 months ago • 2 comments

$ 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?

Chandy8626 avatar Feb 22 '25 17:02 Chandy8626

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 avatar Feb 22 '25 21:02 treetrum

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"

treetrum avatar Feb 22 '25 22:02 treetrum

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

inlikealion avatar Feb 23 '25 12:02 inlikealion

Thank you, all.

I just ran the program and it got all but one of my books.

Chandy8626 avatar Feb 23 '25 22:02 Chandy8626