Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imgkit should raise exception if wkhtmltoimage returns with non zero exit code #122

Open
ronald opened this issue Dec 10, 2021 · 0 comments

Comments

@ronald
Copy link

ronald commented Dec 10, 2021

if libssl1.0-dev is missing and html contains https-style-sheet link it fails silently to load css:

<link href="https://example.com/style.css" rel="stylesheet" />

Expected behavior

ImgKit should raise exception

Current Behavior

ImgKit renders HTML without styles

Possible Solution

Check exit status of wkhtmltoimage.

 sudo apt remove libssl1.0-dev
 bundle exec wkhtmltoimage tmp/code.html tmp/code.jpg

output:

Loading page (1/2)
QSslSocket: cannot resolve CRYPTO_num_locks                  ] 10%
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
QSslSocket: cannot call unresolved function SSLv23_client_method1%
QSslSocket: cannot call unresolved function SSL_library_init
Rendering (2/2)                                                    
Done                                                               
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback

check exit code:

 echo $?

output:
1

 sudo apt install libssl1.0-dev
 bundle exec wkhtmltoimage tmp/code.html tmp/code.jpg

output:

Loading page (1/2)
Rendering (2/2)                                                    
Done       

check exit code:

 echo $?

output:
0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant