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

ComfyUIClient websocket error when using https url #5

Open
PsilAxis opened this issue Jul 5, 2024 · 0 comments
Open

ComfyUIClient websocket error when using https url #5

PsilAxis opened this issue Jul 5, 2024 · 0 comments

Comments

@PsilAxis
Copy link

PsilAxis commented Jul 5, 2024

when using a free ngrok url to test my application, i kept getting the following errors.

{"level":30,"time":1720141565995,"pid":23720,"hostname":"DESKTOP","msg":"Connecting to url: ws://bc07-[public-ip].ngrok-free.app/ws?clientId=baadbabe-b00b-4206-9420-deadd00d1337"} 
{"level":50,"time":1720141566178,"pid":23720,"hostname":"DESKTOP","err":{"type":"Error","message":"Unexpected server response: 307","stack":"Error: Unexpected server response: 307\n at ClientRequest.<anony mous> 

i was able to fix this with a workaround by going into .\node_modules\comfy-ui-client\dist\index.js from inside my project and changing

const url = `ws://${this.serverAddress}/ws?clientId=${this.clientId}`;
into
const url = `wss://${this.serverAddress}/ws?clientId=${this.clientId}`;

but i dont think that editing the module itself from my project is a good solution, even though it worked for me this time.

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