-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
1.12 WebSocket connection to 'wss://.../socket' failed #5348
Comments
One update, running with the old dev server (and using |
Possible solution/workaround from a Remix discord community member:
|
Update Unfortunately still seeing the ws connection failure, but at least I have non-sketchy certificates for my team now! I was able to get the client side script to use port 8002 using the I've specified 8002 as the ws port in the remix config and in the |
Update: It works! Credit to Eladchen #2859 (comment) for the idea of using the remix app server to proxy websocket requests from the dev server to client. Needed 3 things to make this work:
After that I just needed to set an env var so that node would use And then the requests from devServer2.js for the new asset manifest started working, and BAM!, working live-reload with express https server! Repo in description has been updated. |
I seem to be having the same issue on 1.15. None of the configuration options seem to be respected. // remix.config.js
{
unstable_dev: {
// ...
port: 8002,
},
devServerPort: 8002,
// ...
} <LiveReload port={8002} /> …and yet on every boot it will try a new random port and get a connection error, since my app server runs inside of a Docker container with limited port forwarding. |
Obsoleted by #6133 |
What version of Remix are you using?
1.12
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
I created a simple repository to produce the issue using 'just the basics' and 'express' options: https://github.com/atsolberg/remix-basic-express-with-ssl-v2-dev see README for details.
Starting with a basic remix app using express, I added self-signed certificate files, and in
server.js
used node'shttps
createServer
to create a server using the express app with the certificate https options.4242
instead of3000
so start up withPORT=4242 npm run dev
or change remix configappServerPort
locally.https://localhost:4242
NOTE: I use
localremix
instead oflocalhost
by adding127.0.0.1 localremix
to myetc/hosts
file, and the self-signed certificate files in this repo were created referencinglocalremix
as the common name (CN). You might want to use your own certificate files or you can usehttps://localremix:4242
by added127.0.0.1 localremix
to youretc/hosts
file like I did. You can supply the directory path to your cert files using theCERT_DIR
env var at startup:CERT_DIR=Users/bob/my-certs PORT=4242 npm run dev
.server.js
expects the cert file names to bekey.pem
andcert.pem
.Expected Behavior
wss:
protocalfuture: { unstable_dev: { port } }
option would force the client to connect on that port, it always seems to use a random portActual Behavior
future: { unstable_dev: { port } }
option set, always seems to use a random port.Client Side Error
Chrome App Error
The text was updated successfully, but these errors were encountered: