# Impossible to launch Puppeteer on Raspberry

**URL:** <https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591>\
**Category:** General\
**Created:** [18 August 2022 09:13 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591 "2022-08-18T09:13:40Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichelTruelle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/micheltruelle/32/66414_2.png) [@MichelTruelle](https://discourse.nodered.org/u/MichelTruelle)\
**Post date:** [18 August 2022 09:13 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/1 "2022-08-18T09:13:40Z")

</div>

I have an issue when I try to launch puppeteer with my Raspberry using node-red. I am using the node-red-contrib-puppeteer-new library and this error code appears :

```auto
Error: Failed to launch the browser process!
/home/pi/.node-red/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome: 16: Syntax error: ")" unexpected

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

```

What can I do to solve this issue ?

Best regards

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 August 2022 09:17 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/2 "2022-08-18T09:17:18Z")

</div>

Well the error message says you have a syntax error so that needs to be fixed.

That’s all the help I can give with the information you have provided.

---

<div class="post-metadata">

**Author:** ![MichelTruelle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/micheltruelle/32/66414_2.png) [@MichelTruelle](https://discourse.nodered.org/u/MichelTruelle)\
**Post date:** [18 August 2022 09:31 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/3 "2022-08-18T09:31:34Z")

</div>

Do you know how can I fix it ? chrome file is a 310MiB file, and I don't know how to open it

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 August 2022 09:38 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/4 "2022-08-18T09:38:59Z")

</div>

This could be a bug in chrome, or a bug in puppeteer, or a bug in the node or a issue with your configuration.

But ask yourself: “What information about my environment have I provided?

All I can gleam so far is you have a flow using node-red-contrib-puppeteer-new and node-red is running on a pi.

What other information do you think might be helpful if you were going to try research and maybe reproduce this issue?

---

<div class="post-metadata">

**Author:** ![MichelTruelle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/micheltruelle/32/66414_2.png) [@MichelTruelle](https://discourse.nodered.org/u/MichelTruelle)\
**Post date:** [18 August 2022 09:48 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/5 "2022-08-18T09:48:48Z")

</div>

Thanks for your reply.  
To add context information:

- Raspberry Pi 3
- Raspbian GNU/Linux 11 (bullseye)
- Library : node-red-contrib-puppeteer-new v0.3.6 (lastest, same issue with the previous one)
- My flow is simple as this :  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c93ccddc08a6e28315a52bced1a9263c4d9c0972.png)

I have also tried other node-red puppeteer library, same issue occurs

