-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Is this a bug report?
Yes
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 9.3.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.1 AI-143.2915827
Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3
Target Platform: iOS (10.3)
Steps to Reproduce
I have a node server which uses Let's Encrypt CA. I try to connect to it using websockets.
On iOS and newer Android versions (API > 20) it connects successfully.
When running on older Android versions (both on simulator and actual devices) it never connects.
I have tried to connect using older Android version to a server that's not using Let's encrypt CA, and it also connects successfully.
The error I get when using this:
ws.onerror = (e) => {
// an error occurred
console.log(e.message);
};is Connection closed by peer
and this:
ws.onclose = (e) => {
// connection closed
console.log(e.code, e.reason);
};logs undefined, undefined
Expected Behavior
Connect to the server
Actual Behavior
Fails
Reproducible Demo
var ws = new WebSocket('wss://example.now.sh');
ws.onerror = (e) => {
// an error occurred
console.log(e.message);
};
ws.onclose = (e) => {
// connection closed
console.log(e.code, e.reason);
};