tursodatabase / tursodatabase/libsql-client-ts
Hrana 3 WebSocket tests are broken
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 576
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
penberg@vonneumann workers % export LOCAL=1
penberg@vonneumann workers % export URL=ws://localhost:8080
penberg@vonneumann workers % python3 ../../hrana-test-server/server_v3.py node test.js
INFO:server:Server is ready
Creating a local Worker...
[mf:inf] Ready on http://0.0.0.0:53171
[mf:inf] - http://127.0.0.1:53171
[mf:inf] - http://192.168.68.103:53171
Worker created on 127.0.0.1:53171
INFO:aiohttp.access:127.0.0.1 [06/Sep/2023:10:52:55 +0000] "GET / HTTP/1.1" 101 0 "-" "-"
TEST /execute: failed with status 500
Test failed
LibsqlError: HRANA_PROTO_ERROR: Received non-binary message from server with Protobuf encoding
at mapHranaError (worker.js:3984:12)
at WsClient2.execute (worker.js:4145:13)
at async /execute (worker.js:4453:16)
at async Object.fetch (worker.js:4439:7)
at async jsonError (worker.js:4519:12)
[mf:inf] GET /execute 500 Internal Server Error (19ms)
[mf:inf] GET /batch 500 Internal Server Error (4ms)
TEST /batch: failed with status 500
Test failed
LibsqlError: HRANA_PROTO_ERROR: Cursor is closed: ProtoError: Received non-binary message from server with Protobuf encoding
at mapHranaError (worker.js:3984:12)
at WsClient2.batch (worker.js:4160:13)
at async /batch (worker.js:4461:17)
at async Object.fetch (worker.js:4439:7)
at async jsonError (worker.js:4519:12)
INFO:aiohttp.access:127.0.0.1 [06/Sep/2023:10:52:55 +0000] "GET / HTTP/1.1" 101 0 "-" "-"
[mf:inf] GET /transaction 500 Internal Server Error (7ms)
TEST /transaction: failed with status 500
Test failed
LibsqlError: HRANA_PROTO_ERROR: Cursor is closed: ProtoError: Received non-binary message from server with Protobuf encoding
at mapHranaError (worker.js:3984:12)
at WsClient2.batch (worker.js:4160:13)
at async /transaction (worker.js:4485:5)
at async Object.fetch (worker.js:4439:7)
at async jsonError (worker.js:4519:12)
Stopping Worker...
Some tests failed
INFO:aiohttp.access:127.0.0.1 [06/Sep/2023:10:52:55 +0000] "GET / HTTP/1.1" 101 0 "-" "-"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the commands in the issue with hrana-test-server/server_v3.py and test.js, then inspect the failing WebSocket path indicated by worker.js. Determine why the tests receive non-binary messages where protobuf encoding is expected; done means the /execute, /batch, and /transaction tests pass without HRANA_PROTO_ERROR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100