question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'capture' of null

See original GitHub issue

Error everytime trying to run a post, and with no check or verify yaml options, or verbose output not sure how i would tell what the issue is if its even related to the yaml file at all.

Version: 1.6.0-18

YAML

config:
    target: 'https://test.net'
    http:
        tls:
            rejectUnauthorized: false
        pool: 10
    phases:
        - duration: 10
          arrivalRate: 1
scenarios:
    - flow:
      - log: 'New virtual user authorizing'
      - post:
        url: '/api-authorizations/authorize'
        headers:
            Content-Type: application/json
            Accept: application/json
            ClientId: 123
        json:
            Audience: 'http://abc.com'
            ClaimSets: [1]
            Claims: 
              - Type: 'domain'
                Value: 'test.comt'
                ValueType: 'string'
                Issuer: 'http://postman.abc.com'
              - Type: 'extension_UserId'
                Value: '1'
                ValueType: 'string'
                Issuer: 'http://postman.abc.com'

Command Ran

 artillery run test.yaml
C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\lib\commands\run.js:307
        (params.capture && params.capture.xpath) ||
               ^

TypeError: Cannot read property 'capture' of null
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\lib\commands\run.js:307:16
    at Array.forEach (native)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\lib\commands\run.js:304:19
    at Array.forEach (native)
    at checkIfXPathIsUsed (C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\lib\commands\run.js:303:20)
    at fn (C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:746:34)
    at C:\Users\Administrato\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:1213:16
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:166:37
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:706:43
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:167:37

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
hassycommented, May 25, 2018

The YAML (as posted) needs an extra level of indentation under post, ie. the url, headers and json should be under get, not on the same level.

That said, the error message is not very friendly which is something we should address!

10reactions
alanhayescommented, Jan 28, 2020

This is why I hate YAML. 🤕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'capture' of null while running artillery.io ...
I get the following error when I try to run the command: artillery run realtime_transcribing_test.yaml : TypeError: Cannot read property ...
Read more >
Mobile Web Capture - Cannot read properties of null - ABBYY
When attempting to run Mobile Web Capture, the following error occurs: Uncaught TypeError: Cannot read properties of null (reading 'style').
Read more >
Solve - Cannot read property 'click' of Null in JavaScript
The "Cannot read property 'click' of null" error occurs when trying to call the click method on a null value. To solve the...
Read more >
uncaught typeerror: cannot read properties of null ... - You.com
1 The error says that jsonObject is null. You are testing if data is null. Therefore data must null expressed as JSON so...
Read more >
2686300 - errorMessage=Cannot read property 'id' of null
When entering a Contingent Worker the following error is seen before the Work Order section: CW Capture.PNG. errorId=null, timestamp=null, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found