Appdynamics / Appdynamics/Node.js-Demo-App

TypeError: Cannot read property 'logError' of undefined

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
13
PR merge metrics
No merged PRs in 30d

Description

I am running **node version 14** and latest version of **appD 20.6.0**

I see the error when i run the test script for our node program:

` "test": "DISABLE_LOGS=1 NODE_ENV=test nyc -x \"**/tests/**\" --reporter=lcov mocha tests --config ./tests/.mocharc.json",
`
TypeError: Cannot read property 'logError' of undefined
at LibagentConnector.logError (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/appdynamics/lib/libagent/libagent-connector.js:367:17)
at Logger.error (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/appdynamics/lib/core/logger.js:177:28)
at Agent.init (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/appdynamics/lib/core/agent.js:319:17)
at AppDynamics.self. [as profile] (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/appdynamics/lib/core/agent.js:611:26)
at Object. (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/app.js:2:531)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Module.replacementCompile (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Object. (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/append-transform/index.js:64:4)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/tests/controllers/acceptTNC/index_test.js:2:13)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Module.replacementCompile (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Object. (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/append-transform/index.js:64:4)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.exports.requireOrImport (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/mocha/lib/esm-utils.js:20:12)
at Object.exports.loadFilesAsync (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/mocha/lib/esm-utils.js:33:34)
at async singleRun (/Users/vaibhavacharya/Desktop/companyName/mobile-backend-ra11-va/node_modules/mocha/lib/cli/run-helpers.js:156:3)
npm ERR! Test failed. See above for more details.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with Node 14, appD 20.6.0, and the test command shown. Start at app.js and the referenced stack-trace locations in node_modules/appdynamics/lib/core/agent.js, core/logger.js, and libagent/libagent-connector.js, then run tests/controllers/acceptTNC/index_test.js. Done means the test command completes without the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.