iOS Question Error response: , status code: 0 Jobdone

tufanv

Expert
Licensed User
Longtime User
Hello

My app is giving an error of status code 0 while connecting to a https altough i used initializeacceptall as always.
The exact error says :
An SSL error has occurred and a secure connection to the server cannot be made.

Exact same procedure works in another apps that confuses me . I use below simple sub
B4X:
Sub ExecuteRemoteQuery(Query As String, JobName As String)
    Dim job As HttpJob
    job.Initialize(JobName, Me)
    job.PostString("https://...", Query)
End Sub

edit: same thing happens when i try another way of getting data with :
B4X:
        Dim connection As HttpJob
            connection.Initialize("grafik",Me)
            connection.download2("https://...", Array As String ("action", "yeniapp"))
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
yes. also , other apps are working fine on my phone they can retrieve the info from the server. ( i didnt try to re build them i just try them from the previously installed builds on my phone )
With the same link?
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
With the same link?
I just checked my other app which has this code :
B4X:
    Dim connection As HttpJob
    connection.Initialize("verial",Me)
    connection.download2("https://..", Array As String ("action", "borsaveriler"))
and it works . ( connected with debug ) . the link is %100 same
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
Are you using InitializeAcceptAll because your certificate is self signed?
When yes: the certificate must be issued by a certificate authority (or installed by the user).

When not: can you post the hostname of your server?
 
Last edited:
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Are you using InitializeAcceptAll because your certificate is self signed?
When yes: the certificate must be issued by a certificate authority (or installed by the user).

When not: can you post the hostname of your server?
I use initializeacceptall all the time because it is https.
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
When your SSL certificate is not self-signed you can also use the normal Initialize method, is your certificate self-signed?

Jan
no not self signed. But as i remember , i couldnt run it with initialize , it only worked with initializeacceptall. I will try to change to initialize and look what happens
 
Upvote 0
Top