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.

Cannot read property 'info' of undefined

See original GitHub issue

I have been getting this error whenever I refresh my Apollo graphql playground and based on the error trace request.logger inside tryAddEvent function (request completes ) is undefined

TypeError: Cannot read property 'info' of undefined
    at Object.listener (/home/akumzy/momo/planner-server/node_modules/hapi-pino/index.js:120:25)
    at module.exports.internals.Podium.internals.Podium.emit (/home/akumzy/momo/planner-server/node_modules/@hapi/podium/lib/index.js:224:107)
    at Request._finalize (/home/akumzy/momo/planner-server/node_modules/@hapi/hapi/lib/request.js:447:27)
    at Request._reply (/home/akumzy/momo/planner-server/node_modules/@hapi/hapi/lib/request.js:391:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Akumzycommented, Oct 18, 2019

Yeah I’ve been very busy. I’ll try and write a test for it and resubmit pr

0reactions
ben833commented, Feb 5, 2020

How to replicate:

  1. in hapi server’s options, set load: { sampleInterval: 1000, maxEventLoopDelay: 1 }
  2. start the server
  3. perform a manual API call for any route (e.g. using CURL/postman)

You get an error like this

{"level":30,"time":1580930988151,"pid":36837,"hostname":"Ben-Margolis-MacBook-Pro.local","tags":["load"],"data":{"eventLoopDelay":3.7898669838905334,"heapUsed":50385752,"rss":118018048},"v":1}
{"level":50,"time":1580930988164,"pid":36837,"hostname":"Ben-Margolis-MacBook-Pro.local","data":"unhandled rejection caught","v":1}
{"level":50,"time":1580930988167,"pid":36837,"hostname":"Ben-Margolis-MacBook-Pro.local","data":"Cannot read property 'info' of undefined","stack":"TypeError: Cannot read property 'info' of undefined\n    at Object.listener (/Users/ben.margolis/Sites/x/node_modules/hapi-pino/index.js:132:20)\n    at module.exports.internals.Podium.internals.Podium.emit (/Users/ben.margolis/Sites/x/node_modules/@hapi/podium/lib/index.js:227:107)\n    at Request._finalize (/Users/ben.margolis/Sites/x/node_modules/@hapi/hapi/lib/request.js:447:27)\n    at Request._reply (/Users/ben.margolis/Sites/x/node_modules/@hapi/hapi/lib/request.js:391:14)\n    at processTicksAndRejections (internal/process/task_queues.js:89:5)","type":"Error","v":1}

and the app crashes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Cannot read property 'info' of undefined - Stack Overflow
The issue is caused by keeping reference to "old" data array. During chart initialisation, you set the reference to data array, ...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
Fix: “Cannot Read Property of Undefined” Error in JavaScript
To fix the “cannot read property of undefined” error, use the optional chaining operator on the variable before accessing a property.
Read more >
Uncaught TypeError : Cannot read properties of undefined
The solution to TypeError: Cannot read properties of undefined ... The root cause of the error is that the declared variable doesn't have...
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