Comments (6)
Interestingly, at a certain threshold the fragmentation tests start to pass, such as 9.3.9 & 9.4.9. Sending out smaller chunks = tests fail for some reason.
from undici.
What I am currently looking is 2.6. it seems that a frame containing 125 times 0xfe is not properly processed. I assume that we should actually fast forward the 125 times 0xfe but we dont, we do a consume(2) and not consume(payloadLength).
Undici:
aras@aras-Lenovo-Legion-5-17ARH05H:~/workspace/undici$ npm run test:websocket:autobahn
npm warn cli npm v10.7.0 does not support Node.js v23.0.0-nightly20240507be8d64ec14. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.
> [email protected] test:websocket:autobahn
> node test/autobahn/client.js
(node:95584) [UNDICI-WS] Warning: WebSockets are experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
<Buffer 81 01>
<Buffer 88 00>
Running test case 1/1
<Buffer 89 7d>
<Buffer fe fe>
Error: Invalid opcode received
at failWebsocketConnection (/home/aras/workspace/undici/lib/web/websocket/util.js:207:14)
at ByteParser.run (/home/aras/workspace/undici/lib/web/websocket/receiver.js:73:11)
at ByteParser._write (/home/aras/workspace/undici/lib/web/websocket/receiver.js:49:10)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.onSocketData (/home/aras/workspace/undici/lib/web/websocket/connection.js:283:29)
at Socket.emit (node:events:520:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
<Buffer 88 00>
ws:
aras@aras-Lenovo-Legion-5-17ARH05H:~/workspace/ws$ node test/autobahn
<Buffer 81 01>
<Buffer 88 00>
Running test case 1/1
<Buffer 89 7d>
<Buffer 88 02>
<Buffer 88 00>
from undici.
The state at the beginning of the loop:
undici:
aras@aras-Lenovo-Legion-5-17ARH05H:~/workspace/undici$ npm run test:websocket:autobahn
npm warn cli npm v10.7.0 does not support Node.js v23.0.0-nightly20240507be8d64ec14. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.
> [email protected] test:websocket:autobahn
> node test/autobahn/client.js
(node:96897) [UNDICI-WS] Warning: WebSockets are experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
{ state: 0 }
<Buffer 81 01>
{ state: 4 }
{ state: 0 }
<Buffer 88 00>
Running test case 1/1
{ state: 0 }
<Buffer 89 7d>
{ state: 0 }
<Buffer fe fe>
Error: Invalid opcode received
at failWebsocketConnection (/home/aras/workspace/undici/lib/web/websocket/util.js:207:14)
at ByteParser.run (/home/aras/workspace/undici/lib/web/websocket/receiver.js:74:11)
at ByteParser._write (/home/aras/workspace/undici/lib/web/websocket/receiver.js:49:10)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.onSocketData (/home/aras/workspace/undici/lib/web/websocket/connection.js:283:29)
at Socket.emit (node:events:520:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
{ state: 0 }
<Buffer 88 00>
ws:
aras@aras-Lenovo-Legion-5-17ARH05H:~/workspace/ws$ node test/autobahn
{ state: 0 }
<Buffer 81 01>
{ state: 4 }
{ state: 0 }
<Buffer 88 00>
{ state: 4 }
Running test case 1/1
{ state: 0 }
<Buffer 89 7d>
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 4 }
{ state: 0 }
{ state: 0 }
<Buffer 88 02>
{ state: 4 }
{ state: 0 }
<Buffer 88 00>
{ state: 4 }
from undici.
It's literally a single bug and the rest of the tests will start passing. That's super annoying.
from undici.
Its super annoying that the autobahn workflow did not post atleast once a comment on the PR. I would like to see it.
Anyhow, we should set then the env variable FAIL_ON_ERROR to true in the workflow to fail if somebody adds a PR which breaks the autobahn.
Also i wonder, there are some tests reporting being not strict. We should review them. Maybe we beed to make them strict?
from undici.
non-strict is passing, no reason to touch them until there's nothing else to do
from undici.
Related Issues (20)
- WebSocket performance / benchmarking
- When data is empty, WebSocket will not fire a message event. HOT 1
- Improve docs on Interceptors HOT 1
- WHATWG handling of URLs that include username:password (credentials) HOT 14
- Large number of parallel requests always result in an error HOT 2
- Content-Length header should be ignored by fetch HOT 4
- Fetching headers of small files causes node process to terminate after 8 seconds since GHSA-9f24-jqhm-jfcw HOT 1
- Implement HTTP caching HOT 9
- Only use one network request when identical requests are made HOT 6
- TypeError and Access Issues in jsdom Environment Post Update to undici 6.16.0 HOT 4
- websocket: a number of conditions fail the connection but do not emit an error event
- websocket: handle parser errors more consistently
- running autobahn test suite HOT 4
- Interceptors: add response decompress interceptor HOT 4
- Implement Request/Response `.bytes()` method
- permessage-deflate support in websocket HOT 1
- Optimization of websocket masking HOT 9
- bug: spreading `Headers` object has breaking behavior in versions between Node 20.12 and 20.13 HOT 9
- Limit the maximum numbers of open sockets HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undici.