expo init projectApp.tsx.FeathersJS client working, connected to the server.
Unrecognized WebSocket connection option(s) `agent`, `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you mean to put these under `headers`?
- node_modules/expo/build/environment/muteWarnings.fx.js:18:23 in warn
- node_modules/react-native/Libraries/WebSocket/WebSocket.js:118:8 in constructor
- node_modules/engine.io-client/lib/transports/websocket.js:115:6 in WS.prototype.doOpen
- node_modules/engine.io-client/lib/transport.js:83:9 in Transport.prototype.open
* http://192.168.1.13:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:144338:19 in open
- node_modules/engine.io-client/lib/socket.js:120:7 in Socket
- node_modules/engine.io-client/lib/socket.js:27:28 in Socket
- node_modules/socket.io-client/lib/manager.js:225:7 in Manager.prototype.connect
- node_modules/socket.io-client/lib/manager.js:538:15 in setTimeout$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:146:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:399:17 in callTimers
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:436:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:111:26 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:110:17 in __guard$argument_0
* [native code]:null in callFunctionReturnFlushedQueue
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
"@feathersjs/feathers": "^4.5.2",
"@feathersjs/socketio-client": "^4.5.2",
"socket.io-client": "^2.3.0"
NodeJS version: v12.11.1
Operating System: Linux
Browser Version: N/A
React Native Version: sdk-36.0.0
Module Loader: Expo
Seems related to https://github.com/socketio/socket.io-client/issues/1290.
I faced the some issue with my react native app, downgrade your socket.io-client.
I'm using "socket.io-client": "^2.1.0" and it works perfectly fine.
I'm going to close this since this error can only be fixed in the upstream socket.io client library or by downgrading as suggested.
You can simply add these add headers and it works!
this.socket = io.connect('SOCKET_URL', {
jsonp: false,
agent: '-',
pfx: '-',
cert: '-',
ca: '-',
ciphers: '-',
rejectUnauthorized: '-',
perMessageDeflate: '-'
});
@vigneshwaran-dev Why all those fake options?
Most helpful comment
You can simply add these add headers and it works!
this.socket = io.connect('SOCKET_URL', { jsonp: false, agent: '-', pfx: '-', cert: '-', ca: '-', ciphers: '-', rejectUnauthorized: '-', perMessageDeflate: '-' });