puppeteer failed to launch browser
Closed this issue · 1 comments
xySaad commented
[Pterodactyl Daemon]: Finished pulling Docker container image
v20.10.0
:/home/container$ ${STARTUPSCRIPT}
[node_characterai] Puppeteer - Warning: the specified Chromium path for puppeteer could not be located. If the script does not work properly, you may need to specify a path to the Chromium binary file/executable.
[node_characterai] Puppeteer - Warning: Guest users can only send up to 10 messages.
[node_characterai] Puppeteer - This is an experimental feature. Please report any issues on github.
/home/container/node_modules/@puppeteer/browsers/lib/cjs/launch.js:277
reject(new Error([
^
Error: Failed to launch the browser process!
/home/container/.cache/puppeteer/chrome/linux-115.0.5790.98/chrome-linux64/chrome: 15: Syntax error: word unexpected (expecting ")")
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at Interface.onClose (/home/container/node_modules/@puppeteer/browsers/lib/cjs/launch.js:277:24)
at Interface.emit (node:events:526:35)
at Interface.close (node:internal/readline/interface:527:10)
at Socket.onend (node:internal/readline/interface:253:10)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1589:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v20.10.0
The code i am running:
const CharacterAI = require("node_characterai");
const characterAI = new CharacterAI();
(async () => {
// Specify the Chromium path
characterAI.puppeteerPath = "../.cache/puppeteer/chrome/linux-1108766/chrome-linux/chrome";
// Authenticating as a guest (use `.authenticateWithToken()` to use an account)
await characterAI.authenticateAsGuest();
// Place your character's id here
const characterId = "8_1NyR8w1dOXmI1uWaieQcd147hecbdIK7CeEAIrdJw";
const chat = await characterAI.createOrContinueChat(characterId);
// Send a message
const response = await chat.sendAndAwaitResponse("Hello discord mod!", true);
console.log(response);
// Use `response.text` to use it as a string
})();
realcoloride commented
See #120 (comment).
Please re-open this issue if you have any problems.