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.

Winston Logging Transports crashing

See original GitHub issue

Environment details

  • OS: Google App-Engine
  • Node.js version: 8
  • npm version: 6.7.0
  • @google-cloud/logging version: 4.2.0

Steps to reproduce

  1. ?
  2. ?
<rejected> TypeError: Cannot read property 'length' of undefined
at BundleExecutor.schedule (/app/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/bundling.js:319:43)
at status.call (/app/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/bundling.js:443:30)
at Canceller.call (/app/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/api_callable.js:78:27)
at Bundleable.call (/app/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/bundling.js:442:20)
at funcWithAuth.then.then.apiCall (/app/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/api_callable.js:312:23)
at <anonymous> at process._tickCallback (internal/process/next_tick.js:189:7)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
alexander-fenstercommented, Feb 12, 2019

Hello @seriousManual,

Have you identified any circumstances that lead to this error?

Yes and no. I made a fix https://github.com/googleapis/gax-nodejs/pull/424 in exactly the place where it fails so it should not fail anymore (we’ll release the new version of that package today). When all the dependency chain upgrades, the error condition should stop happening.

As for what causes the error - i.e. what causes the undefined value to be passed to logging - I don’t have an answer I’m confident in. One idea is that it might be doing that if it gets an object with circular references, but it makes me think there should be another explanation, given that all these bug reports started coming from several people at the same time. @stephenplusplus can I ask you to take a deeper look at what’s going on (why this undefined value appears there)?

1reaction
seriousManualcommented, Feb 15, 2019

Same here, haven’t seen the issue on our development system for a while now!

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

winston - how to log errors which cause node process to crash?
I am wondering if there is a way to set up Winston to handle node crashing, and logging the issue that shows up...
Read more >
A Complete Guide to Winston Logging in Node.js - Better Stack
Transporting your logs to various locations. How to log uncaught exceptions automatically. Centralizing your Winston logs in one place.
Read more >
winston.LoggerInstance.error JavaScript and Node.js code ...
logger.error('Error caused Node-Mailin to crash.');... logger.error('Please ... Best JavaScript code snippets using winston.LoggerInstance.error(Showing top ...
Read more >
A Guide Into Logging in Node.js using Winston - Bird Eats Bug
If we incorporated logging, there's a chance that we can review the logs and trace the specific events that occurred leading up to...
Read more >
Cloud Logging for Winston - Node.js client library
A Cloud Logging transport will be created automatically ... is thrown - if error is not handled properly, it could crash the application....
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