I’m trying to connect a secure web socket with SSL via an android device.
I’m trying to connect to a secure socket web server (SSL) as a client of an ionic angular application via an android device. But by android there is an error: WebSocket opening handshake was canceled. I believe the device browser cannot recognize the authenticity of the server certificate.
Function to open Web Socket Secure
This error occurs when I use ionic capacitor run android only on android device.
On localhost chrome the connection is successful.
I would like to know if anyone has worked with SSL Web Socket authentication on mobile devices and know any solution to authenticate wss session with self-signed certificates.
Dependencies:
“@angular/common”: “~10.0.0”,
“@angular/core”: “~10.0.0”,
“@angular/forms”: “~10.0.0”,
“@angular/platform-browser”: “~10.0.0”,
“@angular/platform-browser-dynamic”: “~10.0.0”,
“@angular/router”: “~10.0.0”,
“@capacitor/android”: “^2.4.2”,
“@capacitor/core”: “2.4.2”,
“@ionic-native/core”: “^5.0.0”,
“@ionic-native/http”: “^5.33.1”,
“@ionic-native/splash-screen”: “^5.0.0”,
“@ionic-native/sqlite”: “^5.29.0”,
“@ionic-native/sqlite-porter”: “^5.29.0”,
“@ionic-native/status-bar”: “^5.0.0”,
“@ionic/angular”: “^5.0.0”,
“cordova-plugin-file”: “^6.0.2”,
“cordova-sqlite-storage”: “^5.1.0”,
“rxjs”: “~6.5.5”,
“tslib”: “^2.0.0”,
“uk.co.workingedge.cordova.plugin.sqliteporter”: “^1.1.1”,
“zone.js”: “~0.10.3”
AndroidVersionDevice: 9 PKQ1.180904.001
Device: Redmi Note 5
4 posts - 2 participants