Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

Angular HttpClient does not connect with server by Android 7 or before Mobiles

$
0
0

Mobile App developed under Ionic (^5.34.0) + Angular (~12.2.0) + Capacitor (^3.2.0) This app was installed on Google store through Android Studio.

service.ts

async VerifyPhone(phoneno: string): Promise{
let httpParams = new HttpParams().set(‘phone’, phoneno);
return await this.http.get(this.url + ‘/verifyphone’, { headers: this.reqOptions, params: httpParams, responseType: ‘json’ })
.pipe(
catchError((error: HttpErrorResponse) => {
let errorMsg = ‘’;
if (error.error instanceof ErrorEvent) {
errorMsg = Error (Client): ${error.error.message};
}
else {
errorMsg = Error Code (Server): ${error.status}, Message: ${error.message};
}
window.alert(errorMsg);
return throwError(errorMsg);
})
)
.toPromise();
}

Mobiles with android OS version > 10 → No error, data is fetched from web api by httpclient

Mobiles with android OS version 7, same app running (Mobiles with android 7 or below) does not connect with web api by httpclient. Error generated when phone is attached with android studio for debug:

E/chromium: [ERROR:ssl_client_socket_impl.cc(976)] handshake failed; returned -1, SSL error code 1, net_error -202
http://localhost/main.js - Line 836 - Error Code: 0 Http failure response for url of verify phone Unknown Error

Kindly help!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>