Skip to content
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

Socket.io is not working after packing by using "yarn electron: builld". #176

Open
damonsong opened this issue Mar 19, 2024 · 2 comments
Open

Comments

@damonsong
Copy link

Come from nkkayman's github. I don't know whether you can help me about my question below.

=================Original Issue===========================
Socket.io is not working after packing by using "yarn electron: builld".

However, the function is normal in development mode "yarn electron: serve". And normal for yarn server or yarn build.

I found the reason is socket client cannot be connected to server since the Invaild namespace.
The invaild namespace is "//app://.". I found the value by adding console for socket instance.
The normal namespace is "/" as default main namespace based on socket.io online document.

My question is that why the socket.io default namespace is changed to "//app://."? Any configuration file should be modified?

@MatthijsBurgh
Copy link
Owner

I am really not sure, but the only thing that seems relevant to me is https://matthijsburgh.github.io/vue-cli-plugin-electron-builder/guide/configuration.html#changing-the-file-loading-protocol.

Have a try with it.

@damonsong
Copy link
Author

No matter what. Thanks for your reply. I'll check the protocol.

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

2 participants