hyperledger / aries-agent-test-harness

Aries agent test framework, with agent backchannel support
https://aries-interop.info
Apache License 2.0
60 stars 65 forks source link

AFJ Test Agent Not starting with Askar and Indy VDR config errrors #658

Closed swcurran closed 1 year ago

swcurran commented 1 year ago

The AFJ agents are not starting. Example commands

./manage build -a javascript
LEDGER_URL_CONFIG=http://test.bcovrin.vonx.io TAILS_SERVER_URL_CONFIG=https://tails.vonx.io ./manage run -d javascript -n -t @RFC0160

Output logs:

using ngrok end point [bob_agent-ngrok]
Fetching end point from ngrok service
ngrok not ready, sleeping 5 seconds....
Fetching end point from ngrok service
fetched end point [https://64cc-96-54-62-211.ngrok.io]
Starting AFJ agent ...
yarn run v1.22.19
$ /src/node_modules/.bin/ts-node src/index.ts -p 9030 -i false
/src/node_modules/ts-node/src/index.ts:744
    return new TSError(diagnosticText, diagnosticCodes);
           ^
TSError: ⨯ Unable to compile TypeScript:
src/TestAgent.ts:109:18 - error TS2554: Expected 1 arguments, but got 0.

109     anoncredsRs: new AnonCredsRsModule(),
                     ~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@aries-framework/anoncreds-rs/build/AnonCredsRsModule.d.ts:6:17
    6     constructor(config: AnonCredsRsModuleConfigOptions);
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'config' was not provided.
src/TestAgent.ts:110:32 - error TS2345: Argument of type '{ networks: [IndyVdrPoolConfig]; }' is not assignable to parameter of type 'IndyVdrModuleConfigOptions'.
  Property 'indyVdr' is missing in type '{ networks: [IndyVdrPoolConfig]; }' but required in type 'IndyVdrModuleConfigOptions'.

110     indyVdr: new IndyVdrModule({
                                   ~
111       networks: [indyNetworkConfig],
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112     }),
    ~~~~~

  node_modules/@aries-framework/indy-vdr/build/IndyVdrModuleConfig.d.ts:38:5
    38     indyVdr: IndyVdr;
           ~~~~~~~
4:12)
    at reportTSError (/src/node_modules/ts-node/src/index.ts:748:19)
    at getOutput (/src/node_modules/ts-node/src/index.ts:935:36)
    at Object.compile (/src/node_modules/ts-node/src/index.ts:1237:30)
    at Module.m._compile (/src/node_modules/ts-node/src/index.ts:1364:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Object.require.extensions.<computed> [as .ts] (/src/node_modules/ts-node/src/index.ts:1368:12)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19) {
  diagnosticText: '\x1B[96msrc/TestAgent.ts\x1B[0m:\x1B[93m109\x1B[0m:\x1B[93m18\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2554: \x1B[0mExpected 1 arguments, but got 0.\n' +
    '\n' +
    '\x1B[7m109\x1B[0m     anoncredsRs: new AnonCredsRsModule(),\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                 ~~~~~~~~~~~~~~~~~~~~~~~\x1B[0m\n' +
    '\n' +
    '  \x1B[96mnode_modules/@aries-framework/anoncreds-rs/build/AnonCredsRsModule.d.ts\x1B[0m:\x1B[93m6\x1B[0m:\x1B[93m17\x1B[0m\n' +
    '    \x1B[7m6\x1B[0m     constructor(config: AnonCredsRsModuleConfigOptions);\n' +
    '    \x1B[7m \x1B[0m \x1B[96m                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1B[0m\n' +
    "    An argument for 'config' was not provided.\n" +
    "\x1B[96msrc/TestAgent.ts\x1B[0m:\x1B[93m110\x1B[0m:\x1B[93m32\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type '{ networks: [IndyVdrPoolConfig]; }' is not assignable to parameter of type 'IndyVdrModuleConfigOptions'.\n" +
        'indyVdr' is declared here.
src/TestAgent.ts:116:12 - error TS2554: Expected 1 arguments, but got 0.

116     askar: new AskarModule(),
               ~~~~~~~~~~~~~~~~~

  node_modules/@aries-framework/askar/build/AskarModule.d.ts:6:17
    6     constructor(config: AskarModuleConfigOptions);
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'config' was not provided.

    at createTSError (/src/node_modules/ts-node/src/index.ts:74"  Property 'indyVdr' is missing in type '{ networks: [IndyVdrPoolConfig]; }' but required in type 'IndyVdrModuleConfigOptions'.\n" +
    '\n' +
    '\x1B[7m110\x1B[0m     indyVdr: new IndyVdrModule({\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                               ~\x1B[0m\n' +
    '\x1B[7m111\x1B[0m       networks: [indyNetworkConfig],\n' +
    '\x1B[7m   \x1B[0m \x1B[91m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1B[0m\n' +
    '\x1B[7m112\x1B[0m     }),\n' +
    '\x1B[7m   \x1B[0m \x1B[91m~~~~~\x1B[0m\n' +
    '\n' +
    '  \x1B[96mnode_modules/@aries-framework/indy-vdr/build/IndyVdrModuleConfig.d.ts\x1B[0m:\x1B[93m38\x1B[0m:\x1B[93m5\x1B[0m\n' +
    '    \x1B[7m38\x1B[0m     indyVdr: IndyVdr;\n' +
    '    \x1B[7m  \x1B[0m \x1B[96m    ~~~~~~~\x1B[0m\n' +
    "    'indyVdr' is declared here.\n" +
    '\x1B[96msrc/TestAgent.ts\x1B[0m:\x1B[93m116\x1B[0m:\x1B[93m12\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2554: \x1B[0mExpected 1 arguments, but got 0.\n' +
    '\n' +
    '\x1B[7m116\x1B[0m     askar: new AskarModule(),\n' +
    '\x1B[7m   \x1B[0m \x1B[91m           ~~~~~~~~~~~~~~~~~\x1B[0m\n' +
    '\n' +
    '  \x1B[96mnode_modules/@aries-framework/askar/build/AskarModule.d.ts\x1B[0m:\x1B[93m6\x1B[0m:\x1B[93m17\x1B[0m\n' +
    '    \x1B[7m6\x1B[0m     constructor(config: AskarModuleConfigOptions);\n' +
    '    \x1B[7m \x1B[0m \x1B[96m                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1B[0m\n' +
    "    An argument for 'config' was not provided.\n",
  diagnosticCodes: [ 2554, 2345, 2554 ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
swcurran commented 1 year ago

Fixed by #659