Lambda: Cannot read properties of null (reading 'toString')
See original GitHub issueVersion info:
Artillery Core: 2.0.0-23
Artillery Pro: not installed (https://artillery.io/product)
Node.js: v19.0.0
OS: win32
Running this command:
artillery run --platform aws:lambda --platform-opt region=us-east-1 --environment 29r artillery-test.yml
I expected to see this happen:
Lambda would spin up and run the tests.
Instead, this happened:
Failure with this error message output:
λ Creating AWS Lambda function...
- Installing dependencies
C:\Users\17077\AppData\Roaming\npm\node_modules\artillery\lib\platform\aws-lambda\index.js:104
artillery.log(stdout.toString(), stderr.toString(), status, error);
^
TypeError: Cannot read properties of null (reading 'toString')
at PlatformLambda.init (C:\Users\17077\AppData\Roaming\npm\node_modules\artillery\lib\platform\aws-lambda\index.js:104:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Launcher.run (C:\Users\17077\AppData\Roaming\npm\node_modules\artillery\lib\launch-platform.js:351:25)
Node.js v19.0.0
Files being used:
Changed for obscurity/security reasons but this is the artllery-test.yml
file:
config:
environments:
29r:
target: "https://example.com"
variables:
apiKey: "123456"
eventGuid: "8d683883-6519-44ba-b25a-655c6490c1d7"
phases:
- duration: 300
arrivalRate: 500
before:
flow:
- name: "Get member IDs for the Event"
- get:
url: "/origin/GetAllMembers/{{ eventGuid }}"
headers:
X-ApiKey: "{{ apiKey }}"
capture:
- json: "$"
as: "memberIds"
scenarios:
- name: "Get Member Origins"
flow:
- loop:
- get:
url: "/origin/RetrieveOrigins/{{ $loopElement }}"
over: "{{ $memberIds }}"
Issue Analytics
- State:
- Created a year ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
AWS lambda TypeError: Cannot read property 'toString' of ...
In the above code line var connectionString=data.Body.toString(); am converting the received data to string but the toString() is not working.
Read more >TypeError: Cannot read property 'toString' of Null in JS
The "Cannot read property 'toString' of null" error occurs when the toString() method is called on a null value. To solve the error,...
Read more >TypeError: Cannot read property 'toString' of null Error on AWS ...
I'm getting the following error in the SAM local environment: { "errorType": "TypeError", "errorMessage": "Cannot read property 'toString' ...
Read more >AWS Lambda function errors in Node.js
This page describes how to view Lambda function invocation errors for the Node.js runtime using the Lambda console and the AWS CLI.
Read more >Node.js v19.3.0 Documentation
node:crypto module methods and properties ... CORS is never checked on the destination server; Cannot load non-network ... ifError(null); // OK assert.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope. Artillery doesn’t appear to work even on the happy path for Lambda integration.
same issue here,
MemorySize
error.I double checked my AWS quotes, and my quota for lambda max mem size for the region I’m targetting is 10gb.