realcoloride/node_characterai

.puppeteerPath not working correctly.

Closed this issue · 7 comments

Hello guys. It's my first time submiting an issue and also english is not rly good so feel free to ask if you don't understand smth.

So i'm actually trying to use node_charachter ai on a debian 10 vps with a docker container node:18-alpine and in my container i have the chromium-browser at "/usr/bin/chromium-browser" but when i launch my app it show me an error. And i setup .puppeteerPath for locate chromium-browser correctly but the error is still occuring.

2023-11-10_23h30_44
2023-11-10_23h31_47

Tanks for the quick answer but i have already check this issue before posting mine. And i know that my chromium-browser is at "/usr/bin/chromium-browser"

2023-11-11_11h22_59

So i do more test and i discover smth weird.
When i use characterAI.puppeteerPath my client look like this :

2023-11-11_11h28_06

I don't know if it's normal but the issue keep occuring. So I edit the my code for :
characterAI.requester.puppeteerPath = "/usr/bin/chromium-browser";

and after that i don't get the the error about pptr but i still don't get any response from characterai. I got this new error when i stop my container :

image

but this error is maybe here because i stop my container so it's stop the browser too.

ENOENT means no file or directory exists in the path. The referring path is /root/.cache/puppeteer/chrome/linux-1108766/chrome-linux/chrome.

This is the cache directory for chromium, whereas the browser is unable to launch without it.

So, what the problem seems to be is that chromium was installed, but something broke it after/during the installation.

https://stackoverflow.com/questions/59979188/error-failed-to-launch-the-browser-process-puppeteer

Also, could you try running this and paste the output?

ls /root/.cache/puppeteer/chrome/linux-1108766/

Yes of course.
This is the output :
2023-11-17_10h13_44

Also here is how i install chrome in my dockerfile :
RUN apk add --no-cache \ chromium \ nss \ freetype \ harfbuzz \ ca-certificates \ ttf-freefont \ nodejs

Thanks. Could you also run this?

ls /root/.cache/puppeteer/chrome/linux-1108766/chrome-linux

No response from OP, closing issue. Please re-open this issue if you need to update, or elaborate on your problem.
Cheers