-
Notifications
You must be signed in to change notification settings - Fork 97
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
WSS Not working for some sites. #9
Comments
Thank you for the report, I was able to reproduce this bug on my side and can confirm it is a bug. |
I am also looking this to work for |
Their API URL has changed to ws-feed.pro.coinbase.com. |
Thanks! I got it to work using another code posted on github. I ended up using WiFiClientSecureBearSSL. |
Is that now working with a socket or just an HTTPS request? |
Thank you for the report guys. I've fount at least one bug that had to do with the parsing of the server's response. For some reason, The problem is still not fully solved, as I am able to make a connection with Communicating with |
Hi guys @bastienvans @johneakin I believe the issue is now solved complely. Patch 0.4.1 is live! Thank you for reporting the issue and providing usefull information and logs. Please verify it is working for you properly. |
Thanks When you say completely solved, Do you mean also working for: wss://ws-feed.pro.coinbase.com |
wss://ws-feed.pro.coinbase.com is connecting and staying connected |
@johneakin Try adding a dummy send method and see if the you get the server's response. For me, adding send for "hello" in |
Yeah, you have to keep pinging it to stay connected. |
My fault, I wasn't sending the subscribe json client.connect("wss://ws-feed.pro.coinbase.com"); After I send that I get the frequent price updates in the: onMessageCallback |
@johneakin Great! I'm glad it's working now. |
Many thanks |
Fantastic! Thank you guys for bringing up the issue. |
Hello, I see the same issue while working with wss://stream.toggl.com/ws link. This link receives authentication token then decides to continue or disconnect. But in every attempt, it disconnects immediately before sending token. The patch also didn't worked for me. Any suggestions? |
Hi, Are you sure it's the same issue? Open a new issue and I will look into it. Gil |
Thanks, I've opened Issue 67 |
Using your example, I can connect to wss://echo.websocket.org but not wss://ws-feed.pro.coinbase.com, nor wss://api.bitfinex.com/ws/2.
I've tried with fingerprint and with client.setInsecure(), no luck.
Some logs:
14:19:08.149 -> connect ws...
14:19:08.149 -> [hostByName] request IP for: api.bitfinex.com
14:19:08.184 -> pm open,type:2 0
14:19:08.184 -> [hostByName] Host: api.bitfinex.com IP: 104.16.171.181
14:19:08.252 -> :ref 1
14:19:08.287 -> BSSL:_connectSSL: start connection
14:19:08.321 -> :wr 221 0
14:19:08.321 -> :wrc 221 221 0
14:19:08.356 -> :ack 221
14:19:08.391 -> :rn 536
.......................................
14:19:09.598 -> :rdi 32, 32
14:19:09.598 -> :c0 32, 43
14:19:09.632 -> BSSL:Connected!
14:19:09.632 -> :wr 180 0
14:19:09.632 -> :wrc 180 180 0
14:19:09.737 -> :ack 180
14:19:09.737 -> BSSL:read: failed
14:19:09.737 -> BSSL:read: failed
14:19:09.771 -> BSSL:read: failed
14:19:09.805 -> BSSL:read: failed
14:19:09.805 -> BSSL:read: failed
14:19:09.839 -> BSSL:read: failed
14:19:09.839 -> BSSL:read: failed
14:19:09.874 -> BSSL:read: failed
14:19:09.874 -> BSSL:read: failed
14:19:09.908 -> BSSL:read: failed
14:19:09.908 -> BSSL:read: failed
14:19:09.943 -> BSSL:read: failed
14:19:09.977 -> BSSL:read: failed
14:19:09.977 -> BSSL:read: failed
14:19:10.011 -> BSSL:read: failed
14:19:10.011 -> BSSL:read: failed
14:19:10.046 -> :rn 536
14:19:10.046 -> :rch 536, 173
14:19:10.080 -> :rch 709, 125
If I try connecting to the unsecured ones (ws://api.bitfinex.com/ws/2)
14:23:46.080 -> connect ws...
14:23:46.080 -> [hostByName] request IP for: api.bitfinex.com
14:23:46.115 -> pm open,type:2 0
14:23:46.149 -> [hostByName] Host: api.bitfinex.com IP: 104.16.175.181
14:23:46.183 -> :ref 1
14:23:46.218 -> :wr 159 0
14:23:46.218 -> :wrc 159 159 0
14:23:46.288 -> :ack 159
14:23:46.288 -> :rn 288
14:23:46.288 -> :wr 2 0
14:23:46.288 -> :wrc 2 2 0
14:23:46.323 -> :wr 2 0
14:23:46.323 -> :wrc 2 2 0
14:23:46.358 -> :ack 2
14:23:46.358 -> :rch 288, 332
14:23:46.358 -> :rcl
14:23:46.358 -> :abort
14:23:46.392 -> Connnection Closed
Any ideas?
Thanks a lot
The text was updated successfully, but these errors were encountered: