New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raspberry pi Chromium revision is not downloaded #550

Open
aminjoharinia opened this Issue Aug 25, 2017 · 46 comments

Comments

Projects
None yet
@aminjoharinia

aminjoharinia commented Aug 25, 2017

Hi
i use raspbian stretch and i install puppeteer with npm but it did not download chromium
the os has the latest chromium
chromium-browser is already the newest version (60.0.3112.89-0ubuntu0.14.04.1.1010).
but when i run codes i have get error
(node:4035) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install" (node:4035) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
i also test npm install as it says but not working
what should i do?

@ebidel ebidel added the host label Aug 25, 2017

@aslushnikov

This comment has been minimized.

Show comment
Hide comment
@aslushnikov

aslushnikov Aug 27, 2017

Contributor

@aminjoharinia Does the npm install puppeteer throw an error for you? Do you have any HTTP proxy installed?

Contributor

aslushnikov commented Aug 27, 2017

@aminjoharinia Does the npm install puppeteer throw an error for you? Do you have any HTTP proxy installed?

@aminjoharinia

This comment has been minimized.

Show comment
Hide comment
@aminjoharinia

aminjoharinia Aug 27, 2017

@aslushnikov
No there is no error
I tested with different networks
At the same time , i installed Windows version and it's works fine but in raspberian it does not install browser

aminjoharinia commented Aug 27, 2017

@aslushnikov
No there is no error
I tested with different networks
At the same time , i installed Windows version and it's works fine but in raspberian it does not install browser

@zberhe

This comment has been minimized.

Show comment
Hide comment
@zberhe

zberhe Aug 28, 2017

I am also running into this issue AssertionError: Chromium revision is not downloaded. Run "npm install". I am running on Mac behind a corporate proxy. My .local-chromium directory is empty.

zberhe commented Aug 28, 2017

I am also running into this issue AssertionError: Chromium revision is not downloaded. Run "npm install". I am running on Mac behind a corporate proxy. My .local-chromium directory is empty.

@aminjoharinia

This comment has been minimized.

Show comment
Hide comment
@aminjoharinia

aminjoharinia Sep 1, 2017

after many attempts finally chromium downloaded but there is not any folder like .local-chromium in node modules/puppeteer
does it support linux armh ?
could i manually download the file and unzip it?
here is the error
i also download and install all dependces

/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 1: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: �ELF����: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 2: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: cannot open ��: No such file
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 3: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 4: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 5: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 6: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 7: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 8: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: Syntax error: ")" unexpected


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

(node:6293) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

aminjoharinia commented Sep 1, 2017

after many attempts finally chromium downloaded but there is not any folder like .local-chromium in node modules/puppeteer
does it support linux armh ?
could i manually download the file and unzip it?
here is the error
i also download and install all dependces

/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 1: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: �ELF����: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 2: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: cannot open ��: No such file
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 3: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 4: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 5: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 6: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 7: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: ��: not found
/home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: 8: /home/pi/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: Syntax error: ")" unexpected


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

(node:6293) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
@saghul

This comment has been minimized.

Show comment
Hide comment
@saghul

saghul Sep 2, 2017

Looks like the downloaded version is x86_64, not arm:

chrome: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

vs the one in raspbian:

chromium-browser: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped

saghul commented Sep 2, 2017

Looks like the downloaded version is x86_64, not arm:

chrome: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

vs the one in raspbian:

chromium-browser: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped
@saghul

This comment has been minimized.

Show comment
Hide comment
@saghul

saghul Sep 2, 2017

Also, it doesn't seem to work with the version in raspbian anyway:

(node:2069) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r497674
(node:2069) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

saghul commented Sep 2, 2017

Also, it doesn't seem to work with the version in raspbian anyway:

(node:2069) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r497674
(node:2069) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@Silur

This comment has been minimized.

Show comment
Hide comment
@Silur

Silur Sep 12, 2017

I tried to make a patch for utils/ChromiumDownloader.js but seems like there are no arm64 snapshots and it doesn't worth to only support 32bit arm :/
so my suggestion @saghul is to use browser.launch({executablePath: 'chromium'}) and set the env flag PUPPETEER_SKIP_CHROMIUM_DOWNLOAD

Silur commented Sep 12, 2017

I tried to make a patch for utils/ChromiumDownloader.js but seems like there are no arm64 snapshots and it doesn't worth to only support 32bit arm :/
so my suggestion @saghul is to use browser.launch({executablePath: 'chromium'}) and set the env flag PUPPETEER_SKIP_CHROMIUM_DOWNLOAD

@Brunocg

This comment has been minimized.

Show comment
Hide comment
@Brunocg

Brunocg Sep 12, 2017

Im going through the exactly same problem.

use browser.launch({executablePath: 'chromium'})

Didn't work. That's what I got.

events.js:182
throw er; // Unhandled 'error' event
^

Error: spawn chromium ENOENT
at _errnoException (util.js:1041:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:611:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3

I tried with browser.launch({executablePath: 'chromium-browser'}), but I got:

node:14008) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r497674

Brunocg commented Sep 12, 2017

Im going through the exactly same problem.

use browser.launch({executablePath: 'chromium'})

Didn't work. That's what I got.

events.js:182
throw er; // Unhandled 'error' event
^

Error: spawn chromium ENOENT
at _errnoException (util.js:1041:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:611:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3

I tried with browser.launch({executablePath: 'chromium-browser'}), but I got:

node:14008) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r497674

@Silur

This comment has been minimized.

Show comment
Hide comment
@Silur

Silur Sep 13, 2017

yes, seems like the working revision (499413) is not present anywhere on google storage api and the version mismatch causes the timeout
google pls upload some arm stuff?

Silur commented Sep 13, 2017

yes, seems like the working revision (499413) is not present anywhere on google storage api and the version mismatch causes the timeout
google pls upload some arm stuff?

@shoshomiga

This comment has been minimized.

Show comment
Hide comment
@shoshomiga

shoshomiga Sep 14, 2017

Doesn't seem like there's an easy way to get a recent enough chromium build for arm

shoshomiga commented Sep 14, 2017

Doesn't seem like there's an easy way to get a recent enough chromium build for arm

@krewx

This comment has been minimized.

Show comment
Hide comment
@krewx

krewx Sep 22, 2017

First i installed chromium using

sudo apt install chromium-browser

then i used browser.launch({executablePath: '/usr/bin/chromium-browser'}) but now the issue is the following

