[GH-ISSUE #255] No PDF, Screenshot and DOM generation on Raspberry Pi / headless setup #1689

Closed
opened 2026-03-01 17:52:53 +03:00 by kerem · 6 comments
Owner

Originally created by @dueringa on GitHub (Aug 11, 2019).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/255

Describe the bug

When archiving a page via SSH on a Raspberry Pi (Model 3B+), using DietPi (based on Raspbian) as an Operating System, which is setup to work as a headless server, PDF, Screenshot and DOM generation will fail because of chromium errors.

Steps to reproduce

1.Setup ArchiveBox with ./bin/archivebox-setup
2. Try to archive a website, e.g. echo https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html | ./bin/archivebox
3. Archiving fails

Screenshots or log output

[*] [2019-08-11 10:18:48] Parsing new links from output/sources/stdin-1565511528.txt...
    > Adding 1 new links to index (parsed import as Plain Text)                                                                                                                               
[*] [2019-08-11 10:18:48] Saving main index files...
    √ output/index.json
    √ output/index.html
[▶] [2019-08-11 10:18:48] Updating content for 1 pages in archive...

[+] [2019-08-11 10:18:48] "https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html"
    https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html
    > output/archive/1565511528
      > title
      > favicon                                                                                                                                                                               
      > wget                                                                                                                                                                                  
      > pdf                                                                                                                                                                                   
        Failed: Failed to print PDF                                                                                                                                                           
            /usr/bin/chromium-browser: line 139: lsb_release: command not found
            /usr/bin/chromium-browser: line 140: lsb_release: command not found
            [0811/101900.600597:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode.
            [0811/101901.060698:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
            [0811/101903.235691:FATAL:gpu_data_manager_impl_private.cc(897)] The display compositor is frequently crashing. Goodbye.
        Run to see full output:
            cd /home/dietpi/ArchiveBox/output/archive/1565511528;
            chromium-browser --headless "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" --window-size=1440,2000 --timeout=60000 --print-to-pdf https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html
      > screenshot
        Failed: Failed to take screenshot                                                                                                                                                     
            /usr/bin/chromium-browser: line 139: lsb_release: command not found
            /usr/bin/chromium-browser: line 140: lsb_release: command not found
            [0811/101903.691375:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode.
            [0811/101904.022943:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
            [0811/101906.561198:FATAL:gpu_data_manager_impl_private.cc(897)] The display compositor is frequently crashing. Goodbye.
        Run to see full output:
            cd /home/dietpi/ArchiveBox/output/archive/1565511528;
            chromium-browser --headless "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" --window-size=1440,2000 --timeout=60000 --screenshot https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html
      > dom
        Failed: Failed to fetch DOM                                                                                                                                                           
            /usr/bin/chromium-browser: line 139: lsb_release: command not found
            /usr/bin/chromium-browser: line 140: lsb_release: command not found
            [0811/101907.061707:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode.
            [0811/101907.908584:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
            [0811/101909.750346:FATAL:gpu_data_manager_impl_private.cc(897)] The display compositor is frequently crashing. Goodbye.
        Run to see full output:
            cd /home/dietpi/ArchiveBox/output/archive/1565511528;
            chromium-browser --headless "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" --window-size=1440,2000 --timeout=60000 --dump-dom https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html
      > media
      > archive_org                                                                                                                                                                           
[√] [2019-08-11 10:19:18] Update of 1 pages complete (29.53 sec)                                                                                                                              
    - 0 links skipped
    - 0 links updated
    - 1 links had errors
    To view your archive, open: output/index.html
[*] [2019-08-11 10:19:18] Saving main index files...
    √ output/index.json
    √ output/index.html

Running the command for printing to PDF manually with an additional --disable-gpu option still doesn't produce a PDF, but removes the ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. error message. The other error messages are still there.

Software versions

  • OS: DietPi v6.25.3 (based on Debian Buster)
  • ArchiveBox version: e2b054a
  • Python version: 3.7.3
  • Chrome version: (Chromium 74.0.3729.157 Built on Raspbian , running on Raspbian 10)

Question

Should it even be possible to archive pages in this setup? Is this a chromium bug?

Originally created by @dueringa on GitHub (Aug 11, 2019). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/255 #### Describe the bug When archiving a page via SSH on a Raspberry Pi (Model 3B+), using DietPi (based on Raspbian) as an Operating System, which is setup to work as a headless server, PDF, Screenshot and DOM generation will fail because of chromium errors. #### Steps to reproduce 1.Setup ArchiveBox with ./bin/archivebox-setup 2. Try to archive a website, e.g. `echo https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html | ./bin/archivebox` 3. Archiving fails #### Screenshots or log output ``` [*] [2019-08-11 10:18:48] Parsing new links from output/sources/stdin-1565511528.txt... > Adding 1 new links to index (parsed import as Plain Text) [*] [2019-08-11 10:18:48] Saving main index files... √ output/index.json √ output/index.html [▶] [2019-08-11 10:18:48] Updating content for 1 pages in archive... [+] [2019-08-11 10:18:48] "https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html" https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html > output/archive/1565511528 > title > favicon > wget > pdf Failed: Failed to print PDF /usr/bin/chromium-browser: line 139: lsb_release: command not found /usr/bin/chromium-browser: line 140: lsb_release: command not found [0811/101900.600597:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode. [0811/101901.060698:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. [0811/101903.235691:FATAL:gpu_data_manager_impl_private.cc(897)] The display compositor is frequently crashing. Goodbye. Run to see full output: cd /home/dietpi/ArchiveBox/output/archive/1565511528; chromium-browser --headless "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" --window-size=1440,2000 --timeout=60000 --print-to-pdf https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html > screenshot Failed: Failed to take screenshot /usr/bin/chromium-browser: line 139: lsb_release: command not found /usr/bin/chromium-browser: line 140: lsb_release: command not found [0811/101903.691375:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode. [0811/101904.022943:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. [0811/101906.561198:FATAL:gpu_data_manager_impl_private.cc(897)] The display compositor is frequently crashing. Goodbye. Run to see full output: cd /home/dietpi/ArchiveBox/output/archive/1565511528; chromium-browser --headless "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" --window-size=1440,2000 --timeout=60000 --screenshot https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html > dom Failed: Failed to fetch DOM /usr/bin/chromium-browser: line 139: lsb_release: command not found /usr/bin/chromium-browser: line 140: lsb_release: command not found [0811/101907.061707:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode. [0811/101907.908584:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. [0811/101909.750346:FATAL:gpu_data_manager_impl_private.cc(897)] The display compositor is frequently crashing. Goodbye. Run to see full output: cd /home/dietpi/ArchiveBox/output/archive/1565511528; chromium-browser --headless "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" --window-size=1440,2000 --timeout=60000 --dump-dom https://wavesharejfs.blogspot.com/2018/08/make-new-larger-font-for-waveshare-spi.html > media > archive_org [√] [2019-08-11 10:19:18] Update of 1 pages complete (29.53 sec) - 0 links skipped - 0 links updated - 1 links had errors To view your archive, open: output/index.html [*] [2019-08-11 10:19:18] Saving main index files... √ output/index.json √ output/index.html ``` Running the command for printing to PDF manually with an additional `--disable-gpu` option still doesn't produce a PDF, but removes the `ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.` error message. The other error messages are still there. #### Software versions - OS: DietPi v6.25.3 (based on Debian Buster) - ArchiveBox version: `e2b054a` - Python version: `3.7.3` - Chrome version: (`Chromium 74.0.3729.157 Built on Raspbian , running on Raspbian 10`) #### Question Should it even be possible to archive pages in this setup? Is this a chromium bug?
kerem closed this issue 2026-03-01 17:52:54 +03:00
Author
Owner

@pirate commented on GitHub (Aug 11, 2019):

apt install -y lsb-core

If Chrome is built for Raspbian do you think it will work on a Debian Buster-based system? They're similar but not exactly the same iirc.
Can you try reinstalling chromium-browser or dpkg-reconfigure chromium-browser.

<!-- gh-comment-id:520221154 --> @pirate commented on GitHub (Aug 11, 2019): `apt install -y lsb-core` If Chrome is built for Raspbian do you think it will work on a Debian Buster-based system? They're similar but not exactly the same iirc. Can you try reinstalling `chromium-browser` or `dpkg-reconfigure chromium-browser`.
Author
Owner

@dueringa commented on GitHub (Aug 11, 2019):

Package lsb-core is not available anymore:

$ sudo apt install lsb-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lsb-core is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'lsb-core' has no installation candidate

However, I installed lsb-base:

dietpi@ServerPi-3BP:~$ lsb_release  -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

This made the warning message go away, but not the errors.
Running only the chromium command displayed in the log, I also tried adding the user to the video group, changing the memory for the GPU to 256MB (using the distribution config tool for the Raspberry) and even running the chromium command as sudo (which required an additional flag, --no-sandbox), but the error messages persisted.
Adding the --disable-gpu flag only removed the error message Failed to send GpuChannelMsg_CreateCommandBuffer.

I'm not sure if I understand your remark regarding the chromium browser, it is installed from the distribution repos. I should have clarified, Dietpi uses the Raspbian repos.

$ apt policy chromium-
browser                                                                        
chromium-browser:
  Installed: 74.0.3729.157-rpt5
  Candidate: 74.0.3729.157-rpt5
  Version table:
 *** 74.0.3729.157-rpt5 500
        500 https://archive.raspberrypi.org/debian buster/main armhf Packages
        100 /var/lib/dpkg/status

Reinstalling it doesn't change the behavior.

<!-- gh-comment-id:520253819 --> @dueringa commented on GitHub (Aug 11, 2019): Package lsb-core is not available anymore: ``` $ sudo apt install lsb-core Reading package lists... Done Building dependency tree Reading state information... Done Package lsb-core is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'lsb-core' has no installation candidate ``` However, I installed lsb-base: ``` dietpi@ServerPi-3BP:~$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster ``` This made the warning message go away, but not the errors. Running only the chromium command displayed in the log, I also tried adding the user to the video group, changing the memory for the GPU to 256MB (using the distribution config tool for the Raspberry) and even running the chromium command as sudo (which required an additional flag, --no-sandbox), but the error messages persisted. Adding the `--disable-gpu` flag only removed the error message `Failed to send GpuChannelMsg_CreateCommandBuffer.` I'm not sure if I understand your remark regarding the chromium browser, it is installed from the distribution repos. I should have clarified, Dietpi uses the Raspbian repos. ``` $ apt policy chromium- browser � chromium-browser: Installed: 74.0.3729.157-rpt5 Candidate: 74.0.3729.157-rpt5 Version table: *** 74.0.3729.157-rpt5 500 500 https://archive.raspberrypi.org/debian buster/main armhf Packages 100 /var/lib/dpkg/status ``` Reinstalling it doesn't change the behavior.
Author
Owner

@pirate commented on GitHub (Aug 13, 2019):

Unfortunately not sure ArchiveBox would be able to provide any type of workaround for this if it's a fundamental Chrome issue. For now you can disable those archive methods and just use wget, wait until Chromium fixes the issue upstream, or wait until we release Firefox support in the far far future.

<!-- gh-comment-id:521027261 --> @pirate commented on GitHub (Aug 13, 2019): Unfortunately not sure ArchiveBox would be able to provide any type of workaround for this if it's a fundamental Chrome issue. For now you can disable those archive methods and just use wget, wait until Chromium fixes the issue upstream, or wait until we release Firefox support in the far far future.
Author
Owner

@dueringa commented on GitHub (Aug 14, 2019):

Thanks for the reply. As far as I'm concerned, this issue can be closed then.

If anyone else is affected and is looking for a solution, you can work around this by using https://wkhtmltopdf.org/ for generating a PDF.

<!-- gh-comment-id:521347703 --> @dueringa commented on GitHub (Aug 14, 2019): Thanks for the reply. As far as I'm concerned, this issue can be closed then. If anyone else is affected and is looking for a solution, you can work around this by using https://wkhtmltopdf.org/ for generating a PDF.
Author
Owner

@pirate commented on GitHub (Aug 14, 2019):

I'd also recommend trying a much older version of chrome from back when they first released chrome headless. It might work because it had 0 gpu support initially, everything was done on cpu.

<!-- gh-comment-id:521349072 --> @pirate commented on GitHub (Aug 14, 2019): I'd also recommend trying a much older version of chrome from back when they first released chrome headless. It might work because it had 0 gpu support initially, everything was done on cpu.
Author
Owner

@sbrl commented on GitHub (Jun 12, 2021):

because it had 0 gpu support initially, everything was done on cpu.

Isn't there a flag to disable GPU support at all? I thought there was

<!-- gh-comment-id:860052202 --> @sbrl commented on GitHub (Jun 12, 2021): > because it had 0 gpu support initially, everything was done on cpu. Isn't there a flag to disable GPU support at all? I thought there was
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1689
No description provided.