Comments (7)
I would try with the default options like
import io from 'socket.io-client';
const socket = io('http://localhost:8080');
And see if the same error happens. It also depends how the application is set up (did you configure feathers-socketio
properly?).
from socketio.
Here is error when ai use default options:
GET http://localhost:8080/socket.io/?EIO=3&transport=polling&t=LtevyLS 404 (Not Found)
Request.create @ polling-xhr.js:264
Request @ polling-xhr.js:165
XMLHttpRequest cannot load http://localhost:8080/socket.io/?EIO=3&transport=polling&t=LtevyLS. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:3000' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
Default method will be long-polling and it like we call api not found
404Route: /socket.io/?EIO=3&transport=polling&t=LtevyLS - Page not found
from socketio.
It must be something with your setup which is much easier to investigate with a repository to reproduce the issue.
from socketio.
Ok i will investigate more. For now, i'm using config socketIo in index.js like this
import socketio from 'socket.io';
const server = app.listen(8080);
const io = socketio(server);
server.on('listening', () =>
logger.info(`Feathers application started on ${app.get('host')}:${port}`),
);
from socketio.
i'm also facing problem like you @huytran0605
getting this error :
wss://ws.xxxxxxxx.xx:4038/socket.io/?EIO=3&transport=websocket' failed: Connection closed before receiving a handshake response
this is the code of my front-end in .vue file
import io from 'socket.io-client';
import feathers from 'feathers/client';
import socketio from 'feathers-socketio/client';
var socket = io('wss://ws.xxxxxxxx:4038', { transports: ['websocket']})
var app = feathers();
app.configure(socketio(socket));
var message = app.service('vshopdata');
Vue.use(feathers);
this is the code of my back-end in app.js file
const express = require('@feathersjs/express');
const feathers = require('@feathersjs/feathers');
const socketio = require('@feathersjs/socketio');
const app = express(feathers());
app.configure(configuration(path.join(__dirname, '..')))
app.configure(socketio(4038, {
wsEngine: 'uws',
origin: '*.xxxxxx.xx:*'
}));
from socketio.
I think it is a related to a bug in the version of socket.io used by @feathersjs/socket.io that is solved with the latest version of socket.io (2.1.0): socketio/socket.io#2294
Try to update to the latest version of socket.io to see if you still have this issue
from socketio.
I felt it might be something like that given the amount of issues around Socket.io and timeouts recently. I'll make a new patch release that will use that version.
from socketio.
Related Issues (20)
- Options are not passed to socket-io HOT 2
- How to stop listening to socket server from client service HOT 5
- Updated from feathers-socketio to @feathersjs/socketio; error message HOT 1
- How to change 5000ms timeout? HOT 2
- My chat room sometimes the user's text has become????? HOT 2
- `yarn add @feathersjs/socketio` gets stuck HOT 2
- Connection closed before receiving a handshake response HOT 3
- User object missing in logout callback args under certain conditions HOT 7
- An in-range update of feathers-hooks is breaking the build 🚨
- Add Socket.io v2 support HOT 2
- An in-range update of mocha is breaking the build 🚨 HOT 1
- An in-range update of babel-core is breaking the build 🚨 HOT 1
- Connecting to sockets on a path HOT 1
- Maybe acting wrong please look into my test app HOT 1
- An in-range update of babel-cli is breaking the build 🚨 HOT 2
- An in-range update of mocha is breaking the build 🚨 HOT 2
- Filter service updates by ID HOT 1
- Remote address IP is always undefined HOT 1
- feathers / graphql using REST / Sockets HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socketio.