-
Notifications
You must be signed in to change notification settings - Fork 43
Use irc-socket Tls fix from silverbucket/irc-socket #322
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
Conversation
I just tried to validate this fix. But both on the master branch, as well as this one, I get CORS errors from trying to connect to Sockethub from Hyperchannel (master) in the first place: I think it shouldn't even use HTTP polling in the first place, so there seems to be something wrong with the connection itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that this fix works for me using Hyperchannel master.
Same in both Firefox and Chromium for me. Sockethub client doesn't try to connect via Websockets at all, and fails to connect due to missing CORS headers when falling back to HTTP polling. Edit: I also have a massive diff on yarn lock files (4553 lines) after running |
I just ran I also see large diffs for yarn lock files in the root and in But everything works for me with both Chrome and Firefox. When I quit the Sockethub server while Hyperchannel is still running, I can see the same error messages as you. So my guess would be that Sockethub didn't start properly for you. |
Yes, that looks pretty much the same as here. Can you open http://localhost:10550/ in the browser? |
Aha: those examples work just fine, using Websockets immediately! Anything not on he same origin doesn't seem to attempt Websockets and fails at HTTP polling with the CORS errors. |
@raucao Hmm.. Are both Hyperchannel and Sockethub running on localhost? Becuase if I do that they work fine, but I do get weirdness if they are running on different "hosts" eg |
Merging now and will followup with @raucao as it's not related to this PR. |
* use irc-socket fix from github repo * use base socket packages, not the socket objects themselves * update example to default to secure, and only use tls options when tls is used
This PR uses the Tls irc-socket fix in https://github.com/silverbucket/irc-socket/tree/v4-alpha
Tested on my local machine and it works at least with both secure and non-secure connection sand send/receiving messages.