# Puppeteer/ chromium help

**URL:** <https://discourse.nodered.org/t/puppeteer-chromium-help/94979>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [29 January 2025 09:32 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979 "2025-01-29T09:32:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aredhone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aredhone/32/90359_2.png) [@aredhone](https://discourse.nodered.org/u/aredhone)\
**Post date:** [29 January 2025 09:32 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/1 "2025-01-29T09:32:45Z")

</div>

hay guys im trying to connect my node red through whatsapp with whatsapp-link the lite version disconects every phew minutes so i want to use whatsapp web  
i have installed

# node-red-contrib-whatsapp-link

# node-red-contrib-puppeteer-core

# node-red-contrib-puppeteer-new

but i get this error every time

```auto
29 Jan 10:24:26 - [error] Error: Failed to launch the browser process! spawn /config/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome ENOENT
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
    at onClose (/config/node_modules/puppeteer-core/src/node/BrowserRunner.ts:327:9)
    at ChildProcess.<anonymous> (/config/node_modules/puppeteer-core/src/node/BrowserRunner.ts:319:16)
    at ChildProcess.emit (node:events:518:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at processTicksAndRejections (node:internal/process/task_queues:90:21)

```

online it says wont work with armx64 but im on an amd server

```auto
-----------------------------------------------------------
 Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 19.0.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.2 (amd64 / qemux86-64)
 Home Assistant Core: 2025.1.4
 Home Assistant Supervisor: 2024.12.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------

```

im still quite new to the whole node red so please help

i also will add my nodered configuration just in case

```auto
theme: github-dark
http_node:
  username: ""
  password: ""
http_static:
  username: ""
  password: ""
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
system_packages: []
npm_packages: []
init_commands: []

```

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [29 January 2025 19:06 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/2 "2025-01-29T19:06:39Z")

</div>

Stupid question of the day, did you install Chrome?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [29 January 2025 19:58 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/3 "2025-01-29T19:58:23Z")

</div>

@aredhone  
You're running Home Assistant, therefore, I think this plugin is running under Docker/Alpine.

I would read through this (docker related) : [puppeteer/docs/troubleshooting.md at main · puppeteer/puppeteer · GitHub](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker)

Its very likely - the Node didn't find/pulldown a binary for chrome under Alpine

 ![Screenshot 2025-01-29 at 20.05.11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3b84fe7f9d7b79a57896b85adf4f9fc334a71e9d.png)

Many here don't use Home Assistant or Docker, so input may be limited.

FWIW : `ENOENT` is file or folder not found

---

<div class="post-metadata">

**Author:** ![aredhone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aredhone/32/90359_2.png) [@aredhone](https://discourse.nodered.org/u/aredhone)\
**Post date:** [29 January 2025 20:32 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/4 "2025-01-29T20:32:26Z")

</div>

i dont think i did if this fixes it then i dont know what im gona do xD

---

<div class="post-metadata">

**Author:** ![aredhone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aredhone/32/90359_2.png) [@aredhone](https://discourse.nodered.org/u/aredhone)\
**Post date:** [29 January 2025 20:33 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/5 "2025-01-29T20:33:13Z")

</div>

im gona try the chrome install first if that dosent work im gona try your aprouch thanks

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 January 2025 20:38 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/6 "2025-01-29T20:38:10Z")

</div>

I may be a little thick here but what is the link between the whatsapp node and puppeteer? I didn't see a dependency in the whatsapp node - did I miss something?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 January 2025 20:57 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/7 "2025-01-29T20:57:34Z")

</div>

Pretty sure WhatsApp implementations use the web chat pages due to lack of API (that's from memory, things might have changed, or I could be wrong)

This is why I use telegram for mobile notifications.

---

<div class="post-metadata">

**Author:** ![aredhone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aredhone/32/90359_2.png) [@aredhone](https://discourse.nodered.org/u/aredhone)\
**Post date:** [29 January 2025 21:15 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/8 "2025-01-29T21:15:52Z")

</div>

so the whatsap link has a lite version that disconects when ever it feels like it the it also has a whatsap web option thats more stable that needs puppeteer and a headless browser

---

<div class="post-metadata">

**Author:** ![aredhone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aredhone/32/90359_2.png) [@aredhone](https://discourse.nodered.org/u/aredhone)\
**Post date:** [29 January 2025 21:18 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/9 "2025-01-29T21:18:54Z")

</div>

i dont realy wana use telegram im building a sort of it bot / ai but im slowly noticing that im compleetly out of my deph te reason why i cant go to telegram is no one in my family wants to make the jump so im stuck doing simple it stuff through whatsapp untill i finish this bot/ai

tdlr need whatsapp bot / ai so i dont have to explain how make a windows full screen for the bilionth time

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 January 2025 21:47 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/10 "2025-01-29T21:47:19Z")

</div>

If the nodes aren't working, and if you have some JavaScript ability, I'd just add a node.js module to a function node. There seem to be loads of modules - this seems like one of the top ones:

> **[GitHub - pedroslopez/whatsapp-web.js: A WhatsApp client library for NodeJS that connects...](https://github.com/pedroslopez/whatsapp-web.js)**
>
> A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [30 January 2025 07:15 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/11 "2025-01-30T07:15:19Z")

</div>

Any puppeteer node for node-red has issues (at least that is what I found), especially when there are updates to chromium or the puppeteer package. Instead I have switched to the npm package and use a function node to go through the actions.

In the setup tab use (make sure to install chromium via the commandline):

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c5947534c32d929ddeddf1a4ed4e6207b765b67d.png)

and for the code itself, example:

```auto
function delay(time) {
    return new Promise(function (resolve) {
        setTimeout(resolve, time)
    });
}

const browser = await puppeteer.launch({
    headless: true,
    executablePath: '/usr/bin/chromium',
    args: [
        '--incognito',
    ]
});
const user = 'someuser'
const pass = 'somepasswprd'

node.status({ fill: "yellow", shape: "ring", text: "starting browser" });
const page = await browser.newPage();

await page.goto('https://example.com/', {
    waitUntil: 'networkidle2', networkIdleTimeout: 15000
})
node.status({ fill: "blue", shape: "ring", text: "login" });

await page.waitForSelector('#user');
await page.locator('#user').fill(user);
await page.locator('#password').fill(pass);
await page.locator('.btn-primary').click();

await page.waitForNavigation({ waitUntil: "networkidle2" });
await delay(2000);
...

```

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [30 January 2025 09:27 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/12 "2025-01-30T09:27:34Z")

</div>

I had the same issues as bakman2 mentioned with all the puppeteer nodes and switched also to the npm version.  
Works great, can't recall that I had to set the _executablepath_, however bakman2 is running on linux and for me this setup runs on win10.

---

<div class="post-metadata">

**Author:** ![aredhone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aredhone/32/90359_2.png) [@aredhone](https://discourse.nodered.org/u/aredhone)\
**Post date:** [30 January 2025 17:30 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/13 "2025-01-30T17:30:05Z")

</div>

so as of now it might be fixed not thaks to anything i did but there was an update of the whatsap-link app that seems to work more stable so thanks to every one but aslong as it works im not gana mess with anything

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 April 2025 17:30 UTC](https://discourse.nodered.org/t/puppeteer-chromium-help/94979/14 "2025-04-30T17:30:16Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
