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.

[Bug] unhandledException TypeError: segment.transaction.isActive is not a function

See original GitHub issue

newrelic causes unhandledException and crashes the process

TypeError: segment.transaction.isActive is not a function
    at Shim.getActiveSegment (/usr/src/app/node_modules/newrelic/lib/shim/shim.js:1329:61)
    at AsyncHook.afterHook (/usr/src/app/node_modules/newrelic/lib/instrumentation/core/async_hooks.js:88:31)
    at emitAfterNative (internal/async_hooks.js:164:40)
    at <anonymous>
    at process._tickDomainCallback [as _tickCallback] (internal/process/next_tick.js:229:7)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelgoincommented, Oct 30, 2019

With version 5.13.0 we made the segment reference we add to the output request non-enumerable to hopefully avoid these issues.

Has anyone upgraded and are they still having issues?

1reaction
bkapus2commented, Jul 26, 2019

So my team had this same issue occurring.

Steps to resolve: 1 - determine when the segment that throws the error is being set Screen Shot 2019-07-26 at 4 08 36 PM 2 - add a proxy getter/setter to that segments transaction Screen Shot 2019-07-26 at 4 18 16 PM 3 - on that debugger statement look at the stack trace Screen Shot 2019-07-26 at 4 20 21 PM 4 - find your culprit Screen Shot 2019-07-26 at 4 10 59 PM

For us we were logging a Hapi request.response. The response had an .agent which was the newrelic Agent, which went into the pino logger library which used fast-safe-stringify which traversed the Agent object deeply and converted any circular references into the string '[Circular]'.

Read more comments on GitHub >

github_iconTop Results From Across the Web

segment.transaction.isActive is not a function
newrelic causes unhandledException and crashes the process TypeError: segment.transaction.isActive is not a function at Shim.
Read more >
transactions.map is not a function in reacts JS ...
I am a beginner for react js and getting Uncaught TypeError: transactions.map is not a function in reacts JS. import React, { useState, ......
Read more >
Past Resolved and Known Issues by Release
The search function has intermittent issues: either no results are returned ... Node.js Agent, The Business Transaction URL segments are not being split....
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/28 19 ...
Bug :128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >
Bug List: Graphiti: All open issues
readFile() does not honor loadOptions wich cause issues with encoding, 2.8.3, --- ... CLOS, WORK, textJavaQueries::getName : type error on java.
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