potential client bug after 0.3.4 when sending slightly larger first message

Open
#230 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
networking

Research direction

Start by reproducing the GDAX websocket failure with the old and new subscription messages across versions 0.3.4 through 0.4.2, while capturing the DEBUG and close-code output. Trace the client’s handling of the initial message and UTF-8 errors; done means identifying the regression and confirming that the larger subscription message no longer causes the connection to close unexpectedly.

Written by the indexing model from the issue text.

Description

Hello! Thanks for the library.

I have been using this library to interface with the GDAX websocket feed. While upgrading to their new websocket protocol, the size of the subscription message increased. Now, I keep getting some UTF-8 error on log level DEBUG with 0.4.2 and 0.3.5:

2017-09-11 22:18:51,240 - ws4py - DEBUG - Error message received (1007) 'b'Invalid UTF-8 bytes''
2017-09-11 22:18:51,241 - root - WARNING - Closed down, code 1006: Going away

Under 0.4.1 and 0.4.0, I don't get the UTF-8 error, but the websocket closes in the same way:

2017-09-11 22:20:24,368 - root - WARNING - Closed down, code 1006: Going away

On 0.3.4, I don't get any errors.

Old subscription message: msg = """{"type": "subscribe","product_ids":["BTC-USD"]}"""
New subscription message: msg = """{"type": "subscribe", "product_ids": ["BTC-USD"], "channels": ["ticker", "level2"]}"""

Let me know if you need anything else.

Dominant language
Python
Stars
1.1k
Forks
285
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Lawouach/WebSocket-for-Python

All issues in Lawouach/WebSocket-for-Python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.