sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
311 stars 71 forks source link

Unable to render PNG : `convert: unable to open image '/output/cover.png.temp': No such file or directory` #59

Closed anteid closed 1 year ago

anteid commented 1 year ago

Hi, I've tried to install and use the docker container on a RPi3 with Portainer. Once the container is online, I cannot see any picture neither on the webpage, nor on the output directory.

Here is the error I get in logs :

hass-lovelace-kindle-screensaver@1.0.4 start node index.js Starting browser... Visiting 'http://192.168.12.9:8123' to login... Adding authentication entry to browser's local storage... Starting first render... Starting rendering cronjob... Server is running at 5000 Rendering http://192.168.12.9:8123/lovelace/inkplate?kiosk to image... Failed to render TimeoutError: waiting for selector home-assistant failed: timeout 27066ms exceeded at new WaitTask (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:517:34) at DOMWorld.waitForSelectorInPage (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:428:26) at Object.internalHandler.waitFor (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77) at DOMWorld.waitForSelector (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:321:29) at Frame.waitForSelector (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:924:51) at Page.waitForSelector (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2359:33) at renderUrlToImageAsync (/app/index.js:260:16) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async renderAndConvertAsync (/app/index.js:173:5) Converting rendered screenshot of http://192.168.12.9:8123/lovelace/inkplate?kiosk to grayscale png... /app/node_modules/gm/lib/command.js:301 err = new Error('Command failed: ' + stderr); ^ Error: Command failed: convert: unable to open image '/output/cover.png.temp': No such file or directory @ error/blob.c/OpenBlob/3570. convert: no decode delegate for this image format TEMP' @ error/constitute.c/ReadImage/741. convert: no images defined/output/cover.png' @ error/convert.c/ConvertImageCommand/3342. at ChildProcess.onExit (/app/node_modules/gm/lib/command.js:301:17) at ChildProcess.emit (node:events:513:28) at maybeClose (node:internal/child_process:1100:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) { code: 1, signal: null }

I have tried with multiple websites (including the Google homepage) and it seems I get here every time... Please accept my apologies if I miss something in reporting this issue. Antoine

anteid commented 1 year ago

I'm sorry, I will check on closed issues before opening a new one... Antoine