Viber: no connection – qt.network.ssl: Incompatible version of OpenSSL

By | 02/27/2019
 

On a fresh Arch Linux setup – Viber starting, but during authorization – can’t connect to the network.

In general – Viber’s desktop version is really limited but anyway it’s better then use it from a cell.

Tried to google few times as I didn’t found the error in messages to use exactly in google’s search., but finally – found it.

All errors look like next:

viber
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
qt.network.ssl: QSslSocket: cannot resolve sk_new_null
qt.network.ssl: QSslSocket: cannot resolve sk_push
qt.network.ssl: QSslSocket: cannot resolve sk_free
qt.network.ssl: QSslSocket: cannot resolve sk_num
qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
qt.network.ssl: QSslSocket: cannot resolve sk_value
qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
qt.network.ssl: QSslSocket: cannot resolve SSLeay
qt.network.ssl: QSslSocket: cannot resolve SSLeay_version
qt.network.ssl: Incompatible version of OpenSSL
qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init

Solution #1 (didn’t worked)

The first I googled was to fix the libssl.so library path as suggested here>>>.

Check file itself:

ls -l /usr/lib64/libssl.so.1.1
-rwxr-xr-x 1 root root 585328 Nov 20 19:41 /usr/lib64/libssl.so.1.1

Create the symlink:

22:52:01 [setevoy@setevoy-arch-pc ~]
sudo ln -s /usr/lib64/libssl.so.1.1 /opt/viber/lib/libssl.so

Run Viber – won’t work, same errors.

Solution #2 (didn’t work)

The next I found was discussion here>>> where the pulseaudio was mentioned, which is in the Viber’s dependencies but it wasn’t installed during Viber’s set up.

Install it:

sudo pacman -S pulseaudio

Reboot PC, run Viber – still nothing.

There is also the pulseaudio-git package – let’s try it:

...
==> Install or build missing dependencies for pulseaudio-git:
resolving dependencies...
looking for conflicting packages...
:: jack2-dbus and jack are in conflict. Remove jack? [y/N]
...

What is the jack2-dbus?

Check it description here>>> – looks like nothing critical, if any – pacman/yay would say it.

Remove pulseaudio:

sudo pacman -Rsn pulseaudio
checking dependencies...
:: firefox optionally requires pulseaudio: Audio support
:: phonon-qt5 optionally requires pulseaudio: PulseAudio support
:: phonon-qt5-gstreamer optionally requires pulseaudio: PulseAudio support
:: polybar optionally requires pulseaudio: pulseaudio module support
Packages (3) rtkit-0.11+10+g493a135-1  webrtc-audio-processing-0.3.1-1  pulseaudio-12.2-2
Total Removed Size:  6.75 MiB
:: Do you want to remove these packages? [Y/n]

Install pulseaudio-git:

yaourt -S pulseaudio-git
...
delete :: jack2-dbus and jack are in conflict. Remove jack? [y/N] y
...
:: pulseaudio-git and libpulse are in conflict. Remove libpulse? [y/N]

Agree, remove them, run Viber – and again the same errors…

Solution #3 (“It works!”)

What is with libraries at all?

Check with the ldd:

ldd /opt/viber/Viber
linux-vdso.so.1 (0x00007ffd2b346000)
libXss.so.1 => /usr/lib/libXss.so.1 (0x00007f5e3a0ca000)
libqrencode.so => /opt/viber/lib/libqrencode.so (0x00007f5e39eb9000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f5e39e26000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f5e39c14000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f5e39ad5000)
...

All good, all found…

And only here I noticed the qt.network.ssl: Incompatible version of OpenSSL line in Viber’s messages, which led me to this>>> discussion.

Install the openssl-1.0:

sudo pacman -S openssl-1.0

Run Viber – and it works now!

Just – right after successful connection and authorization – Viber went down with the new error:

...
PulseAudioService: pa_context_connect() failed
PulseAudioService: pa_context_connect() failed
Assertion 'pthread_mutex_unlock(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:108, function pa_mutex_unlock(). Aborting.
Aborted (core dumped)

To solve it – I restored the “common” pulseaudio:

sudo pacman -S pulseaudio
resolving dependencies...
looking for conflicting packages...
:: pulseaudio and pulseaudio-git are in conflict. Remove pulseaudio-git? [y/N] y
Packages (3) libpulse-12.2-2  pulseaudio-git-v12.0.269.gdb788229c-1 [removal]  pulseaudio-12.2-2
...

Run it as a daemon:

pulseaudio -D

Start Viber again:

viber
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
qml: type=""
qml: type=""

And all works now.