RisingStack / trace-nodejs

Trace is a visualised distributed tracing platform designed for microservices.
https://trace.risingstack.com
Other
471 stars 90 forks source link

TypeError: Cannot read property 'substring' of undefined #126

Closed ghost closed 7 years ago

ghost commented 7 years ago

I'm experiencing the following error:

[TypeError: Cannot read property 'substring' of undefined]
Uncaught exception: TypeError: Cannot read property 'substring' of undefined
    at Function.Module._resolveLookupPaths (module.js:214:22)
    at Function.Module._resolveFilename (module.js:316:31)
    at Function.Module._load [as _load__RS_original] (module.js:276:25)
    at Function.instrumentModule (/home/henrique/development/revmobads/console/node_modules/@risingstack/trace/lib/instrumentations/index.js:101:27)
    at Function._load (/home/henrique/development/revmobads/console/node_modules/@risingstack/trace/lib/instrumentations/index.js:153:40)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/henrique/development/revmobads/console/node_modules/node-horseman/lib/HorsemanPromise.js:4:18)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load [as _load__RS_original] (module.js:300:12)
    at Function._load (/home/henrique/development/revmobads/console/node_modules/@risingstack/trace/lib/instrumentations/index.js:166:21)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/henrique/development/revmobads/console/node_modules/node-horseman/lib/actions.js:11:23)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load [as _load__RS_original] (module.js:300:12)
    at Function._load (/home/henrique/development/revmobads/console/node_modules/@risingstack/trace/lib/instrumentations/index.js:166:21)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

More info:

module.exports = {
  serviceName : process.env.EB_ENV || 'console-api-2',
  apiKey      : '...'
}
ghost commented 7 years ago

Also, I turned debug on, and got the following messges:

risingstack/trace:agent:api #_sendSync Sending data to https://trace-collector-api.risingstack.com/transaction-events +1ms
risingstack/trace:agent:api #_sendSync [Error] Server responded with error [Error: Request timed out after 1003ms] +1s
dszakallas commented 7 years ago

Hi Henrique, there has been a bug with the bluebird instrumentation which affected a module that you used. Luckily it has been fixed with version 3.2.0. Could you try updating and see if the error goes away?

ghost commented 7 years ago

@szdavid92, thank you for the fix.

It's working just fine now :)