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 'addAmazonSignatureV4' of undefined #31

Open
Vikas-kum opened this issue Jul 27, 2021 · 1 comment
Open

Comments

@Vikas-kum
Copy link

Vikas-kum commented Jul 27, 2021

I am getting this error when using this plugin with artillery.

My script.yaml looks like this:

config:
  # this hostname will be used as a prefix for each URI in the flow unless a complete URI is specified
  plugins:
    - "aws-sigv4":
        "serviceName": "execute-api"
    - "expect" : {}
  

  target: "<AWS api gateway host>"
  phases:
    -
      duration: 5 # 5 seocnds
      arrivalRate: 2 # 2 new veirtual users coming every second
      name: Warm up phase




scenarios:

  -
    beforeRequest: addAmazonSignatureV4
    flow:
      - post:
          url: /"{{ $processEnvironment.STAGE }}"/getId
          # request body goes in json
          json:
            input: "abc"
          
          expect:
            - statusCode: 200

versions:

38f9d370d4a3:load-test vikumar$ npm view artillery version
1.7.6
38f9d370d4a3:load-test vikumar$ npm view artillery-plugin-aws-sigv4 --version
6.14.13

Error:

.   WARNING: Plugin aws-sigv4 specified but module artillery-plugin-aws-sigv4 could not be found (MODULE_NOT_FOUND)
Started phase 0 (Warm up phase), duration: 5s @ 10:55:03(-0700) 2021-07-27
... /Users/<>/.npm-packages/lib/node_modules/artillery/core/lib/engine_http.js:280
        let processFunc = config.processor[fn];
                                          ^

TypeError: Cannot read property 'addAmazonSignatureV4' of undefined
    at iteratee (/Users/<>/.npm-packages/lib/node_modules/artillery/core/lib/engine_http.js:280:43)
    at /Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:181:20
    at iterate (/Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:262:13)
    at Object.async.forEachOfSeries.async.eachOfSeries (/Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:281:9)
    at Object.async.forEachSeries.async.eachSeries (/Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:214:22)
    at f (/Users/<>/.npm-packages/lib/node_modules/artillery/core/lib/engine_http.js:276:11)
    at fn (/Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:746:34)
    at /Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:1213:16
    at /Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:166:37
    at /Users/<>/.npm-packages/lib/node_modules/artillery/node_modules/async/lib/async.js:706:43

@mstoyanovv
Copy link

try installing the module globally. 'npm install -g artillery-plugin-aws-sigv4'

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