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

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Puppeteer: Screenshots PhantomJS Alternative

    This topic has been deleted. Only users with topic management privileges can see it.
    • foxriver76
      foxriver76 Developer @Negalein last edited by

      @negalein Und nach wie vor der Fehler beim Start?

      Negalein 1 Reply Last reply Reply Quote 0
      • Negalein
        Negalein Global Moderator @foxriver76 last edited by

        @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

        Und nach wie vor der Fehler beim Start?

        Sorry, oben vergessen.
        Ja, wieder die Fehler.

        puppeteer.0 2022-08-12 11:05:59.293	warn	Terminated (UNCAUGHT_EXCEPTION): Without reason
        puppeteer.0 2022-08-12 11:05:59.292	info	terminating
        puppeteer.0 2022-08-12 11:05:59.287	error	Failed to launch the browser process!TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
        puppeteer.0 2022-08-12 11:05:59.286	error	Error: Failed to launch the browser process!TROUBLESHOOTING: 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 ChildProcess.<anonymous> (/opt/iobroker/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:232:79) at ChildProcess.emit (node:events:539:35) at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
        puppeteer.0 2022-08-12 11:05:59.284	error	unhandled promise rejection: Failed to launch the browser process!TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
        puppeteer.0 2022-08-12 11:05:59.284	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 2022-08-12 11:05:59.250	info	starting. Version 0.2.1 in /opt/iobroker/node_modules/iobroker.puppeteer, node: v16.15.1, js-controller: 4.0.23
        
        foxriver76 1 Reply Last reply Reply Quote 0
        • foxriver76
          foxriver76 Developer @Negalein last edited by

          @negalein Zeig mal bitte Output von ldd /opt/iobroker/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome | grep not

          Negalein 1 Reply Last reply Reply Quote 0
          • Negalein
            Negalein Global Moderator @foxriver76 last edited by

            @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

            Zeig mal bitte Output von

            nega@ioBroker:~$ ldd /opt/iobroker/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome | grep not
                    libnss3.so => not found
                    libnssutil3.so => not found
                    libsmime3.so => not found
            nega@ioBroker:~$
            
            foxriver76 1 Reply Last reply Reply Quote 0
            • foxriver76
              foxriver76 Developer @Negalein last edited by

              @negalein sudo apt update && sudo apt install libnss3 installiert er es da. Beim install Log hat er schon gesagt, dass er es nicht findet.. mal sehen woran das liegt

              Negalein 1 Reply Last reply Reply Quote 0
              • Negalein
                Negalein Global Moderator @foxriver76 last edited by

                @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                mal sehen woran das liegt

                Danke, ist jetzt grün. 🙂

                Screenshot wird nicht erstellt und DP sind leer.

                43c01f17-a841-49e6-9d52-3db01e899cc8-image.png

                acf69e89-0981-43d9-93c2-b7d998bc21e2-image.png

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

                  @negalein DPs sind nur zur Konfiguration. Schreibt er was im Log? Evtl. auf Debug wenn du sendTo ausführst?

                  Negalein 1 Reply Last reply Reply Quote 0
                  • Negalein
                    Negalein Global Moderator @foxriver76 last edited by

                    @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                    Schreibt er was im Log? Evtl. auf Debug wenn du sendTo ausführst?

                    puppeteer.0 2022-08-12 11:33:32.075	debug	Checking path "../wetterstation.png"
                    puppeteer.0 2022-08-12 11:33:32.075	debug	Message: {"command":"screenshot","message":{"url":"http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk","clip":{"x":0,"y":0,"width":1920,"height":757},"path":"../wetterstation.png"},"from":"system.adapter.javascript.0","_id":48278577}
                    puppeteer.0 2022-08-12 11:33:19.946	debug	Checking path "../wetterstation.png"
                    puppeteer.0 2022-08-12 11:33:19.946	debug	Message: {"command":"screenshot","message":{"url":"http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk","clip":{"x":0,"y":0,"width":1920,"height":757},"path":"../wetterstation.png"},"from":"system.adapter.javascript.0","_id":48278576}
                    puppeteer.0 2022-08-12 11:32:57.012	info	Ready to take screenshots
                    puppeteer.0 2022-08-12 11:32:56.815	info	starting. Version 0.2.1 in /opt/iobroker/node_modules/iobroker.puppeteer, node: v16.15.1, js-controller: 4.0.23
                    
                    foxriver76 1 Reply Last reply Reply Quote 0
                    • foxriver76
                      foxriver76 Developer @Negalein last edited by

                      @negalein sagte in Puppeteer: Screenshots PhantomJS Alternative:

                      "../wetterstation.png"

                      hm gib mal als path im Skript /opt/iobroker/node_modules/iobroker.puppeteer/wetterstation.png an

                      Negalein 1 Reply Last reply Reply Quote 0
                      • Negalein
                        Negalein Global Moderator @foxriver76 last edited by

                        @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                        hm gib mal als path im Skript /opt/iobroker/node_modules/iobroker.puppeteer/wetterstation.png an

                        puppeteer.0 2022-08-12 11:38:01.009	error	Could not take screenshot of "http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk": Screenshots cannot be stored inside a node_modules folder
                        puppeteer.0 2022-08-12 11:38:01.009	debug	Checking path "/opt/iobroker/node_modules/iobroker.puppeteer/wetterstation.png"
                        puppeteer.0 2022-08-12 11:38:01.008	debug	Message: {"command":"screenshot","message":{"url":"http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk","clip":{"x":0,"y":0,"width":1920,"height":757},"path":"/opt/iobroker/node_modules/iobroker.puppeteer/wetterstation.png"},"from":"system.adapter.javascript.0","_id":48278587}
                        

                        hmmm, muss es woanders speichern. Was würdest du empfehlen?

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

                          @negalein Stimmt ja, schlechter Stil wird ja vom Adapter verhindert 😄

                          Sauber ist es im ioBroker storage, mach path weg und dafür das rein:

                                ioBrokerOptions: {
                                  storagePath: 'wetterstation.png';
                                }
                          
                          Negalein 1 Reply Last reply Reply Quote 0
                          • Negalein
                            Negalein Global Moderator @foxriver76 last edited by Negalein

                            @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                            path weg und dafür das rein:

                            was brauch ich da wieder nach }

                            sendTo('puppeteer.0', 'screenshot', { 
                                url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                                clip: {
                                    x: 0,
                                    y: 0,
                                    width: 1920,
                                    height: 757
                                },
                                ioBrokerOptions: {
                                    storagePath: 'wetterstation.png';
                                  },
                            });
                            

                            Edit:
                            so gehts 🙂

                            sendTo('puppeteer.0', 'screenshot', { 
                                url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                                clip: {
                                    x: 0,
                                    y: 0,
                                    width: 1920,
                                    height: 757
                                },
                                ioBrokerOptions: {
                                    storagePath: 'wetterstation.png',
                                  },
                            });
                            

                            Edith 2:
                            hmmm, wo speichert er jetzt?

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

                              @negalein geh mal im admin auf Dateien und dann Benutzerdaten

                              Auf dem Filessystem ist das defaultmäßig /opt/iobroker/iobroker-data/files/0_userdata.0/

                              Negalein 1 Reply Last reply Reply Quote 1
                              • Negalein
                                Negalein Global Moderator @foxriver76 last edited by Negalein

                                @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                geh mal im admin auf Dateien und dann Benutzerdaten

                                gefunden in /opt/iobroker/iobroker-data/files/0_userdata.0/ 🙂

                                Jetzt muss ich noch an der Auflösung basteln

                                wetterstation.png

                                So ist es original.
                                b6c35708-effe-4c76-872d-c946ebbb450b-image.png

                                Puppeteer quetscht es irgendwie.

                                wetterstation.png

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

                                  @negalein Mom.. ich bastel kurz was. Defaultmäßig macht Puppeteer Browser 800x600 Auflösung statt die maximal Mögliche.

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

                                    Bitte mal 0.2.4 probieren, ist in 5 Minuten auf npm

                                    Negalein 1 Reply Last reply Reply Quote 0
                                    • Negalein
                                      Negalein Global Moderator @foxriver76 last edited by

                                      @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                      Bitte mal 0.2.4 probieren

                                      eingestellt auf 1600x800

                                      wetterstation.png

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

                                        @negalein Schade, dann mach mal zusätzlich mit in die Message

                                        viewportOptions: {
                                         width: 1600,
                                        height: 1000
                                        }
                                        

                                        Entsprechen angepasst, bin nur am Handy.

                                        Negalein 1 Reply Last reply Reply Quote 0
                                        • Negalein
                                          Negalein Global Moderator @foxriver76 last edited by

                                          @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                          Entsprechen angepasst, bin nur am Handy.

                                          schon viel besser. 🙂

                                          Jetzt muss ich nur noch den rechten schwarzen Rand weg bekommen.

                                          wetterstation.png

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

                                            @negalein das sollte mit den Clip Optionen gehen.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            898
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            browser headless phantomjs puppeteer screenshot screenshots website
                                            23
                                            245
                                            26749
                                            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