Unrecognized WebSocket connection option(s) `agent`, `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you mean to put these under `headers`?
See original GitHub issueYou want to:
- report a bug
- request a feature
Current behaviour
When I install socket.io-client
on a blank React Native Expo project I have a yellow message with:
Unrecognized WebSocket connection option(s) `agent`, `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you mean to put these under `headers`?
Steps to reproduce (if the current behaviour is a bug)
yarn add socket.io-client
In App.js in the React Native project:
import React from 'react';
import { YellowBox } from 'react-native';
import io from 'socket.io-client';
YellowBox.ignoreWarnings(['Remote debugger']);
import AppContainer from './config/routing';
export default class App extends React.Component {
constructor(props) {
super(props);
}
componentWillMount() {
const socket = io('http://10.0.60.26:3000', {
forceNew: true
});
socket.on('connect', () => console.log('Connection'));
}
render() {
return <AppContainer />;
}
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:53
- Comments:50 (1 by maintainers)
Top Results From Across the Web
Unrecognized WebSocket connection option(s) `agent ...
Yes, this is happening in the WebSocket class constructor in Socket.io. I think it happens when you specify your transport layer as ...
Read more >Unrecognized WebSocket connection option(s) `agent ...
... `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you mean to put these under `headers ...
Read more >class socksproxyagent extends agent_base_1.agent - You.com
Unrecognized WebSocket connection option (s) `agent`, `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you ...
Read more >Error message occurs when trying to upload pfx certificate to ...
Hello,. We have an App Service running containing a Wordpress instance. I need to update the wildcard SSL certificate as it is about...
Read more >React-Native 웹소켓 사용 시 Unrecognized WebSocket ... - velog
React Native + Expo: Unrecognized WebSocket connection option(s) #1855. ... `rejectUnauthorized`. Did you mean to put these under `headers`? ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For me it worked when I downgraded to 2.1.1 I did:
yarn add socket.io-client@2.1.1
At first it didn’t work because I was adding the
^
symbol before the versionsocket.io-client@^2.1.1
which I believe accepts other minor versions of the package.const _io = ioClient.connect(socketurl, { forceNode: true });
It’s work