Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert undefined or null to object at Function.keys at Transport.queryParser #385

Closed
ddbhagat opened this issue Oct 17, 2023 · 4 comments

Comments

@ddbhagat
Copy link

Getting below error out of sudden without any code changes on AWS Lambda.

TypeError: Cannot convert undefined or null to object
at Function.keys ()
at Transport.queryParser (/opt/nodejs/node_modules/newrelic/lib/instrumentation/@elastic/elasticsearch.js:58:49)
at DatastoreShim.parseQuery (/opt/nodejs/node_modules/newrelic/lib/shim/datastore-shim.js:456:35)
at Transport.queryRecord (/opt/nodejs/node_modules/newrelic/lib/shim/datastore-shim.js:670:25)
at Transport.wrapper (/opt/nodejs/node_modules/newrelic/lib/shim/shim.js:850:33)
at Client.getApi [as get] (/var/task/node_modules/@elastic/elasticsearch/api/api/get.js:62:25)
at e.exports.get (/var/task/functions/graphql.js:1:95039)
at e.exports.get (/var/task/functions/graphql.js:1:120393)
at Object.part (/var/task/functions/graphql.js:1:39923)
at field.resolve (/var/task/node_modules/apollo-server-core/dist/utils/schemaInstrumentation.js:56:26)

@workato-integration
Copy link

@bizob2828
Copy link
Member

Hi @ddbhagat sorry for your troubles. This is a duplicate of newrelic/node-newrelic#1809. We hope to have a fix released this week. I'm going to close this one and I'll let you know when we have released the fix.

@ddbhagat
Copy link
Author

@bizob2828 But why are we getting this error without any package upgrades ? We simply deployed with same set of newrelic package

@villelahdenvuo
Copy link

@ddbhagat It is a bug in the new elasticsearch instrumentation, perhaps you upgraded but didn't hit this codepath before? We got lucky because it got detected in E2E our tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants