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

TypeError: Cannot read property 'error' of undefined #313

Open
pavanwashimkar opened this issue Jan 18, 2023 · 6 comments
Open

TypeError: Cannot read property 'error' of undefined #313

pavanwashimkar opened this issue Jan 18, 2023 · 6 comments

Comments

@pavanwashimkar
Copy link

Tried the steps mentioned for integration with new Relic of lambda written in node.js and getting below error.

Plugins: ["serverless-pseudo-parameters","serverless-newrelic-lambda-layers"]

× Stack bamboo-trigger-gui-test-01-dev failed to deploy (21s)
Environment: win32, node 14.20.0, framework 3.26.0, plugin 6.2.2, SDK 4.3.2
Credentials: Local, environment variables
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues

Error:
TypeError: Cannot read property 'error' of undefined
at D:\project\lambda\node_modules\serverless-newrelic-lambda-layers\dist\api.js:31:21
at processTicksAndRejections (internal/process/task_queues.js:95:5)

Can someone please suggest the solution for this error.

@workato-integration
Copy link

@mrickard
Copy link
Member

Thank you for the report, @pavanwashimkar ! This particular error...may stem from a serverless API change, which we'll look into. But for that error to be triggered, you likely had trouble fetching your New Relic account information. Have you verified that the values of your account ID and API key are correct in your serverless.yml?

@pavanwashimkar
Copy link
Author

pavanwashimkar commented Jan 20, 2023 via email

@pavanwashimkar
Copy link
Author

Hi All,

Just to update. I have edited the file api.js. Added the logger to check if proxy is causing the issue.
Not sure how but post that the deployment worked.

Added below logger:
console.log("Proxy is :: " + proxy);

@mrickard
Copy link
Member

@pavanwashimkar I'm not familiar at all with the serverless-pseudo-parameters plugin, but I see that it's deprecated, and not necessary if you're using Serverless beyond version 2.5.0. What happens if you don't use it?

What does your (sanitized) serverless.yml look like?

@mrickard
Copy link
Member

@pavanwashimkar One other thought: is the API key you're using an ingest key? Or a personal API key? The key required in the serverless.yml should be a personal API key, and not an ingest key.

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

2 participants