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

Error: Object has not member json when used with kms client #50

Open
xescuder opened this issue Jul 13, 2023 · 1 comment
Open

Error: Object has not member json when used with kms client #50

xescuder opened this issue Jul 13, 2023 · 1 comment

Comments

@xescuder
Copy link

xescuder commented Jul 13, 2023

Hi. I've a script that uses the KMSClient to generate a data key from AWS:

  import { AWSConfig, KMSClient } from 'https://jslib.k6.io/aws/0.8.0/kms.js';

  export function setup() {
    return {
        dataKey: kms.generateDataKey(keyAlias, 32)
     };

All script works fine and I am able to send and generate correctly everything.

If I add the import:

import { crypto } from "k6/experimental/webcrypto";

The code fails with:
ERRO[0003] TypeError: Object has no member 'json' at value (webpack://k6-jslib-aws/./src/internal/kms.ts:118:39(93)) at setup (file:///Users/escuderx/Projects/nst_performance_testing/script.js:73:70(15)) hint="script exception"

Can you give me some advice? I don't see why this library is impacting the code, and not the others.

@olegbespalov
Copy link
Contributor

Hi @xescuder

I'm sorry for not getting back to you sooner.

I believe you faced the issue that was fixed in #56

Let me know if that's still reproducible with the latest version of the module.

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

No branches or pull requests

2 participants