(node:4107) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!
bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file! errno=2
[4129:4129:0922/172003.955374:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)
[4117:4117:0922/172003.958248:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode.
[4117:4117:0922/172003.967038:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display

I don't know if this help anyone

krewx commented Sep 22, 2017

First i installed chromium using

sudo apt install chromium-browser

then i used browser.launch({executablePath: '/usr/bin/chromium-browser'}) but now the issue is the following

(node:4107) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!
bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file! errno=2
[4129:4129:0922/172003.955374:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)
[4117:4117:0922/172003.958248:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode.
[4117:4117:0922/172003.967038:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display

I don't know if this help anyone

@ak239

This comment has been minimized.

Show comment
Hide comment
@ak239

ak239 Sep 29, 2017

Member

Yesterday, I successfully run latest puppeteer on Raspbian. Let me go through all steps that I tried:

  1. just run puppeteer as is - npm install successfully got latest Chromium build for Linux, but on attempt to run it: ELF: not found. Ok, the reason - downloaded version is not arm one.
  2. apt-get install chromium-browser - I tried to use this Chromium by passing executablePath as launch argument but puppeeteer just freezes without any errors or exceptions, I think that chromium-browser version is too old.
  3. I cross compiled latest Chromium for arm using my linux workstation, upload this build to raspberry pi and it finally works.
    I'll upload this build somewhere later this week.
Member

ak239 commented Sep 29, 2017

Yesterday, I successfully run latest puppeteer on Raspbian. Let me go through all steps that I tried:

  1. just run puppeteer as is - npm install successfully got latest Chromium build for Linux, but on attempt to run it: ELF: not found. Ok, the reason - downloaded version is not arm one.
  2. apt-get install chromium-browser - I tried to use this Chromium by passing executablePath as launch argument but puppeeteer just freezes without any errors or exceptions, I think that chromium-browser version is too old.
  3. I cross compiled latest Chromium for arm using my linux workstation, upload this build to raspberry pi and it finally works.
    I'll upload this build somewhere later this week.
@Silur

This comment has been minimized.

Show comment
Hide comment
@Silur

Silur Sep 29, 2017

maybe upload it to some CDN and make a PR?

Silur commented Sep 29, 2017

maybe upload it to some CDN and make a PR?

@aminjoharinia

This comment has been minimized.

Show comment
Hide comment
@aminjoharinia

aminjoharinia Sep 30, 2017

@ak239 Great ! Please upload it faster to check it out
Thanks

aminjoharinia commented Sep 30, 2017

@ak239 Great ! Please upload it faster to check it out
Thanks

@ak239

This comment has been minimized.

Show comment
Hide comment
@ak239

ak239 Sep 30, 2017

Member

Ok. It's temporary solution, I hope that we'll make it more fancy soon.
By following link you can download chromium required for puppeteer in headless mode, download it, upload to raspberry pi, unpack it, install required dependency and run one of the puppeteer example to check that it works and please share your feedback!

Member

ak239 commented Sep 30, 2017

Ok. It's temporary solution, I hope that we'll make it more fancy soon.
By following link you can download chromium required for puppeteer in headless mode, download it, upload to raspberry pi, unpack it, install required dependency and run one of the puppeteer example to check that it works and please share your feedback!

@LeMoussel

This comment has been minimized.

Show comment
Hide comment
@LeMoussel

LeMoussel Sep 30, 2017

@ak239 Do you mean that sudo apt-get install chromium-browser was finally not be able to download the latest version? Can youn explain how to install recent Chrome browser for Pi?

LeMoussel commented Sep 30, 2017

@ak239 Do you mean that sudo apt-get install chromium-browser was finally not be able to download the latest version? Can youn explain how to install recent Chrome browser for Pi?

@rclai

This comment has been minimized.

Show comment
Hide comment
@rclai

rclai Sep 30, 2017

Is there no ARM build of Chrome? @ak239 are you able to type up instructions of how your compiled Chrome for ARM?

rclai commented Sep 30, 2017

Is there no ARM build of Chrome? @ak239 are you able to type up instructions of how your compiled Chrome for ARM?

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Oct 3, 2017

@ak239 your build is working fine here on a RPi2 on Raspbian, while the official build gave me the ELF error, so I assume there's no armv6 binary build of Chrome being downloaded.

silverwind commented Oct 3, 2017

@ak239 your build is working fine here on a RPi2 on Raspbian, while the official build gave me the ELF error, so I assume there's no armv6 binary build of Chrome being downloaded.

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Oct 3, 2017

@ak239 did another attempt, this time on a RPi3 (armv7) running Arch Linux ARM with no GUI libraries present (shell only). I had to install the following GUI-related libraries until I was able to run the chrome binary: pango libxcomposite libxss libxrandr gconf atk gtk3. After that, I was able to run the PDF and screenshot examples fine.

silverwind commented Oct 3, 2017

@ak239 did another attempt, this time on a RPi3 (armv7) running Arch Linux ARM with no GUI libraries present (shell only). I had to install the following GUI-related libraries until I was able to run the chrome binary: pango libxcomposite libxss libxrandr gconf atk gtk3. After that, I was able to run the PDF and screenshot examples fine.

@ak239

This comment has been minimized.

Show comment
Hide comment
@ak239

ak239 Oct 3, 2017

Member

Thanks a lot!

I build Chromium for arm using recipe 2 from here.

Before start I have Chromium checkout for regular Linux build, I added target_cpu = "arm" to gn flags, run following code and build using ninja.
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm

I don't have any estimations when we'll get arm build support as part of npm install but we have it in our list.

Member

ak239 commented Oct 3, 2017

Thanks a lot!

I build Chromium for arm using recipe 2 from here.

Before start I have Chromium checkout for regular Linux build, I added target_cpu = "arm" to gn flags, run following code and build using ninja.
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm

I don't have any estimations when we'll get arm build support as part of npm install but we have it in our list.

@aminjoharinia

This comment has been minimized.

Show comment
Hide comment
@aminjoharinia

aminjoharinia Oct 4, 2017

Hi
i got this error
(node:2323) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: spawn EACCES
(node:2323) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

aminjoharinia commented Oct 4, 2017

Hi
i got this error
(node:2323) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: spawn EACCES
(node:2323) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@aminjoharinia

This comment has been minimized.

Show comment
Hide comment
@aminjoharinia

aminjoharinia Oct 5, 2017

I found that in raspbian stretch , chromium version 60 is preinstalled
and chromium-headless works with command line
chromium-browser --headless --disable-gpu --print-to-pdf https://www.google.com
how could i use built in chromium for puppeteer?
@ak239 @silverwind

aminjoharinia commented Oct 5, 2017

I found that in raspbian stretch , chromium version 60 is preinstalled
and chromium-headless works with command line
chromium-browser --headless --disable-gpu --print-to-pdf https://www.google.com
how could i use built in chromium for puppeteer?
@ak239 @silverwind

@jindongh

This comment has been minimized.

Show comment
Hide comment
@jindongh

jindongh Oct 24, 2017

wget http://launchpadlibrarian.net/341807203/chromium-browser_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
wget http://launchpadlibrarian.net/341807199/chromium-codecs-ffmpeg-extra_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
sudo dpkg -i chromium-browser_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
sudo dpkg -i chromium-codecs-ffmpeg-extra_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
cat > test.js <<EOF
const puppeteer = require('puppeteer');
(async () => {
        const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser'});
        const page = await browser.newPage();
        await page.goto('https://example.com');
        await page.screenshot({path: 'example.png'});
        await browser.close();
})();
EOF
node test.js

jindongh commented Oct 24, 2017

wget http://launchpadlibrarian.net/341807203/chromium-browser_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
wget http://launchpadlibrarian.net/341807199/chromium-codecs-ffmpeg-extra_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
sudo dpkg -i chromium-browser_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
sudo dpkg -i chromium-codecs-ffmpeg-extra_62.0.3202.62-0ubuntu0.14.04.1204_armhf.deb
cat > test.js <<EOF
const puppeteer = require('puppeteer');
(async () => {
        const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser'});
        const page = await browser.newPage();
        await page.goto('https://example.com');
        await page.screenshot({path: 'example.png'});
        await browser.close();
})();
EOF
node test.js
@Brunocg

This comment has been minimized.

Show comment
Hide comment
@Brunocg

Brunocg Oct 26, 2017

@jindongh Do you have any arm build of the latest version from chromium-dev channel? Last week it was added a new domain called HeadlessExperimental which Im really interested on testing, although Im not sure whether it's working or not.

Brunocg commented Oct 26, 2017

@jindongh Do you have any arm build of the latest version from chromium-dev channel? Last week it was added a new domain called HeadlessExperimental which Im really interested on testing, although Im not sure whether it's working or not.

@rezaxdi

This comment has been minimized.

Show comment
Hide comment
@rezaxdi

rezaxdi Nov 27, 2017

@jindongh I still get a freezing response and nothing happens. I do not have any problem using chromeless but puppeteer has a lot more features.

rezaxdi commented Nov 27, 2017

@jindongh I still get a freezing response and nothing happens. I do not have any problem using chromeless but puppeteer has a lot more features.

@jmg1138

This comment has been minimized.

Show comment
Hide comment
@jmg1138

jmg1138 Nov 30, 2017

I setup remote debugging to my raspberry pi and tried to play with this behavior for a while (I am no expert at this, just curious and want to learn more). When I go step by step I get to the newPage() method in Browser.js, around line 100, where it has console.assert(await target._initializedPromise, 'Failed to create target for page'); (note that it doesn't log that 'Failed to create ...' message to the console). If I step once more after that line it takes me to bootstrap_node.js in the setupGlobalConsole() method, at the line return wrappedConsole. After that it just does nothing. If I change line 100 to just await target._initializedPromise then it stops there since it doesn't need the console.

jmg1138 commented Nov 30, 2017

I setup remote debugging to my raspberry pi and tried to play with this behavior for a while (I am no expert at this, just curious and want to learn more). When I go step by step I get to the newPage() method in Browser.js, around line 100, where it has console.assert(await target._initializedPromise, 'Failed to create target for page'); (note that it doesn't log that 'Failed to create ...' message to the console). If I step once more after that line it takes me to bootstrap_node.js in the setupGlobalConsole() method, at the line return wrappedConsole. After that it just does nothing. If I change line 100 to just await target._initializedPromise then it stops there since it doesn't need the console.

@torinnguyen

This comment has been minimized.

Show comment
Hide comment
@torinnguyen

torinnguyen Dec 6, 2017

@jindongh comment works, but only with puppeteer v0.10.0

This init code works:
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox', '--headless', '--disable-gpu'], executablePath: '/usr/bin/chromium-browser'});
Here's the list of configs I have tried on Raspberry Pi

puppeteer v0.10.0, /usr/bin/chromium-browser -> works
puppeteer v0.12.0, /usr/bin/chromium-browser -> NOT working, freeze at newPage
puppeteer v0.13.0, /usr/bin/chromium-browser -> NOT working, freeze at newPage

puppeteer v0.10.0, chrome in /node-modules -> NOT working, Error: Failed to launch chrome!
puppeteer v0.12.0, chrome in /node-modules -> NOT working, Error: Failed to launch chrome!
puppeteer v0.13.0, chrome in /node-modules -> NOT working, Error: Failed to launch chrome!
(all Debian dependencies are installed)

node v8.9.1
chromium-browser_62 (downloaded with @jindongh comment)
Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux

torinnguyen commented Dec 6, 2017

@jindongh comment works, but only with puppeteer v0.10.0

This init code works:
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox', '--headless', '--disable-gpu'], executablePath: '/usr/bin/chromium-browser'});
Here's the list of configs I have tried on Raspberry Pi

puppeteer v0.10.0, /usr/bin/chromium-browser -> works
puppeteer v0.12.0, /usr/bin/chromium-browser -> NOT working, freeze at newPage
puppeteer v0.13.0, /usr/bin/chromium-browser -> NOT working, freeze at newPage

puppeteer v0.10.0, chrome in /node-modules -> NOT working, Error: Failed to launch chrome!
puppeteer v0.12.0, chrome in /node-modules -> NOT working, Error: Failed to launch chrome!
puppeteer v0.13.0, chrome in /node-modules -> NOT working, Error: Failed to launch chrome!
(all Debian dependencies are installed)

node v8.9.1
chromium-browser_62 (downloaded with @jindongh comment)
Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux

@grebmeg

This comment has been minimized.

Show comment
Hide comment
@grebmeg

grebmeg Dec 7, 2017

@torinnguyen, I have the same issue...

grebmeg commented Dec 7, 2017

@torinnguyen, I have the same issue...

@lijiarui lijiarui referenced this issue Dec 13, 2017

Closed

npm install fail #8

@felixgalindo

This comment has been minimized.

Show comment
Hide comment
@felixgalindo

felixgalindo Dec 16, 2017

@ak239 Is there a build for the pi zero? Seems to only work for me on Pi3 and not the zero.

felixgalindo commented Dec 16, 2017

@ak239 Is there a build for the pi zero? Seems to only work for me on Pi3 and not the zero.

@puppeteer701

This comment has been minimized.

Show comment
Hide comment
@puppeteer701

puppeteer701 Jan 3, 2018

@ak239 I have the same issue.

puppeteer701 commented Jan 3, 2018

@ak239 I have the same issue.

@alexarvanitidismrf

This comment has been minimized.

Show comment
Hide comment
@alexarvanitidismrf

alexarvanitidismrf Jan 8, 2018

On OSX I solved the problem doing the following:

  1. Add to the code
const { CHROME_BIN } = process.env;
const browser = await puppeteer.launch(Object.assign({}, PUPPETEER_CONFIG, { executablePath: CHROME_BIN }));
  1. brew install -g puppeteer, which downloaded the specific compatible version of Chromium on ~/.npm-packages/lib/node_modules/puppeteer/.local-chromium/mac-508693/chrome-mac/Chromium.app/Contents/MacOS/Chromium, I then set CHROME_BIN='.npm-packages/lib/node_modules/puppeteer/.local-chromium/mac-508693/chrome-mac/Chromium.app/Contents/MacOS/Chromium' on my ~/.bashrc

and it worked!

alexarvanitidismrf commented Jan 8, 2018

On OSX I solved the problem doing the following:

  1. Add to the code
const { CHROME_BIN } = process.env;
const browser = await puppeteer.launch(Object.assign({}, PUPPETEER_CONFIG, { executablePath: CHROME_BIN }));
  1. brew install -g puppeteer, which downloaded the specific compatible version of Chromium on ~/.npm-packages/lib/node_modules/puppeteer/.local-chromium/mac-508693/chrome-mac/Chromium.app/Contents/MacOS/Chromium, I then set CHROME_BIN='.npm-packages/lib/node_modules/puppeteer/.local-chromium/mac-508693/chrome-mac/Chromium.app/Contents/MacOS/Chromium' on my ~/.bashrc

and it worked!

@Austinb

This comment has been minimized.

Show comment
Hide comment
@Austinb

Austinb Jan 24, 2018

@torinnguyen and others using Raspberry Pi and trying to get screen captures or make pdfs here is what I was able to make work. The issue is the version provided by the latest version from Debian Stretch is 63.0.x which is outdated compared to where this library currently is. So the solution is to manually update the Pi's version of Chromium so it will work with the latest version of this library. The version downloaded into the node_modules library will not work due to it not having support for Arm (as previously mentioned in other comments and issues). As of puppeteer v1.0.0 you will get ELF errors when trying to launch that version.

First step is to look at the release notes and see what version of chrome is supported for the release of this library. For version 1.0.0 the supported Chromium version is 65. For version 0.13.0 the supported version is 64 and so on down. Check the releases for the versions supported.

Next step is to find the version of Chromium for your Pi that is newer than the stable 63, which is not exactly straight forward. I have only tested downloading the files directly from the chromium-team site on launchpad and installing them. They also have instructions on how to add the PPA to your system but I have not ventured that far yet. As of right now if you want to use the latest version 65 (v1.0.0) you will need to go to the "dev" section. The "beta" section is Chrome 64 (v0.12.0) and stable is 63 (v0.11.0) which you should have if you have updated your version of debian. When you go to the section you want you will need to click on View package details, This will give you a list of the different ubuntu versions available. Click on the one you want (I used 14 for my testing) and then scroll down to the link for armhf and click it. This will give you all the files available for that version of ubuntu and Chromium that will run on the Pi.

For which ever version of Chromium you want to install the idea is the same just replace the example here with the files you downloaded. Also you need to install the chromium-codecs-ffmpeg package first before trying to install the actual chromium-browser package. This example is for the dev version, Chromium 65. I used the ubuntu 14 (Trusty) versions and had no issues creating images or pdfs.

wget https://launchpad.net/~chromium-team/+archive/ubuntu/dev/+build/14258758/+files/chromium-codecs-ffmpeg_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb

wget https://launchpad.net/~chromium-team/+archive/ubuntu/dev/+build/14258758/+files/chromium-browser_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-browser_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb

I used the following code in test.js (thanks @jindongh) to make sure the installed version would launch without issue, take a screen capture and save it as an image.

const puppeteer = require('puppeteer');
(async () => {
        const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser'});
        const page = await browser.newPage();
        await page.goto('https://example.com');
        await page.screenshot({path: 'example.png'});
        await browser.close();
})();

You just run it with node test.js and it should create a example.png file with a screen capture of example.com. If you see no errors check the example.png and there should be an image of the web page. If so then that version of puppeteer is working properly.

If anyone tests out the PPA installed version please let me/us know how it goes and if it is a better solution. I did not want to do it to prevent future "dev" updates from chromium breaking something in production. My production version is still using the stable version 63 of the chromium-l10n library that comes from debian. It seems like the version doesn't matter too much as the browser launches fine but it would be nice to get an updated version of that library to match the installed version.

Edit: Changed to ubuntu 14 (Trusty) as that is the normal version used for my PI & typo in deb command.

Austinb commented Jan 24, 2018

@torinnguyen and others using Raspberry Pi and trying to get screen captures or make pdfs here is what I was able to make work. The issue is the version provided by the latest version from Debian Stretch is 63.0.x which is outdated compared to where this library currently is. So the solution is to manually update the Pi's version of Chromium so it will work with the latest version of this library. The version downloaded into the node_modules library will not work due to it not having support for Arm (as previously mentioned in other comments and issues). As of puppeteer v1.0.0 you will get ELF errors when trying to launch that version.

First step is to look at the release notes and see what version of chrome is supported for the release of this library. For version 1.0.0 the supported Chromium version is 65. For version 0.13.0 the supported version is 64 and so on down. Check the releases for the versions supported.

Next step is to find the version of Chromium for your Pi that is newer than the stable 63, which is not exactly straight forward. I have only tested downloading the files directly from the chromium-team site on launchpad and installing them. They also have instructions on how to add the PPA to your system but I have not ventured that far yet. As of right now if you want to use the latest version 65 (v1.0.0) you will need to go to the "dev" section. The "beta" section is Chrome 64 (v0.12.0) and stable is 63 (v0.11.0) which you should have if you have updated your version of debian. When you go to the section you want you will need to click on View package details, This will give you a list of the different ubuntu versions available. Click on the one you want (I used 14 for my testing) and then scroll down to the link for armhf and click it. This will give you all the files available for that version of ubuntu and Chromium that will run on the Pi.

For which ever version of Chromium you want to install the idea is the same just replace the example here with the files you downloaded. Also you need to install the chromium-codecs-ffmpeg package first before trying to install the actual chromium-browser package. This example is for the dev version, Chromium 65. I used the ubuntu 14 (Trusty) versions and had no issues creating images or pdfs.

wget https://launchpad.net/~chromium-team/+archive/ubuntu/dev/+build/14258758/+files/chromium-codecs-ffmpeg_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb

wget https://launchpad.net/~chromium-team/+archive/ubuntu/dev/+build/14258758/+files/chromium-browser_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-browser_65.0.3322.3-0ubuntu0.14.04.1_armhf.deb

I used the following code in test.js (thanks @jindongh) to make sure the installed version would launch without issue, take a screen capture and save it as an image.

const puppeteer = require('puppeteer');
(async () => {
        const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser'});
        const page = await browser.newPage();
        await page.goto('https://example.com');
        await page.screenshot({path: 'example.png'});
        await browser.close();
})();

You just run it with node test.js and it should create a example.png file with a screen capture of example.com. If you see no errors check the example.png and there should be an image of the web page. If so then that version of puppeteer is working properly.

If anyone tests out the PPA installed version please let me/us know how it goes and if it is a better solution. I did not want to do it to prevent future "dev" updates from chromium breaking something in production. My production version is still using the stable version 63 of the chromium-l10n library that comes from debian. It seems like the version doesn't matter too much as the browser launches fine but it would be nice to get an updated version of that library to match the installed version.

Edit: Changed to ubuntu 14 (Trusty) as that is the normal version used for my PI & typo in deb command.

@jor3l

This comment has been minimized.

Show comment
Hide comment
@jor3l

jor3l Feb 19, 2018

This worked for me (updated @Austinb with the now beta channel):

wget https://launchpad.net/~chromium-team/+archive/ubuntu/beta/+build/14381587/+files/chromium-codecs-ffmpeg_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb
wget https://launchpad.net/~chromium-team/+archive/ubuntu/beta/+build/14381587/+files/chromium-browser_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb; sudo dpkg -i chromium-browser_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb

jor3l commented Feb 19, 2018

This worked for me (updated @Austinb with the now beta channel):

wget https://launchpad.net/~chromium-team/+archive/ubuntu/beta/+build/14381587/+files/chromium-codecs-ffmpeg_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb
wget https://launchpad.net/~chromium-team/+archive/ubuntu/beta/+build/14381587/+files/chromium-browser_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb; sudo dpkg -i chromium-browser_65.0.3325.88-0ubuntu0.17.10.1_armhf.deb
@vinaynb

This comment has been minimized.

Show comment
Hide comment
@vinaynb

vinaynb Mar 28, 2018

@Austinb's solution works for me too with puppeteer v1.13 and chromium 65 from dev channel !

vinaynb commented Mar 28, 2018

@Austinb's solution works for me too with puppeteer v1.13 and chromium 65 from dev channel !

@lems111

This comment has been minimized.

Show comment
Hide comment
@lems111

lems111 Mar 29, 2018

Adding latest chrome version to stay inline with puppeteer v1.2.0 release:
wget https://launchpad.net/~chromium-team/+archive/ubuntu/dev/+build/14506458/+files/chromium-codecs-ffmpeg_67.0.3381.0-0ubuntu1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_67.0.3381.0-0ubuntu1_armhf.deb

lems111 commented Mar 29, 2018

Adding latest chrome version to stay inline with puppeteer v1.2.0 release:
wget https://launchpad.net/~chromium-team/+archive/ubuntu/dev/+build/14506458/+files/chromium-codecs-ffmpeg_67.0.3381.0-0ubuntu1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_67.0.3381.0-0ubuntu1_armhf.deb

@scissorsneedfoodtoo

This comment has been minimized.

Show comment
Hide comment
@scissorsneedfoodtoo

scissorsneedfoodtoo Mar 29, 2018

These are slightly updated versions of the links that @jor3l posted:

wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/14482955/+files/chromium-codecs-ffmpeg_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/14482955/+files/chromium-browser_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-browser_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb

scissorsneedfoodtoo commented Mar 29, 2018

These are slightly updated versions of the links that @jor3l posted:

wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/14482955/+files/chromium-codecs-ffmpeg_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-codecs-ffmpeg_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/14482955/+files/chromium-browser_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb; sudo dpkg -i chromium-browser_65.0.3325.181-0ubuntu0.14.04.1_armhf.deb
@Austinb

This comment has been minimized.

Show comment
Hide comment
@Austinb

Austinb Mar 29, 2018

Since this issue has gotten some action in the last week it appears that 65 maybe the last version for the 14.x series. Version 66 is available in the beta for 16 and 17 now so its possible if you are running 14 you may run into compatibility issues until the PI's version is updated to the 16 LTS base. You maybe able to use the non Ubuntu specific version like 67.0.3381.0-0ubuntu2 but I have not tested it.

I still have not tested using the PPA so that your version is updated without having to find the files. Beware this may break your system!

sudo add-apt-repository ppa:chromium-team/beta
sudo apt-get update

There is also a I10n library available for 65 which should probably be installed as well if you have language issues with the 63 version installed by default.

Austinb commented Mar 29, 2018

Since this issue has gotten some action in the last week it appears that 65 maybe the last version for the 14.x series. Version 66 is available in the beta for 16 and 17 now so its possible if you are running 14 you may run into compatibility issues until the PI's version is updated to the 16 LTS base. You maybe able to use the non Ubuntu specific version like 67.0.3381.0-0ubuntu2 but I have not tested it.

I still have not tested using the PPA so that your version is updated without having to find the files. Beware this may break your system!

sudo add-apt-repository ppa:chromium-team/beta
sudo apt-get update

There is also a I10n library available for 65 which should probably be installed as well if you have language issues with the 63 version installed by default.

@napolux

This comment has been minimized.

Show comment
Hide comment
@napolux

napolux Apr 8, 2018

Any update on a fix for this? I'm in a "dependency hell" and I cannot make it run on Raspbian Stretch.

napolux commented Apr 8, 2018

Any update on a fix for this? I'm in a "dependency hell" and I cannot make it run on Raspbian Stretch.

@vinaynb

This comment has been minimized.

Show comment
Hide comment
@vinaynb

vinaynb Apr 9, 2018

@napolux instead of using the default chromium v63 that comes with raspbian stretch, use v65 and you should be good to go for now.

vinaynb commented Apr 9, 2018

@napolux instead of using the default chromium v63 that comes with raspbian stretch, use v65 and you should be good to go for now.

@napolux

This comment has been minimized.

Show comment
Hide comment
@napolux

napolux Apr 9, 2018

@vinaynb Looks like I can't install version 65. Any idea?

sudo apt-cache policy chromium-browser
chromium-browser:
  Installed: (none)
  Candidate: 60.0.3112.89-0ubuntu0.14.04.1.1010+1
  Version table:
     60.0.3112.89-0ubuntu0.14.04.1.1010+1 500
        500 http://archive.raspberrypi.org/debian stretch/main armhf Packages

napolux commented Apr 9, 2018

@vinaynb Looks like I can't install version 65. Any idea?

sudo apt-cache policy chromium-browser
chromium-browser:
  Installed: (none)
  Candidate: 60.0.3112.89-0ubuntu0.14.04.1.1010+1
  Version table:
     60.0.3112.89-0ubuntu0.14.04.1.1010+1 500
        500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
@vinaynb

This comment has been minimized.

Show comment
Hide comment
@vinaynb

vinaynb Apr 9, 2018

It won't be available through apt-get, you will need to download and install the new version manually. See @scissorsneedfoodtoo 's comment above for commands to do that. #550 (comment)

vinaynb commented Apr 9, 2018

It won't be available through apt-get, you will need to download and install the new version manually. See @scissorsneedfoodtoo 's comment above for commands to do that. #550 (comment)

@scissorsneedfoodtoo

This comment has been minimized.

Show comment
Hide comment
@scissorsneedfoodtoo

scissorsneedfoodtoo Apr 9, 2018

Also, be sure to change the runtime settings when launching the browser. Once you download the new version of Chromium with wget, change const browser = await puppeteer.launch(); to const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser'});.

Check #550 (comment) for more details.

scissorsneedfoodtoo commented Apr 9, 2018

Also, be sure to change the runtime settings when launching the browser. Once you download the new version of Chromium with wget, change const browser = await puppeteer.launch(); to const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser'});.

Check #550 (comment) for more details.

@losalamosal

This comment has been minimized.

Show comment
Hide comment
@losalamosal

losalamosal Jun 13, 2018

For the benefit of others that may arrive here looking for answers...

Upgraded Raspberry Pi 3 to stretch. That installed this version of chromium-browser:

Chromium 65.0.3325.181 Built on Raspbian , running on Raspbian 9.4

Using puppeteer@1.5.0, this version of chromium-browser works for my use case (fast-cli@2.2.0). I did modify puppeteer.launch arguments per #550 (comment).

losalamosal commented Jun 13, 2018

For the benefit of others that may arrive here looking for answers...

Upgraded Raspberry Pi 3 to stretch. That installed this version of chromium-browser:

Chromium 65.0.3325.181 Built on Raspbian , running on Raspbian 9.4

Using puppeteer@1.5.0, this version of chromium-browser works for my use case (fast-cli@2.2.0). I did modify puppeteer.launch arguments per #550 (comment).

losalamosal added a commit to losalamosal/fast-cli that referenced this issue Jun 14, 2018

Modified puppeteer launch parameters
These parameters have been shown to work (by me) with ARM Raspberry Pi and Chrome 65.

These arguments are sourced from GoogleChrome/puppeteer#550 (comment)
@brthor

This comment has been minimized.

Show comment
Hide comment
@brthor

brthor Jun 19, 2018

For anyone here working on Raspbery Pi Zero, the above instructions will not work because the chromium-team arm binary is for armv7, which the pi 3 has (not previous versions).

After trying all night, all I could get was:

$ chromium-browser --version
Illegal Instruction

The solution is just to use the chromium browser in the default repositories (version 65 on stretch raspian).

apt-get update && apt-get install chromium-browser

brthor commented Jun 19, 2018

For anyone here working on Raspbery Pi Zero, the above instructions will not work because the chromium-team arm binary is for armv7, which the pi 3 has (not previous versions).

After trying all night, all I could get was:

$ chromium-browser --version
Illegal Instruction

The solution is just to use the chromium browser in the default repositories (version 65 on stretch raspian).

apt-get update && apt-get install chromium-browser
@devxpy

This comment has been minimized.

Show comment
Hide comment
@devxpy

devxpy Jul 24, 2018

@Austinb
Installing the ppa doesn't work for me.

Here is the traceback I get -

$ apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:chromium-team/stable
Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:2 http://archive.raspbian.org jessie InRelease [14.9 kB]
Get:3 http://archive.raspberrypi.org jessie/main armhf Packages [171 kB]
Get:4 http://archive.raspbian.org jessie/main armhf Packages [13.3 MB]
Get:5 http://archive.raspbian.org jessie/contrib armhf Packages [49.5 kB]
Get:6 http://archive.raspbian.org jessie/non-free armhf Packages [101 kB]
Get:7 http://archive.raspbian.org jessie/rpi armhf Packages [1297 B]
Get:8 http://archive.raspbian.org jessie/firmware armhf Packages [1208 B]
Fetched 13.7 MB in 1min 42s (134 kB/s)




The following extra packages will be installed:
  apt-utils dh-python gir1.2-glib-2.0 iso-codes libapt-inst1.5
  libgirepository-1.0-1 libmpdec2 libpython3-stdlib libpython3.4-minimal
  libpython3.4-stdlib lsb-release python-apt-common python3 python3-apt
  python3-dbus python3-gi python3-minimal python3-software-properties
  python3.4 python3.4-minimal unattended-upgrades
Suggested packages:
  isoquery lsb python3-doc python3-tk python3-venv python3-apt-dbg
  python-apt-doc python-dbus-doc python3-dbus-dbg python3.4-venv python3.4-doc
  binfmt-support bsd-mailx mail-transport-agent
The following NEW packages will be installed:
  apt-utils dh-python gir1.2-glib-2.0 iso-codes libapt-inst1.5
  libgirepository-1.0-1 libmpdec2 libpython3-stdlib libpython3.4-minimal
  libpython3.4-stdlib lsb-release python-apt-common python3 python3-apt
  python3-dbus python3-gi python3-minimal python3-software-properties
  python3.4 python3.4-minimal software-properties-common unattended-upgrades
0 upgraded, 22 newly installed, 0 to remove and 14 not upgraded.
Need to get 8326 kB of archives.
After this operation, 39.1 MB of additional disk space will be used.
Get:1 http://archive.raspbian.org/raspbian/ jessie/main libapt-inst1.5 armhf 1.0.9.8.4 [166 kB]
Get:2 http://archive.raspbian.org/raspbian/ jessie/main libmpdec2 armhf 2.4.1-1 [65.8 kB]
Get:3 http://archive.raspbian.org/raspbian/ jessie/main libpython3.4-minimal armhf 3.4.2-1 [483 kB]
Get:4 http://archive.raspbian.org/raspbian/ jessie/main libpython3.4-stdlib armhf 3.4.2-1 [2011 kB]
Get:5 http://archive.raspbian.org/raspbian/ jessie/main python3.4-minimal armhf 3.4.2-1 [1355 kB]
Get:6 http://archive.raspbian.org/raspbian/ jessie/main apt-utils armhf 1.0.9.8.4 [353 kB]
Get:7 http://archive.raspbian.org/raspbian/ jessie/main python3.4 armhf 3.4.2-1 [204 kB]
Get:8 http://archive.raspbian.org/raspbian/ jessie/main python3-minimal armhf 3.4.2-2 [34.7 kB]
Get:9 http://archive.raspbian.org/raspbian/ jessie/main libpython3-stdlib armhf 3.4.2-2 [18.1 kB]
Get:10 http://archive.raspbian.org/raspbian/ jessie/main python3 armhf 3.4.2-2 [21.2 kB]
Get:11 http://archive.raspbian.org/raspbian/ jessie/main dh-python all 1.20141111-2 [66.4 kB]
Get:12 http://archive.raspbian.org/raspbian/ jessie/main libgirepository-1.0-1 armhf 1.42.0-2.2 [82.9 kB]
Get:13 http://archive.raspbian.org/raspbian/ jessie/main gir1.2-glib-2.0 armhf 1.42.0-2.2 [141 kB]
Get:14 http://archive.raspbian.org/raspbian/ jessie/main iso-codes all 3.57-1 [2265 kB]
Get:15 http://archive.raspbian.org/raspbian/ jessie/main lsb-release all 4.1+Debian13+rpi1+nmu1 [26.7 kB]
Get:16 http://archive.raspbian.org/raspbian/ jessie/main python-apt-common all 0.9.3.12 [89.9 kB]
Get:17 http://archive.raspbian.org/raspbian/ jessie/main python3-apt armhf 0.9.3.12 [154 kB]
Get:18 http://archive.raspbian.org/raspbian/ jessie/main python3-dbus armhf 1.2.0-2+b1 [186 kB]
Get:19 http://archive.raspbian.org/raspbian/ jessie/main python3-gi armhf 3.14.0-1 [436 kB]
Get:20 http://archive.raspbian.org/raspbian/ jessie/main unattended-upgrades all 0.81+rpi1 [45.7 kB]
Get:21 http://archive.raspbian.org/raspbian/ jessie/main python3-software-properties all 0.92.25debian1 [41.4 kB]
Get:22 http://archive.raspbian.org/raspbian/ jessie/main software-properties-common all 0.92.25debian1 [79.3 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 8326 kB in 59s (141 kB/s)

(Reading database ... 18646 files and directories currently installed.)


Selecting previously unselected package libmpdec2:armhf.


Selecting previously unselected package libpython3.4-minimal:armhf.


Selecting previously unselected package libpython3.4-stdlib:armhf.


Selecting previously unselected package python3.4-minimal.
Preparing to unpack .../python3.4-minimal_3.4.2-1_armhf.deb ...
Unpacking python3.4-minimal (3.4.2-1) ...
Selecting previously unselected package apt-utils.


Selecting previously unselected package python3.4.


Selecting previously unselected package python3-minimal.


Selecting previously unselected package libpython3-stdlib:armhf.


Selecting previously unselected package python3.


Selecting previously unselected package dh-python.


Selecting previously unselected package libgirepository-1.0-1:armhf.


Selecting previously unselected package gir1.2-glib-2.0:armhf.


Selecting previously unselected package iso-codes.

Unpacking iso-codes (3.57-1) ...
Selecting previously unselected package lsb-release.


Selecting previously unselected package python-apt-common.


Selecting previously unselected package python3-apt.




Unpacking python3-dbus (1.2.0-2+b1) ...
Selecting previously unselected package python3-gi.

Unpacking python3-gi (3.14.0-1) ...
Selecting previously unselected package unattended-upgrades.
Preparing to unpack .../unattended-upgrades_0.81+rpi1_all.deb ...
Unpacking unattended-upgrades (0.81+rpi1) ...
Selecting previously unselected package python3-software-properties.


Selecting previously unselected package software-properties-common.





Setting up libmpdec2:armhf (2.4.1-1) ...

Setting up libpython3.4-stdlib:armhf (3.4.2-1) ...
Setting up python3.4-minimal (3.4.2-1) ...
Setting up apt-utils (1.0.9.8.4) ...
Setting up python3.4 (3.4.2-1) ...
Setting up python3-minimal (3.4.2-2) ...
Setting up libpython3-stdlib:armhf (3.4.2-2) ...
Setting up libgirepository-1.0-1:armhf (1.42.0-2.2) ...
Setting up gir1.2-glib-2.0:armhf (1.42.0-2.2) ...
Setting up iso-codes (3.57-1) ...
Setting up lsb-release (4.1+Debian13+rpi1+nmu1) ...
Setting up python-apt-common (0.9.3.12) ...





Setting up unattended-upgrades (0.81+rpi1) ...





Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 167, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 105, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 595, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/jessie

devxpy commented Jul 24, 2018

@Austinb
Installing the ppa doesn't work for me.

Here is the traceback I get -

$ apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:chromium-team/stable
Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:2 http://archive.raspbian.org jessie InRelease [14.9 kB]
Get:3 http://archive.raspberrypi.org jessie/main armhf Packages [171 kB]
Get:4 http://archive.raspbian.org jessie/main armhf Packages [13.3 MB]
Get:5 http://archive.raspbian.org jessie/contrib armhf Packages [49.5 kB]
Get:6 http://archive.raspbian.org jessie/non-free armhf Packages [101 kB]
Get:7 http://archive.raspbian.org jessie/rpi armhf Packages [1297 B]
Get:8 http://archive.raspbian.org jessie/firmware armhf Packages [1208 B]
Fetched 13.7 MB in 1min 42s (134 kB/s)




The following extra packages will be installed:
  apt-utils dh-python gir1.2-glib-2.0 iso-codes libapt-inst1.5
  libgirepository-1.0-1 libmpdec2 libpython3-stdlib libpython3.4-minimal
  libpython3.4-stdlib lsb-release python-apt-common python3 python3-apt
  python3-dbus python3-gi python3-minimal python3-software-properties
  python3.4 python3.4-minimal unattended-upgrades
Suggested packages:
  isoquery lsb python3-doc python3-tk python3-venv python3-apt-dbg
  python-apt-doc python-dbus-doc python3-dbus-dbg python3.4-venv python3.4-doc
  binfmt-support bsd-mailx mail-transport-agent
The following NEW packages will be installed:
  apt-utils dh-python gir1.2-glib-2.0 iso-codes libapt-inst1.5
  libgirepository-1.0-1 libmpdec2 libpython3-stdlib libpython3.4-minimal
  libpython3.4-stdlib lsb-release python-apt-common python3 python3-apt
  python3-dbus python3-gi python3-minimal python3-software-properties
  python3.4 python3.4-minimal software-properties-common unattended-upgrades
0 upgraded, 22 newly installed, 0 to remove and 14 not upgraded.
Need to get 8326 kB of archives.
After this operation, 39.1 MB of additional disk space will be used.
Get:1 http://archive.raspbian.org/raspbian/ jessie/main libapt-inst1.5 armhf 1.0.9.8.4 [166 kB]
Get:2 http://archive.raspbian.org/raspbian/ jessie/main libmpdec2 armhf 2.4.1-1 [65.8 kB]
Get:3 http://archive.raspbian.org/raspbian/ jessie/main libpython3.4-minimal armhf 3.4.2-1 [483 kB]
Get:4 http://archive.raspbian.org/raspbian/ jessie/main libpython3.4-stdlib armhf 3.4.2-1 [2011 kB]
Get:5 http://archive.raspbian.org/raspbian/ jessie/main python3.4-minimal armhf 3.4.2-1 [1355 kB]
Get:6 http://archive.raspbian.org/raspbian/ jessie/main apt-utils armhf 1.0.9.8.4 [353 kB]
Get:7 http://archive.raspbian.org/raspbian/ jessie/main python3.4 armhf 3.4.2-1 [204 kB]
Get:8 http://archive.raspbian.org/raspbian/ jessie/main python3-minimal armhf 3.4.2-2 [34.7 kB]
Get:9 http://archive.raspbian.org/raspbian/ jessie/main libpython3-stdlib armhf 3.4.2-2 [18.1 kB]
Get:10 http://archive.raspbian.org/raspbian/ jessie/main python3 armhf 3.4.2-2 [21.2 kB]
Get:11 http://archive.raspbian.org/raspbian/ jessie/main dh-python all 1.20141111-2 [66.4 kB]
Get:12 http://archive.raspbian.org/raspbian/ jessie/main libgirepository-1.0-1 armhf 1.42.0-2.2 [82.9 kB]
Get:13 http://archive.raspbian.org/raspbian/ jessie/main gir1.2-glib-2.0 armhf 1.42.0-2.2 [141 kB]
Get:14 http://archive.raspbian.org/raspbian/ jessie/main iso-codes all 3.57-1 [2265 kB]
Get:15 http://archive.raspbian.org/raspbian/ jessie/main lsb-release all 4.1+Debian13+rpi1+nmu1 [26.7 kB]
Get:16 http://archive.raspbian.org/raspbian/ jessie/main python-apt-common all 0.9.3.12 [89.9 kB]
Get:17 http://archive.raspbian.org/raspbian/ jessie/main python3-apt armhf 0.9.3.12 [154 kB]
Get:18 http://archive.raspbian.org/raspbian/ jessie/main python3-dbus armhf 1.2.0-2+b1 [186 kB]
Get:19 http://archive.raspbian.org/raspbian/ jessie/main python3-gi armhf 3.14.0-1 [436 kB]
Get:20 http://archive.raspbian.org/raspbian/ jessie/main unattended-upgrades all 0.81+rpi1 [45.7 kB]
Get:21 http://archive.raspbian.org/raspbian/ jessie/main python3-software-properties all 0.92.25debian1 [41.4 kB]
Get:22 http://archive.raspbian.org/raspbian/ jessie/main software-properties-common all 0.92.25debian1 [79.3 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 8326 kB in 59s (141 kB/s)

(Reading database ... 18646 files and directories currently installed.)


Selecting previously unselected package libmpdec2:armhf.


Selecting previously unselected package libpython3.4-minimal:armhf.


Selecting previously unselected package libpython3.4-stdlib:armhf.


Selecting previously unselected package python3.4-minimal.
Preparing to unpack .../python3.4-minimal_3.4.2-1_armhf.deb ...
Unpacking python3.4-minimal (3.4.2-1) ...
Selecting previously unselected package apt-utils.


Selecting previously unselected package python3.4.


Selecting previously unselected package python3-minimal.


Selecting previously unselected package libpython3-stdlib:armhf.


Selecting previously unselected package python3.


Selecting previously unselected package dh-python.


Selecting previously unselected package libgirepository-1.0-1:armhf.


Selecting previously unselected package gir1.2-glib-2.0:armhf.


Selecting previously unselected package iso-codes.

Unpacking iso-codes (3.57-1) ...
Selecting previously unselected package lsb-release.


Selecting previously unselected package python-apt-common.


Selecting previously unselected package python3-apt.




Unpacking python3-dbus (1.2.0-2+b1) ...
Selecting previously unselected package python3-gi.

Unpacking python3-gi (3.14.0-1) ...
Selecting previously unselected package unattended-upgrades.
Preparing to unpack .../unattended-upgrades_0.81+rpi1_all.deb ...
Unpacking unattended-upgrades (0.81+rpi1) ...
Selecting previously unselected package python3-software-properties.


Selecting previously unselected package software-properties-common.





Setting up libmpdec2:armhf (2.4.1-1) ...

Setting up libpython3.4-stdlib:armhf (3.4.2-1) ...
Setting up python3.4-minimal (3.4.2-1) ...
Setting up apt-utils (1.0.9.8.4) ...
Setting up python3.4 (3.4.2-1) ...
Setting up python3-minimal (3.4.2-2) ...
Setting up libpython3-stdlib:armhf (3.4.2-2) ...
Setting up libgirepository-1.0-1:armhf (1.42.0-2.2) ...
Setting up gir1.2-glib-2.0:armhf (1.42.0-2.2) ...
Setting up iso-codes (3.57-1) ...
Setting up lsb-release (4.1+Debian13+rpi1+nmu1) ...
Setting up python-apt-common (0.9.3.12) ...





Setting up unattended-upgrades (0.81+rpi1) ...





Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 167, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 105, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 595, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/jessie
@matt-parish

This comment has been minimized.

Show comment
Hide comment
@matt-parish

matt-parish Sep 9, 2018

Following the instructions throughout this, and a bit of experimentation got me here:

Device & OS: Raspberry Pi B 3+, Raspbian (Stretch)
Chromium version: 65.0.x
Puppeteer version: 1.5.0
Node version: 10.10.0
Launch settings:

const browser = await puppeteer.launch({
    args: ['--no-sandbox', '--disable-setuid-sandbox', '--headless', '--disable-gpu'],
    executablePath: '/usr/bin/chromium-browser'
})

Error:

(node:20627) UnhandledPromiseRejectionWarning: Error: Evaluation failed: SyntaxError: Unexpected token {
    at ExecutionContext.evaluateHandle (/home/pi/Documents/forex-trader/node_modules/puppeteer/lib/ExecutionContext.js:88:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:20627) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20627) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Now, I'm pretty sure that this is a dependancy problem, but I can't work it out. Has anyone else got it working recently?

matt-parish commented Sep 9, 2018

Following the instructions throughout this, and a bit of experimentation got me here:

Device & OS: Raspberry Pi B 3+, Raspbian (Stretch)
Chromium version: 65.0.x
Puppeteer version: 1.5.0
Node version: 10.10.0
Launch settings:

const browser = await puppeteer.launch({
    args: ['--no-sandbox', '--disable-setuid-sandbox', '--headless', '--disable-gpu'],
    executablePath: '/usr/bin/chromium-browser'
})

Error:

(node:20627) UnhandledPromiseRejectionWarning: Error: Evaluation failed: SyntaxError: Unexpected token {
    at ExecutionContext.evaluateHandle (/home/pi/Documents/forex-trader/node_modules/puppeteer/lib/ExecutionContext.js:88:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:20627) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20627) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Now, I'm pretty sure that this is a dependancy problem, but I can't work it out. Has anyone else got it working recently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment