Open zuiwuchang opened 1 year ago
If @stffabi has no objections and you're willing to make a PR then we can look at getting it in.
I'm fine if we change that.
If @stffabi has no objections and you're willing to make a PR then we can look at getting it in.
I'd love to get my hands dirty and fix this bug, but I'm new to wails, I actually only started with wails 3 days ago. So I am not sure about the project structure and where to modify this code. After I understand the wails code structure better, if this problem is not fixed, then I will submit a fix code.
i am also facing same issue on ubuntu #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2
wails doctor ouput is
Wails CLI v2.5.1
SUCCESS Done.
# System
OS | Ubuntu
Version | 22.04
ID | ubuntu
Go Version | go1.20.5
Platform | linux
Architecture | amd64
# Wails
Version | v2.5.1
Package Manager | apt
# Dependencies
Dependency | Package Name | Status | Version
*docker | docker.io | Installed | 24.0.4
gcc | build-essential | Installed | 12.9ubuntu3
libgtk-3 | libgtk-3-dev | Installed | 3.24.33-1ubuntu2
libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.38.6-0ubuntu0.22.04.1
npm | npm | Installed | 8.19.2
*nsis | nsis | Installed | v3.08-2
pkg-config | pkg-config | Installed | 0.29.2-1ubuntu3
* - Optional Dependency
when try to connect socket io const sock = io("ws://localhost:8000", {path: '/web/socket.io/'});
Solution tried, if try to run on browser like chrome and mozilla, it is working fine. but on wails app getting
WebSocket connection to 'wss://wails.localhost:34115/_next/webpack-hmr' failed:
Description
The ipc.js injected by
wails dev
uses the following code to create the websocket:This makes it impossible to call the code provided by go in js when using https to access devserver, because the browser refuses to access ws (ws://YourHost/wails/ipc) from https
The websocket should be created using something like the following code:
Usually don't use https to access the devserver, but this is indeed a bug and there is such a need, such as me.
I use code-server for remote development so that I can remotely develop company projects even at home. For safety, I use envoy+https for all http to provide security guarantees, but now the wrong code injected by
wails dev
makes it impossible to pass https correct access devserver.To Reproduce
wails dev
run devExpected behaviour
You can use the reverse proxy to provide secure access to https for devserver
Screenshots
Attempted Fixes
https://github.com/wailsapp/wails/issues?q=wss
System Details
Additional context
No response