Closed kingkong-cmd closed 2 years ago
Hello, could you take a look at #39, particularly this comment (and maybe the one following it), and tell me if it solves your problem?
Aha, I was sure it was a path problem, but seems you are right. The img was never created in the first place.
However, after setting the "no-sandbox" flag I am now getting the "remote debugging" error, which I see you have referenced here.
[0528/202630.387206:ERROR:headless_shell.cc(209)] Capture screenshot is disabled when remote debugging is enabled.
I switched from the heroku chrome buildpack to the aurelmegn chrome buildpack (https://github.com/aurelmegn/heroku-buildpack-google-chrome.git), and set the below flags, and now it is working.
hti = Html2Image(custom_flags=['--disable-remote-debugging', '--no-sandbox'])
A few hoops to jump through though. Thanks for the help and for the awesome package!
Struggling with paths on Heroku. I know Heroku uses ephemeral file system, but i think i should be able to save the image file and then open it again to send it back to the front-end. However, when i try to open the saved file (or in the case send_file back to the front end) i get the below error. If tried all sorts of different permutations of the file + path string, but cannot seem to find the file. Anyone know how i can get the save image file?
Ps. It works fine locally, so I guess it must be something with the paths on Heroku.