vgalin / html2image

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.
MIT License
354 stars 43 forks source link

Ubuntu 2X.X: Chromium installed through Snap does not have access to /tmp/ #137

Open Naeddyr opened 10 months ago

Naeddyr commented 10 months ago

Not really an issue with this project, but thought you'd might want to know.

Currently, access to any partition besides /home/ has been disabled on Chromium on Ubuntu. There is only the snap package (the debs have been removed some time ago), so there doesn't seem to be any obvious workaround for this.

Annoyingly, when Chromium fails to load the temp-file of a file copied to /tmp/html2image/ it just renders a completely blank transparent screenshot without an error-message.

gabryelreyes commented 10 months ago

Just reproduced this issue unknowingly. It is really annoying that the transparent picture gets rendered silently. My workaround was to set temp_path='.' so it uses my project's folder for temporary files.

Thanks for pointing me in the right direction