TypeError: Cannot call method 'push' of undefined
See original GitHub issueI’m guessing that this is actually a dicer bug, but I’m seeing this in my logs (causing server restarts):
TypeError: Cannot call method 'push' of undefined
at Dicer._write (/home/app/dojo/node_modules/busboy/node_modules/dicer/lib/Dicer.js:103:17)
at doWrite (_stream_writable.js:221:10)
at writeOrBuffer (_stream_writable.js:211:5)
at Dicer.Writable.write (_stream_writable.js:180:11)
at Multipart.write (/home/app/dojo/node_modules/busboy/lib/types/multipart.js:227:24)
at Busboy._write (/home/app/dojo/node_modules/busboy/lib/main.js:67:16)
at doWrite (_stream_writable.js:221:10)
at writeOrBuffer (_stream_writable.js:211:5)
at Busboy.Writable.write (_stream_writable.js:180:11)
at write (_stream_readable.js:583:24)
at flow (_stream_readable.js:592:7)
at _stream_readable.js:560:7
at process._tickDomainCallback (node.js:459:13)
I can’t reproduce this in tests though.
Here are the headers:
{ host: '[redacted]',
accept: '*/*',
'accept-encoding': 'gzip, deflate',
'accept-language': 'en-us',
'content-type': 'multipart/form-data; charset=utf-8; boundary=0xKhTmLbOuNdArY',
cookie: '[redacted]',
'user-agent': '[redacted]/122 CFNetwork/672.0.8 Darwin/14.0.0',
'x-client-build': '122',
'x-client-identifier': 'iOS',
'x-client-version': '2.4',
'x-forwarded-for': '[redacted]',
'x-forwarded-port': '80',
'x-forwarded-proto': 'http',
'content-length': '1449',
connection: 'close' }
These don’t seem to be sufficient to reproduce the error in tests though. I don’t have an example body either, unfortunately.
Using busboy 0.2.1.
Thanks!
Issue Analytics
- State:
- Created 10 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
"Cannot call method 'push' of undefined" while it IS defined
Since it's possible to push an undefined variable into an array without error, the problem must be that input isn't defined when you...
Read more >TypeError: Cannot read Property 'push' of Undefined in JS
The "Cannot read property push of undefined" error occurs when trying to call the push() method on an undefined value. Make sure the...
Read more >Console error “Cannot call method 'push' of undefined” when ...
This is caused by custom code for tracking user activity that cannot be executed during page edit. Resolution. Wrap the custom code in ......
Read more >How to Fix TypeError: Cannot read Property 'push' of ...
You call the method on a variable previously set to undefined . · You call the method on a variable before it has...
Read more >.push() - TypeError: Cannot call method 'call' of undefined
All my code is on github where its nicer to look at so i've just linked to their. I am trying to fully...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m getting this occasionally too. Here’s the code I’m using:
Thanks for this! it’s been running in production for me for a couple of days now (under pretty heavy load), and everything looks great.