dicio-android icon indicating copy to clipboard operation
dicio-android copied to clipboard

SSL error while Speech to Text downloading

Open Shura0 opened this issue 1 year ago • 13 comments

Android 7.0 + Dicio2

When I press button "Download Speech to Text" it immediately displays error "Error downloading". I've tried Russian and English languages with the same result.

Shura0 avatar Oct 06 '24 13:10 Shura0

Have you consented all the permissions first to try the download? Could you provide the log?

paolo-caroni avatar Oct 07 '24 19:10 paolo-caroni

It asked only for mic permissions and I granted it. How can I get the log?

Shura0 avatar Oct 07 '24 19:10 Shura0

Try to go on settings, app, and search dicio. Then see permissions and grant telephone, contacts, notification. Then force close the app and restart it. Android 7 is pretty old, I'm not sure that I remember where are permissions. For log you can use adb logcat with a usb cable and a computer. Or try with app like logfox (root needed).

paolo-caroni avatar Oct 07 '24 20:10 paolo-caroni

Ok, I gave all the permissions.

Log is:

10-09 20:34:38.626 28661 28685 E VoskInputDevice: Can't download Vosk model
10-09 20:34:38.626 28661 28685 E VoskInputDevice: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
10-09 20:34:38.626 28661 28685 E VoskInputDevice:       at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:364)
10-09 20:34:38.626 28661 28685 E VoskInputDevice:       at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
10-09 20:34:38.626 28661 28685 E VoskInputDevice:       at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
10-09 20:34:38.626 28661 28685 E VoskInputDevice:       at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
10-09 20:34:38.626 28661 28685 E VoskInputDevice:       at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)

and more similar lines.

Shura0 avatar Oct 09 '24 17:10 Shura0

Android 7.0 and below cross-signed certificate has expired. https://letsencrypt.org/2023/07/10/cross-sign-expiration/

Tkrtt avatar Oct 12 '24 20:10 Tkrtt

Yes, but firefox works. Also Organic maps for example works well, it can download new maps

Shura0 avatar Oct 13 '24 07:10 Shura0

So dicio need to add it's own trust store, or rise minsdk to make explicit that it support only android 8 and above. The second option is simple, since need only change a number in the code.

@Shura0 In any case I will advise you to upgrade android on your phone, if possible.

paolo-caroni avatar Oct 13 '24 08:10 paolo-caroni

Unfortunately upgrade is impossible

Shura0 avatar Oct 13 '24 10:10 Shura0

@Shura0 can you download the wake word model? The wake word model comes from GitHub, and GitHub's certificates might still be accepted by Android 7, while the Vosk model is from Vosk's website.

Stypox avatar Oct 13 '24 17:10 Stypox

Yes, it downloaded wake word model well

Shura0 avatar Oct 14 '24 13:10 Shura0

Ok, I can download it with browser. What file and where should I download it to?

Shura0 avatar Oct 14 '24 18:10 Shura0

If you have access to app data, choose a model from here according to your language, download it, move it to /data/data/org.stypox.dicio/files/, and rename it to vosk-model.zip. Also create a file, under the same folder, named vosk-model-url (without any extension) which should contain the full download url you used.

Stypox avatar Nov 09 '24 20:11 Stypox

Unfortunately it did not help

Shura0 avatar Nov 23 '24 07:11 Shura0