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.

calendar fetch fails with header size exceeded, breaking node js change

See original GitHub issue

forum topic https://forum.magicmirror.builders/topic/14257/overflow-with-calendar

see https://github.com/nodejs/node/issues/24692

node has made the max header size 8000 down from 80,000. we have some bad servers which are sending the data in the headers too…

[2020-12-19 08:28:33.818] [ERROR]  Calendar Error. Could not fetch calendar:  https://sfxbrugge.smartschool.be/index.php/deeplink/0426/f90a2a81-5fdf-416f-a52a-1316eee8efc9 Error: Parse Error
    at TLSSocket.socketOnData (_http_client.js:452:22)
    at TLSSocket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17) {
  bytesParsed: 8264,
  code: 'HPE_HEADER_OVERFLOW',
  reason: 'Header overflow'

the url above is invalidated(by me) so it could be posted here… I can advise someone else the corrected url

the workaround --max-http-header-size=??? some number doesn’t work

 node ./node_modules/.bin/electrons/electron.js --max-http-header-size=10000

I upgraded to latest stable node, 14.15.3

same error

I added the maxHeaderSize value to the request options

		const opts = {
			headers: {
				"User-Agent": "Mozilla/5.0 (Node.js " + nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)"
			},
			maxHeaderSize: 12000,
			gzip: true
		};

same error…

i don’t know any other approach to resolving this… help

fails on 2-14-develop as well, on node 14.15.3 also

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
sdetweilcommented, Dec 20, 2020

i do not think we need to implement any fixes. I was waiting til the user confirmed it worked for him. but it worked for me.

and the workaround is easy to do

I appreciate your help

0reactions
sdetweilcommented, Dec 23, 2020

user confirmed parameter resolved problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

nodeJS max header size in http.request
The total size of HTTP headers received by Node.js now must not exceed 8192 bytes. In our case, we updated versions of Node...
Read more >
Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
Read more >
Firebase Apple SDK Release Notes - Google
Fixed a race condition where a download size could exceed the value of the maxSize ... Breaking change: import Firebase will no longer...
Read more >
Upload file data | Google Drive
Add the file's data to the request body. · Add these HTTP headers: Content-Type . Set to the MIME media type of the...
Read more >
AWS Lambda function errors in Node.js
When your code raises an error, Lambda generates a JSON representation of the error. This error document appears in the invocation log and,...
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