Android Question B4A version 11.5 (OkHttpUtils2) bug?

joazzz

Member
Licensed User
Longtime User
'*****B4A Version 10.0 ~ 11.0 No Errors , Only version 11.5 error (Same OkHttpUtils2 Version 3.00)*****

Dim StrMyHTTPS As String
StrMyHTTPS = "https://www.~~/~~?access_token=" & StrToken & user_screen_name = " & StrID & " & user_password = " & StrPassSHA256"

Dim HttpMyJob As HttpJob
HttpMyJob.Initialize("MyLogin", Me)
HttpMyJob.PostString(StrMyHTTPS, "")
HttpMyJob.GetRequest.Timeout = 10000

Wait for (HttpMyJob) JobDone(MyResp As HttpJob)
If MyResp.Success Then
Msgbox("OK","") '*****B4A Version 10.0 ~ 11.0 No Errors , Only version 11.5 error (Same OkHttpUtils2 Version 3.00)*****
HttpMyJob.Release
Else
Dim StrMyError As String=MyResp.ErrorMessage
HttpMyJob.Release
Msgbox(StrMyError,"Error") '*****B4A Version 11.5 Error (Version 10.0 ~ 11.0 No Errors)*****
'Error Message : javax.net.ssl.SSLHandShakeException Handshake failed
End If
 

joazzz

Member
Licensed User
Longtime User
With the same source code,
the result is different when compiling in [v10.0~v11.0] and compiling in [v11.5]

Most sites work just fine.
Some sites(credit card approval) are behaving abnormally.

B4X:
'~~~
Wait for (HttpMyJob) JobDone(MyResp As HttpJob)
If MyResp.Success Then
    '---> If i compile on [B4A Version 10.0 ~ 11.0], it runs in this line.
Else
    '---> If i compile on [B4A Version 11.5], it runs in this line.
    'Error:javax.net.ssl.SSLHandShakeException Handshake failed
End If
 
Upvote 0

joazzz

Member
Licensed User
Longtime User
The problem only occurs in OkHttpUtils2 version 3.00
It works normally in OkHttpUtils2 version 2.96
 
Upvote 0

behnam_tr

Active Member
Licensed User
Longtime User
The problem only occurs in OkHttpUtils2 version 3.00
It works normally in OkHttpUtils2 version 2.96

i had same problem with okhttputils 3.0 in b4j
I am currently using version 2.96 until fix bug


I deleted the new version, now I have reinstalled it, and this time I changed the installation path and saw that my problem was solved.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Moved to the questions forum.

This error happens with web servers that doesn't support TLS 1.2+. You will get a similar error if you try to access the site with Chrome of Firefox.

1652852317776.png


In this case you should use the http link instead and enable clear text communication.
 
Upvote 0
Top