By following this video, Puppeteer works (but not linked with nod-red)  
[Chrome Headless and Puppeteer on Raspberry Pi - YouTube](https://www.youtube.com/watch?v=6LnJ1zW5464&t=124s&ab_channel=SamuelPickford)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 August 2022 10:45 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/6 "2022-08-18T10:45:13Z")

</div>

What version of node-red and node.js? (You can get this from the start up log)  
Please provide an export of your flow too

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [18 August 2022 10:47 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/7 "2022-08-18T10:47:14Z")

</div>

FYI I can't get that node to work on Windows either (different error) ☹

I ended up writing JavaScript in a seperate file and then loading the result back into NR that way (I just wanted a screen grab of the webpage so it wasn't too difficult)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/066b1754bd78085b94f2672ea1ca766e51866647.png)

---

<div class="post-metadata">

**Author:** ![MichelTruelle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/micheltruelle/32/66414_2.png) [@MichelTruelle](https://discourse.nodered.org/u/MichelTruelle)\
**Post date:** [18 August 2022 10:50 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/8 "2022-08-18T10:50:12Z")

</div>

```auto
18 Aug 12:21:06 - [info] Node-RED version: v3.0.2
18 Aug 12:21:06 - [info] Node.js version: v16.16.0

```

My flow is the following:

```auto
[
    {
        "id": "b5cbf7492196e34a",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "07d08e02c2b10887",
        "type": "puppeteer-browser-launch",
        "z": "b5cbf7492196e34a",
        "timeout": 30000,
        "slowMo": 0,
        "headless": 0,
        "debugport": 0,
        "devtools": false,
        "name": "",
        "x": 400,
        "y": 220,
        "wires": [
            []
        ]
    },
    {
        "id": "b1595666c2921b93",
        "type": "inject",
        "z": "b5cbf7492196e34a",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 220,
        "y": 220,
        "wires": [
            [
                "07d08e02c2b10887"
            ]
        ]
    }
]

```

I have tried another puppeteer node-red library, and this one worked: node-red-contrib-puppeteer-core  
The problem is it is only to retrieve HTML code of a webpage, and not what I what to do with puppeteer.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 August 2022 11:04 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/9 "2022-08-18T11:04:25Z")

</div>

On your Pi, did you install the desktop version?  
When you run node-red are you doing it directly on the Pi, i.e. using a browser on the Pi to run NR or you using another computer's browser to run NR on the pi?

I've run into the same issue. The node's author doesn't allow issues to be opened on GitHub so I have sent him a message pointing that out and poining him to this issue. Maybe he will respond, however he hasn't been on the forum in almost a year...

---

<div class="post-metadata">

**Author:** ![MichelTruelle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/micheltruelle/32/66414_2.png) [@MichelTruelle](https://discourse.nodered.org/u/MichelTruelle)\
**Post date:** [18 August 2022 11:59 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/10 "2022-08-18T11:59:10Z")

</div>

I do both (external webbrower or directly in Raspberry UI through Chromium).

Thanks for your help, I hope he will answer 😀

---

<div class="post-metadata">

**Author:** ![dczysz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dczysz/32/46158_2.png) [@dczysz](https://discourse.nodered.org/u/dczysz)\
**Post date:** [18 August 2022 15:38 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/11 "2022-08-18T15:38:43Z")

</div>

I don't think this is an issue specific to that node-red node. I had the same issue getting puppeteer to run on a plain node.js application on a Pi months ago. Same type of error:

```auto
(node:11456) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/home/user/app/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: 1: /home/user/app/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: Syntax error: ")" unexpected

```

Also tried an alternative PhantomJS and had no luck with that either:

```auto
$ npm install

> phantomjs-prebuilt@2.1.16 install /home/user/app/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Unexpected platform or architecture: linux/arm
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: phantomjs-prebuilt@2.1.16 (node_modules/phantomjs-prebuilt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: phantomjs-prebuilt@2.1.16 install: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

```

So it seems like it may just be lacking arm support for these, but I never found a definitive answer. Here are some relevant GitHub issues, but also no answers there unfortunately.

> <https://github.com/puppeteer/puppeteer/issues/7018>
>
> Currently I am trying to run a program called "destreamer" on Raspbian OS. The …program itself uses puppeteer from the looks of it. When I go to run the command I get the following error:
> 
> \`\`\`
> Launching headless Chrome to perform the OpenID Connect dance...
> 
> \[ERROR\] Error: Failed to launch the browser process!
> /home/pi/destreamer/node\_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome: 1: /home/pi/destreamer/node\_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome: Syntax error: "(" unexpected
> 
> 
> TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
> 
> at onClose (/home/pi/destreamer/node\_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
> at Interface.helper\_js\_1.helper.addEventListener (/home/pi/destreamer/node\_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
> at Interface.emit (events.js:203:15)
> at Interface.close (readline.js:397:8)
> at Socket.onend (readline.js:173:10)
> at Socket.emit (events.js:203:15)
> at endReadableNT (\_stream\_readable.js:1145:12)
> at process.\_tickCallback (internal/process/next\_tick.js:63:19)
> \`\`\`
> 
> I tried running the \`ldd chrome | grep not\` command and at first gave an error of \`ldd: ./chrome: No such file or directory\` so I have to dig through the folders in the file system and then copy/paste it to cd into it at the command line. Once I did that it now returns \`\*\*not\*\* a dynamic executable\`
> 
> Puppeteer looks like it is on version 5.5.0 based on the info it gives when I do a \`npm i puppeteer\`. Nodejs looks like it is on version 10.24.0.
> 
> After doing some googling, I found it is likely due to dependencies so I found \`npm i puppeteer\` to reinstall it and same result. Then next I ran \`sudo apt-get install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget\` that would install most of the dependencies it would need with the same result occuring.
> 
> Most of the things I am finding are in regards to program your application which in this case wouldn't apply since I'm running one and that doesn't seem to be the problem.

> <https://github.com/snobu/destreamer/issues/357>
>
> Currently I am trying to run "destreamer" on Raspbian OS. The below is what I p…osted on their github too as it looked like it might be a puppeteer issue, but someone there mentioned posting it here too thinking it might be a destreamer issue. If there is more details you need just let me know.
> 
> The program itself uses puppeteer from the looks of it. When I go to run the command I get the following error:
> 
> \`\`\`
> Launching headless Chrome to perform the OpenID Connect dance...
> 
> \[ERROR\] Error: Failed to launch the browser process!
> /home/pi/destreamer/node\_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome: 1: /home/pi/destreamer/node\_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome: Syntax error: "(" unexpected
> 
> 
> TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
> 
> at onClose (/home/pi/destreamer/node\_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
> at Interface.helper\_js\_1.helper.addEventListener (/home/pi/destreamer/node\_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
> at Interface.emit (events.js:203:15)
> at Interface.close (readline.js:397:8)
> at Socket.onend (readline.js:173:10)
> at Socket.emit (events.js:203:15)
> at endReadableNT (\_stream\_readable.js:1145:12)
> at process.\_tickCallback (internal/process/next\_tick.js:63:19)
> \`\`\`
> 
> I tried running the \`ldd chrome | grep not\` command and at first gave an error of \`ldd: ./chrome: No such file or directory\` so I have to dig through the folders in the file system and then copy/paste it to cd into it at the command line. Once I did that it now returns \`\*\*not\*\* a dynamic executable\`
> 
> Puppeteer looks like it is on version 5.5.0 based on the info it gives when I do a \`npm i puppeteer\`. Nodejs looks like it is on version 10.24.0.
> 
> After doing some googling, I found it is likely due to dependencies so I found \`npm i puppeteer\` to reinstall it and same result. Then next I ran \`sudo apt-get install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget\` that would install most of the dependencies it would need with the same result occuring.
> 
> Most of the things I am finding are in regards to program your application which in this case wouldn't apply since I'm running one and that doesn't seem to be the problem.

---

<div class="post-metadata">

**Author:** ![dczysz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dczysz/32/46158_2.png) [@dczysz](https://discourse.nodered.org/u/dczysz)\
**Post date:** [18 August 2022 15:50 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/12 "2022-08-18T15:50:13Z")

</div>

> [@MichelTruelle](#):
>
> or directly in Raspberry UI through Chromium

Maybe this will work for you then if you already have Chromium on the Pi [Failing to launch process · Issue #357 · snobu/destreamer · GitHub](https://github.com/snobu/destreamer/issues/357#issuecomment-811085553)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [18 August 2022 16:21 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/13 "2022-08-18T16:21:57Z")

</div>

> [@dczysz](#):
>
> I had the same issue getting puppeteer to run on a plain node.js application on a Pi months ago

Hi .. after a bit of research we managed to crack this recently in another [Forum post](https://discourse.nodered.org/t/read-out-the-waste-calendar/66488/21)  
and it was by using an much older version of `puppeteer-core@1.20.0` in a Function node.  
Latest versions of puppeteer seem to have this problem on PIs ([issue](https://github.com/puppeteer/puppeteer/issues/8789))

---

<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:** [1 September 2022 16:22 UTC](https://discourse.nodered.org/t/impossible-to-launch-puppeteer-on-raspberry/66591/14 "2022-09-01T16:22:19Z")

</div>

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