question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'length' of null

See original GitHub issue

I am getting this issue in session when i travel from one specific page to other, what can be the reason behind it

_http_outgoing.js:138

      this.outputSize += this._header.length;
                                         ^

TypeError: Cannot read property ‘length’ of null at ServerResponse.OutgoingMessage._send (_http_outgoing.js:138:38) at ServerResponse.OutgoingMessage.write (_http_outgoing.js:492:16) at ServerResponse.OutgoingMessage.end (_http_outgoing.js:589:10) at writeend (/home/…/my_app/node_modules/express-session/index.js:261:22) at Immediate.onsave (/home/…/my_app/node_modules/express-session/index.js:335:11) at runCallback (timers.js:666:20) at tryOnImmediate (timers.js:639:5) at processImmediate [as _immediateCallback] (timers.js:611:5)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
mohanencommented, May 8, 2017

Hi @dougwilson ,

I found the issue its due to the 404 error handling i wrote which messed up with WebSocket GET handshake

router.get('*', function(req, res) {
  res.status(404).send('Page NOT Found -_-\'');
}); 

Thanks and Regards.

1reaction
dougwilsoncommented, Jul 13, 2017

@Vinno97 provided some valuable information over in the Express repo. If you’re encountering this issue and using the express-ws module, you can follow the issue in the tracker at https://github.com/HenningM/express-ws/issues/64

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Solved] TypeError: Cannot read property 'length' of null
This error indicates that the code is trying to compute the length property on a null variable. A null variable holds no or...
Read more >
Cannot read property 'length' of null (javascript) - Stack Overflow
From the code that you have provided, not knowing the language that you are programming in. The variable capital is null. When you...
Read more >
Cannot Read Property Length of Undefined in JavaScript
The JavaScript TypeError: Cannot read property 'length' of undefined occurs when the length property is read on an undefined variable.
Read more >
TypeError : Cannot read property "length" from null
The cause of this issue is due to Payload size which is more than 5mb in the rest call. ... "Plain text processor,...
Read more >
Uncaught TypeError: Cannot read property 'length' of null error
Hello, I am getting the error “Uncaught TypeError: Cannot read property 'length' of null” in the console and cannot figure out why this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found