Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Puppeteer: Screenshots PhantomJS Alternative

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Puppeteer: Screenshots PhantomJS Alternative

    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bimmi @liv-in-sky last edited by bimmi

      @liv-in-sky funktioniert perfekt! Genau wie ich es haben will! Im Prinzip ging es mir um die Qualität. Die kleinen E-INK Displays zeigen die Grafik besser an mit 100% Qualität bei der JPG Generierung!

      1 Reply Last reply Reply Quote 1
      • D
        dwm last edited by

        Nachdem ich auch gern VIS und Grafana screens in Status-Reports verwenden würde, hab ich heute mal puppeteer ausprobiert:
        Puppeteer startet nicht, und liefert folgende Fehler im log:

        eteer.0
        2023-10-27 11:26:04.506	error	Failed to launch the browser process![1027/112604.128429:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.#0 0x564aa1039f72 base::debug::CollectStackTrace()#1 0x564aa10264b3 base::debug::StackTrace::StackTrace()#2 0x564aa0f78fbf logging::LogMessage::~LogMessage()#3 0x564a9f795c16 content::ZygoteHostImpl::Init()#4 0x564aa04cfb23 content::ContentMainRunnerImpl::Initialize()#5 0x564aa04cd427 content::RunContentProcess()#6 0x564aa04cd606 content::ContentMain()#7 0x564aa0ab71fa headless::HeadlessShellMain()#8 0x564a9cbee255 ChromeMain#9 0x7fbbe3716d0a __libc_start_main#10 0x564a9cbee02a _startTROUBLESHOOTING: https://pptr.dev/troubleshooting
        
        puppeteer.0
        2023-10-27 11:26:04.505	error	Error: Failed to launch the browser process![1027/112604.128429:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.#0 0x564aa1039f72 base::debug::CollectStackTrace()#1 0x564aa10264b3 base::debug::StackTrace::StackTrace()#2 0x564aa0f78fbf logging::LogMessage::~LogMessage()#3 0x564a9f795c16 content::ZygoteHostImpl::Init()#4 0x564aa04cfb23 content::ContentMainRunnerImpl::Initialize()#5 0x564aa04cd427 content::RunContentProcess()#6 0x564aa04cd606 content::ContentMain()#7 0x564aa0ab71fa headless::HeadlessShellMain()#8 0x564a9cbee255 ChromeMain#9 0x7fbbe3716d0a __libc_start_main#10 0x564a9cbee02a _startTROUBLESHOOTING: https://pptr.dev/troubleshooting at Interface.onClose (/opt/iobroker/node_modules/@puppeteer/browsers/lib/cjs/launch.js:262:24) at Interface.emit (node:events:526:35) at Interface.close (node:internal/readline/interface:533:10) at Socket.onend (node:internal/readline/interface:259:10) at Socket.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
        
        puppeteer.0
        2023-10-27 11:26:04.503	error	unhandled promise rejection: Failed to launch the browser process![1027/112604.128429:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.#0 0x564aa1039f72 base::debug::CollectStackTrace()#1 0x564aa10264b3 base::debug::StackTrace::StackTrace()#2 0x564aa0f78fbf logging::LogMessage::~LogMessage()#3 0x564a9f795c16 content::ZygoteHostImpl::Init()#4 0x564aa04cfb23 content::ContentMainRunnerImpl::Initialize()#5 0x564aa04cd427 content::RunContentProcess()#6 0x564aa04cd606 content::ContentMain()#7 0x564aa0ab71fa headless::HeadlessShellMain()#8 0x564a9cbee255 ChromeMain#9 0x7fbbe3716d0a __libc_start_main#10 0x564a9cbee02a _startTROUBLESHOOTING: https://pptr.dev/troubleshooting
        

        Die Umgebung ist ein buanet/iobroker Docker container, Version 8.1.0, also ein Debian 11.
        Die package-installation ist durchgelaufen, die sind alle installiert.

        Kleine Anmerkung zu den Packages: In dem Image wird standardmäßig die apt package Liste gelöscht, vermutlich um Platz im Filesystem zu sparen. Deswegen muss man vor der puppeteer Installation manuell ein

        apt-get update
        

        aufrufen, dann werden die Listen wieder installiert, und apt-get install ... funktioniert.

        Aber zum jetzigen "no useable sandbox" Fehler fällt mir grad nix ein ... gibts eventuell Ideen?
        Dank
        Werner

        1 Reply Last reply Reply Quote 0
        • Neuschwansteini
          Neuschwansteini last edited by

          @dwm

          da hatte ich mich letztes Jahr auch mal mit befasst... es gab n Parameter den man setzen konnte.. aber bei mir half das auch nicht..
          Denke, das geht nicht im Docker.

          1 Reply Last reply Reply Quote 0
          • arteck
            arteck Developer Most Active last edited by

            da müsste doch @andre was zu sagen können

            andre 1 Reply Last reply Reply Quote 0
            • D
              dwm last edited by

              Muss da mal bisschen damit experimentieren, möglichst nicht auf dem "Production" System ;), aber dafür ist Docker ja perfekt.

              Es gibt auf jeden Fall mal das puppeteer-troubleshooting als Ansatzpunkt:
              https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox

              1 Reply Last reply Reply Quote 0
              • andre
                andre Developer @arteck last edited by andre

                @arteck sagte in Puppeteer: Screenshots PhantomJS Alternative:

                da müsste doch @andre was zu sagen können

                Wenn ich das hier so lese, dann wird puppeteer nicht out of the box in docker laufen...

                https://dev.to/cloudx/how-to-use-puppeteer-inside-a-docker-container-568c

                Eventuell ist es notwendig den Container entsprechend vorzubereiten. Ggf. mit einem benutzerdefinierten Startscript.

                MfG,
                André

                1 Reply Last reply Reply Quote 0
                • F
                  Freak @Neuschwansteini last edited by

                  @ilovegym said in Puppeteer: Screenshots PhantomJS Alternative:

                  @foxriver76

                  Bin am Tablett mit meinen dicken Fingern.. verwende den buanet Docker mit Node 16
                  hier beim installieren:

                  host.iobroker
                  2023-03-18 21:09:38.495	info	iobroker npm WARN deprecated puppeteer@13.7.0: < 19.2.0 is no longer supported
                  
                  

                  Dann beim starten des Adapter:

                  
                  puppeteer.0
                  2023-03-18 21:10:24.951	error	Error: Failed to launch the browser process![0318/211024.570664:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.#0 0x55aca5667b89 base::debug::CollectStackTrace()#1 0x55aca55cc433 base::debug::StackTrace::StackTrace()#2 0x55aca55df330 logging::LogMessage::~LogMessage()#3 0x55aca35c499b content::ZygoteHostImpl::Init()#4 0x55aca5175372 content::ContentMainRunnerImpl::Initialize()#5 0x55aca5173439 content::RunContentProcess()#6 0x55aca517358e content::ContentMain()#7 0x55aca51ced7a headless::(anonymous namespace)::RunContentMain()#8 0x55aca51cea85 headless::HeadlessShellMain()#9 0x55aca1c323e8 ChromeMain#10 0x7effdda9dd0a __libc_start_main#11 0x55aca1c3222a _startTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md at onClose (/opt/iobroker/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:241:20) at Interface.<anonymous> (/opt/iobroker/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:231:68) at Interface.emit (node:events:525:35) at Interface.close (node:readline:590:8) at Socket.onend (node:readline:280:10) at Socket.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)
                  
                  puppeteer.0
                  2023-03-18 21:10:24.950	error	unhandled promise rejection: Failed to launch the browser process![0318/211024.570664:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.#0 0x55aca5667b89 base::debug::CollectStackTrace()#1 0x55aca55cc433 base::debug::StackTrace::StackTrace()#2 0x55aca55df330 logging::LogMessage::~LogMessage()#3 0x55aca35c499b content::ZygoteHostImpl::Init()#4 0x55aca5175372 content::ContentMainRunnerImpl::Initialize()#5 0x55aca5173439 content::RunContentProcess()#6 0x55aca517358e content::ContentMain()#7 0x55aca51ced7a headless::(anonymous namespace)::RunContentMain()#8 0x55aca51cea85 headless::HeadlessShellMain()#9 0x55aca1c323e8 ChromeMain#10 0x7effdda9dd0a __libc_start_main#11 0x55aca1c3222a _startTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
                  
                  

                  Ich habe leider das gleiche Problem. Konntest du das irgendwie lösen?

                  Codierknecht 1 Reply Last reply Reply Quote 0
                  • Codierknecht
                    Codierknecht Developer Most Active @Freak last edited by

                    @freak
                    Dir ist aber schon klar, dass Du hier auf einen fast 1 Jahr alten Beitrag antwortest?

                    @andre sagte in Puppeteer: Screenshots PhantomJS Alternative:

                    Wenn ich das hier so lese, dann wird puppeteer nicht out of the box in docker laufen...

                    @freak sagte in Puppeteer: Screenshots PhantomJS Alternative:

                    das gleiche Problem.

                    Sicher?

                    @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                    Krass, die sind tatsächlich innerhalb von einem Jahr von 13 auf 19.

                    Zeigen!

                    https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Freak @Codierknecht last edited by

                      @codierknecht
                      Ja, das habe ich schon gesehen, danke für den Hinweis.
                      Leider bekomme ich mein Problem nicht selbst in den Griff und wollte kein neues Thema eröffnen.

                      Mein iobroker läuft auf einer Ds1522+ mit einem AMD Ryzen R1600

                      Wenn ich den Puppeteer adapter installiere bekomme ich folgende Fehler im Log.

                      puppeteer.0
                      2024-02-19 08:08:23.154	error	Failed to launch the browser process![24624:24624:0219/080822.240775:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.TROUBLESHOOTING: https://pptr.dev/troubleshooting
                      puppeteer.0
                      2024-02-19 08:08:23.154	error	Error: Failed to launch the browser process![24624:24624:0219/080822.240775:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.TROUBLESHOOTING: https://pptr.dev/troubleshooting at ChildProcess.onClose (/opt/iobroker/node_modules/@puppeteer/browsers/lib/cjs/launch.js:267:24) at ChildProcess.emit (node:events:525:35) at ChildProcess._handle.onexit (node:internal/child_process:291:12)
                      puppeteer.0
                      2024-02-19 08:08:23.153	error	unhandled promise rejection: Failed to launch the browser process![24624:24624:0219/080822.240775:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.TROUBLESHOOTING: https://pptr.dev/troubleshooting
                      puppeteer.0
                      2024-02-19 08:08:23.152	error	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().
                      puppeteer.0
                      2024-02-19 08:08:22.187	info	starting. Version 0.2.8 in /opt/iobroker/node_modules/iobroker.puppeteer, node: v18.15.0, js-controller: 5.0.17
                      

                      Danke für die Unterstützung.

                      Codierknecht 1 Reply Last reply Reply Quote 0
                      • Codierknecht
                        Codierknecht Developer Most Active @Freak last edited by

                        @freak sagte in Puppeteer: Screenshots PhantomJS Alternative:

                        Leider bekomme ich mein Problem nicht selbst in den Griff

                        Da bist Du offenbar nicht der Einzige.

                        @ilovegym sagte in Puppeteer: Screenshots PhantomJS Alternative:

                        Denke, das geht nicht im Docker.

                        @ilovegym @foxriver76 @andre
                        Oder hat sich an dem Umstand etwas geändert?

                        F Neuschwansteini 2 Replies Last reply Reply Quote 0
                        • F
                          Freak @Codierknecht last edited by

                          @codierknecht

                          das habe ich auch gefunden. Hab halt gehofft, dass es doch jemanden gibt, der eine Lösung hat.
                          Danke für deine Mühe.

                          1 Reply Last reply Reply Quote 0
                          • Neuschwansteini
                            Neuschwansteini @Codierknecht last edited by

                            @codierknecht sagte in Puppeteer: Screenshots PhantomJS Alternative:

                            @freak sagte in Puppeteer: Screenshots PhantomJS Alternative:

                            Leider bekomme ich mein Problem nicht selbst in den Griff

                            Da bist Du offenbar nicht der Einzige.

                            @ilovegym sagte in Puppeteer: Screenshots PhantomJS Alternative:

                            Denke, das geht nicht im Docker.

                            @ilovegym @foxriver76 @andre
                            Oder hat sich an dem Umstand etwas geändert?

                            nee, leider nicht, ich habe mir eine VM als Multihost-Slave in Proxmox als Workaround angelegt.
                            Ist auch in den Issues zu Puppeteer auf git und npm zu sehen, sandbox in the sandbox geht nicht.

                            @Freak
                            wenn du Synology hast, kannst du dir auch eine VM anlegen (Paket Virtual Machine Manager installieren). Bei mir hat das zuviel Ressourcen gefressen, daher bin ich dann auf Docker umgestiegen.

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              Freak @Neuschwansteini last edited by

                              @ilovegym
                              Das habe ich mir auch schon überlegt.
                              Ich habe gesehen, es gibt auch Puppeteer Docker container.
                              Wenn dieser Container einen Screenshot einer Website erstellen kann und ihn an einem bestimmten Ort ablegt, sollte das ja nutzbar sein.
                              Kann das zufällig jemand bestätigen?

                              danke

                              1 Reply Last reply Reply Quote 0
                              • B
                                bimmi last edited by bimmi

                                Sorry. Falscher Beitrag 😁

                                1 Reply Last reply Reply Quote 0
                                • liv-in-sky
                                  liv-in-sky @foxriver76 last edited by

                                  @foxriver76

                                  bräuchte kurz deine hilfe - gibt es einen trick, wie man über sowas drüber kommt:

                                  iobrokerGoogle.png

                                  ist eine google maps seite, die ich "phtographieren" möchte

                                  1 Reply Last reply Reply Quote 0
                                  • foxriver76
                                    foxriver76 Developer last edited by foxriver76

                                    Ich habe gestern eine 0.4.0 veröffentlicht, mit der kann man nun einen externen Browser Pfad in den Einstellungen konfigurieren, somit sollte es nun auch in Docker sowie auf dem Pi möglich sein den Adapter laufen zu lassen in dem man einen externen Browser installiert, z. B. sudo apt install chromium und dann in dem Pfad den Chromium Browser angibt z. B. /usr/bin/chromium-browser.

                                    O B 2 Replies Last reply Reply Quote 2
                                    • O
                                      oxident @foxriver76 last edited by

                                      @foxriver76 Super, danke!
                                      Auf meinem OrangePi (RK3588) war es /usr/bin/chromium

                                      1 Reply Last reply Reply Quote 1
                                      • B
                                        BobmortonTX @foxriver76 last edited by

                                        @foxriver76

                                        das funktioniert leider bei mir nicht.
                                        muss ich noch weitere Einstellungen vornehmen als den Pfad in der Instanz zu setzen (/usr/bin/chromium) ?

                                        ARM Rock5 - iobrocker als Docker
                                        browser local installiert.
                                        keine Desktopumgebung installiert

                                        puppeteer.0
                                        	2025-02-13 11:58:45.432	warn	Terminated (UNCAUGHT_EXCEPTION): Without reason
                                        puppeteer.0
                                        	2025-02-13 11:58:45.432	info	terminating
                                        puppeteer.0
                                        	2025-02-13 11:58:45.423	error	Browser was not found at the configured executablePath (/usr/bin/chromium)
                                        puppeteer.0
                                        	2025-02-13 11:58:45.422	error	Error: Browser was not found at the configured executablePath (/usr/bin/chromium) at ChromeLauncher.launch (/opt/iobroker/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js:86:19) at async PuppeteerAdapter.onReady (/opt/iobroker/node_modules/iobroker.puppeteer/build/main.js:45:20)
                                        puppeteer.0
                                        	2025-02-13 11:58:45.422	error	unhandled promise rejection: Browser was not found at the configured executablePath (/usr/bin/chromium)
                                        puppeteer.0
                                        	2025-02-13 11:58:45.421	error	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().
                                        puppeteer.0
                                        	2025-02-13 11:58:45.406	info	starting. Version 0.4.0 in /opt/iobroker/node_modules/iobroker.puppeteer, node: v18.20.4, js-controller: 7.0.3
                                        

                                        local browser installiert:

                                        rock-5b:/bin$ ls chromiu*
                                        chromium
                                        
                                        rock-5b:/usr/bin$ ls chro*
                                        chromium
                                        
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • foxriver76
                                          foxriver76 Developer last edited by

                                          @bobmortontx passen die rechte? Ansonsten keine Ahnung gerade

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          706
                                          Online

                                          31.7k
                                          Users

                                          79.8k
                                          Topics

                                          1.3m
                                          Posts

                                          browser headless phantomjs puppeteer screenshot screenshots website
                                          23
                                          245
                                          25541
                                          Loading More Posts
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                          The ioBroker Community 2014-2023
                                          logo