Closed paulmendrik closed 2 years ago
Hi @paulmendrik np, could you please recreate the error and send back to us a zip file of the following folder? storage/logs
Please send the file to support@enupal.com
@paulmendrik Did you get this resolved? I got in touch with the same issue regarding a local Craft Nitro setup.
@shoored I had a similar issue a few days ago. Does the Upload Location in the Enupal Settings have a public URLs enabled? If that's not enabled it doesn't seem to save. I've been trying to have the pdf's generated in a secure folder location but have been unsuccessful so far.
I'm having the same issue with local Craft Nitro too. Any solution? The plugin doesn't accept the path provided.
I'm having the same issue with local Craft Nitro too. Any solution? The plugin doesn't accept the path provided.
I found the issue in my case was that the volume which was selected in the Upload Location below where you enter the path needs to have public url's enabled.
I'm having the same issue with local Craft Nitro too. Any solution? The plugin doesn't accept the path provided.
I found the issue in my case was that the volume which was selected in the Upload Location below where you enter the path needs to have public url's enabled.
I have enabled it. But still not working.
@chocolayin could you please recreate the error and send back to us a zip file of the following folder? storage/logs
Please send the file to support@enupal.com
@chocolayin could you please recreate the error and send back to us a zip file of the following folder? storage/logs
Please send the file to support@enupal.com
Sure, I have sent the logs file.
@andrelopez Same problem here, it doesn't work in Craft Nitro. Do you have any updates on this?
@andrelopez This is the relevant log text
2021-09-09 12:02:50 [-][1][-][error][enupal\snapshot\Snapshot::error] Something went wrong when creating the Image file: The exit status code '127' says something went wrong:
stderr: "sh: /app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64: not found
"
stdout: ""
command: "/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64" --format 'jpg' --zoom '1.33' '/app/storage/runtime/temp/enupalsnapshottemp/knp_snappy6139e9dad95477.82174487.html' '/app/storage/runtime/temp/enupalsnapshottemp/public/Choice_NzpEGEqdoJ.png'.
The files are all there though.
@andrelopez Any chance of you taking a look at this? It's been quite a while now....
I was able to recreate this issue on nitro, the issue is due that the ubuntu packages are not supported on Alpine (nitro linux distribution)
I have tried installing the wkhtmltopdf
available on Alpine packages but it looks like is missing some dependencies
// first login as root to nitro
nitro ssh your_container --root
// then install wkhtmltopdf
apk add --no-cache wkhtmltopdf
I will back when I find a fix to this issue
Ok, thank you very much for looking into it @andrelopez !!
Hi @johnwbaxter could you please try to install wkhtmltopdf on Nitro 2, following the next instructions?
nitro ssh your_nitro_site_name --root
apk add --no-cache wkhtmltopdf
apk add so:libQt5Core.so.5
apk add so:libQt5Gui.so.5
apk add so:libQt5Network.so.5
apk add so:libQt5PrintSupport.so.5
apk add so:libQt5Svg.so.5
apk add so:libQt5WebKit.so.5
apk add so:libQt5WebKitWidgets.so.5
apk add so:libQt5Widgets.so.5
apk add so:libc.musl-x86_64.so.1
apk add so:libgcc_s.so.1
apk add so:libstdc++.so.6
exit
Absolute Binary Path of wkhtmltopdf libRequired:
/usr/bin/wkhtmltopdf
Absolute Binary Path of wkhtmltoimage lib
/usr/bin/wkhtmltoimage
Assets in this volume have public URLs
setting enabledPlease let me know if that works, it's working on my side.
Hi @andrelopez just to confirm, what is meant to be in "your_container" here: nitro ssh your_container --root
?
Assuming it's the site name? "example.loc" so nitro ssh example.loc --root
?
Assuming that above is correct, It is not working for me,no.
@johnwbaxter Yep! the site name.
What is not working ? just the nitro ssh example.loc --root
command?
@andrelopez That all works and I can see the wkhtmltopdf/image libs are in the right place, but, when you try to save those locations it says Something went wrong in the test. Please check the path and your logs.
and if i hardcode those paths into project config and try to generate a PDF, it wont create a PDF saying something has gone wrong.
@johnwbaxter thanks for following up. Could you please login as root via ssh again and run the following command and hit enter:
apk --update --no-cache add \
wkhtmltopdf \
libgcc \
libstdc++ \
musl \
qt5-qtbase \
qt5-qtbase-x11 \
qt5-qtsvg \
qt5-qtwebkit \
ttf-freefont \
ttf-dejavu \
ttf-droid \
ttf-liberation \
fontconfig
Let me know if that works
@andrelopez That works!!!!!
@johnwbaxter great! will update the docs soon. Thank you!
@andrelopez Awesome, thanks Andre!!!
In summary, to install Enupal Snapshot on Nitro 2 (may be the same for Alpine Linux distros)
Login to nitro via ssh as root:
nitro ssh your_nitro_site_name --root
Run the following command to install wkhtmltopdf
and dependencies
apk --update --no-cache add \
wkhtmltopdf \
libgcc \
libstdc++ \
musl \
qt5-qtbase \
qt5-qtbase-x11 \
qt5-qtsvg \
qt5-qtwebkit \
ttf-freefont \
ttf-dejavu \
ttf-droid \
ttf-liberation \
fontconfig \
so:libQt5Core.so.5 \
so:libQt5Gui.so.5 \
so:libQt5Network.so.5 \
so:libQt5PrintSupport.so.5 \
so:libQt5Svg.so.5 \
so:libQt5WebKit.so.5\
so:libQt5WebKitWidgets.so.5\
so:libQt5Widgets.so.5\
so:libc.musl-x86_64.so.1\
so:libgcc_s.so.1\
so:libstdc++.so.6
On your Craft CMS dashboard go to the Enupal Snapshot settings and save the following settings:
Absolute Binary Path of wkhtmltopdf libRequired:
/usr/bin/wkhtmltopdf
Absolute Binary Path of wkhtmltoimage lib
/usr/bin/wkhtmltoimage
Hi Andre,
Sorry to bother you again, but I don't seems to get snapshot to accept the path to path to wkhtmltopdf ev en though I've followed the instructions exactly wkhtmltopdf is installed on the server, when I use the command pwd, I get /home/ploi/wkhtmltox/bin 'ploi' being my server name but adding this path with /wkhtmltopdf or /wkhtmltoimage gives me an error Something went wrong in the test. Please check the path and your logs.and cannot be saved to the settings. I'm not sure what I'm doing wrong here, so can you help ?
Thanks again,
Paul