Skip to content

No errors, but no connection after upgrade #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lbm-services opened this issue Jul 22, 2023 · 0 comments
Open

No errors, but no connection after upgrade #561

lbm-services opened this issue Jul 22, 2023 · 0 comments

Comments

@lbm-services
Copy link

lbm-services commented Jul 22, 2023

I switched my app to vite and upgraded packages.
Since then I have no connection to my socket.io server.
The funny thing is: if I enter a WRONG port, I see it trying to connect, with the right port (80) it simply does nothing.
The problem seems to be my socket-io-actions are in a vuex store.
Is there a way to use vue-socket.io-extended with Pinia?

       GET http://192.168.2.230:8080/socket.io/?EIO=4&transport=polling&t=Obylgd6 net::ERR_CONNECTION_REFUSED
       GET http://192.168.2.230:8080/socket.io/?EIO=4&transport=polling&t=Obylh0H net::ERR_CONNECTION_REFUSED
       GET http://192.168.2.230:8080/socket.io/?EIO=4&transport=polling&t=Obylhdn net::ERR_CONNECTION_REFUSED
       GET http://192.168.2.230:8080/socket.io/?EIO=4&transport=polling&t=ObyliOH net::ERR_CONNECTION_REFUSED
       GET http://192.168.2.230:8080/socket.io/?EIO=4&transport=polling&t=Obyljco net::ERR_CONNECTION_REFUSED

main.js


import VueSocketIOExt from 'vue-socket.io-extended';
import io from 'socket.io-client';
import store from './store/index.js'
var ip = '192.168.2.230';
// if on dev use ip
var host = 'http://' + (document.location.port == 5173 ? ip : document.location.host);
const socket = io(host);

Vue.use(VueSocketIOExt, socket, { store });

package versions:

├── @intlify/[email protected]
├── @mdi/[email protected]
├── @popperjs/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant