-
Notifications
You must be signed in to change notification settings - Fork 13
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
Websocket not working with router #26
Comments
Hi. What happens when you navigate to /ws? Have you put in some debug statements to see if that router handler is being hit? Are you receiving any errors from the HandleRequest call? What do you mean by "it doesn't work"? You'll need to splatter debug statements around to try and figure out what's happening. I see no reason why abcweb would not be compatible with this off the top of my head. |
Hi @nullbio I didn't add any error logs because I was getting very little. I was hoping the provided repo would give an easier way to reproduce the issue.
I get the above when I try to connect via websocket |
Hi @fadeojo, so I did a bit of digging. First thing is you want to wrap your handler using the error manager middleware so that you can log errors as they occur. This is the main reason why your output is not helpful in diagnosing the problem, I believe. Doing so like this, gives the following for me:
Now, I don't really know much about the websocket protocol, but I presume this is because I'm trying to access it in the browser (which is naturally trying to send a regular HTTP request). Hopefully this is enough to get you pointed in the right direction? |
I couldn't get this working and decided to build my project using other technologies. Please close this issue. thanks. |
I tried using the websocket library(melody) as well as other libraries but they don't work with abcweb. The websocket connection never opens. I also tried
melody
in a simple setup with chi router and it worked.I add the code below to the router in my abcweb router file and it doesn't work. Please can I get help on this issue?
My Repo: https://github.com/fadeojo/brito
The text was updated successfully, but these errors were encountered: