-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Cannot set property 'parsingHeadersStart' of undefined on 10.15.2 #26366
Comments
@mcollina @nodejs/http |
I’ll send a PR in tomorrow morning. |
Can you please include a repro if you can? |
I've investigated this issue, and I cannot understand when this can happen: we are only setting the Line 758 in fedc31b
undefined . However I don't understand in what conditions it can be undefined and write a specific unit test.
|
@rvagg @sam-github @jasnell @addaleax @apapirovski @mscdex do you have any idea? |
Without a repro, no I have no idea |
No idea, either 😕 |
I've tried to repro this locally and cannot. 😕 Is there anything else that I might be able to provide as insight? |
Are you using any framework? Which ones? Can you run Node with |
@bjjenson On Heroku, you can do this by running |
same issue in docker containers |
@jasine can you provide a repro for this? Even the output of a run with |
@mcollina run with
|
Code to reproduce: 'use strict';
const http = require('http');
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('okay', () => { delete res.socket.parser });
res.end();
});
server.listen(1337, '127.0.0.1');
const req = http.request({
port: 1337,
host: '127.0.0.1',
method: 'GET',
});
req.end(); |
the web framework i use is egg , as far as I know, it is based on koa, all of the http request is ok, the issue happened when the websocket connected, the client and server side websocket library is socket.io |
@jasine what version of socket.io? Run const Koa = require('koa');
const socketio = require('socket.io');
const { createServer } = require('http');
const body = `<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="/socket.io/socket.io.js"></script>
<script>
(function () {
const socket = io('http://localhost:3000');;
socket.on('connect', function() {
console.log('open');
});
})();
</script>
</body>
</html>`;
const app = new Koa();
app.use(async function(ctx) {
ctx.body = body;
});
const server = createServer(app.callback());
const io = socketio(server);
io.on('connection', function() {});
server.listen(3000, function() {
console.log('Listening on [::]:3000');
}); |
i have the same issue too when try to connect in socket.io version: And i find that it will work well at node@8.15.0, and crash at node@8.15.1 |
@mcollina Same issue. Here is a repro with egg.js: egg-socket.io-error-demo Node version: v8.15.1 (and v8.15.0 is well...) Error message:
|
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: nodejs#26366
The problem is that This is not ok and can break again in future. |
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: nodejs#26366 PR-URL: nodejs#26402 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
i have a idea , client 不要用socket-client 换成egg-socket.io 可以 |
10.15.2
Ubuntu 18.04
Out of the blue all of my build servers started to crash today. Each time a request comes in we receive the following error.
Node crashes.
This is related to version 10.15.2.
After rolling back to 10.15.1 we do not have any more issues.
The text was updated successfully, but these errors were encountered: