Closed rodmenm closed 5 months ago
Hello, which versions are you using? Maybe try upgrading to 0.5.1. You could also post the issues you encounter when creating the agent.
Im using @aries-framework packages, I got this version of cheqd "@aries-framework/cheqd": "^0.4.2", and im getting this error and logs (in this order) when initializing the agent.
idp | INFO: Creating agent with config { idp | "agentConfig": { idp | "label": "I_agente", idp | "walletConfig": { idp | "id": "Issuer_wallet", idp | "key": "[]", idp | "keyDerivationMethod": "ARGON2I_MOD", idp | "storage": { idp | "type": "sqlite", idp | "database": "issuer.db" idp | } idp | }, idp | "logger": 3, idp | "endpoints": [ idp | "http://localhost:5000" idp | ], idp | "didCommMimeType": "application/didcomm-envelope-enc", idp | "useDidSovPrefixWhereAllowed": true, idp | "useDidKeyInProtocols": true, idp | "autoUpdateStorageOnStartup": false, idp | "agentDependencies": true idp | } idp | } idp | INFO: Initializing wallet 'Issuer_wallet' { idp | "id": "Issuer_wallet", idp | "key": "[]", idp | "keyDerivationMethod": "ARGON2I_MOD", idp | "storage": { idp | "type": "sqlite", idp | "database": "issuer.db" idp | } idp | } idp | INFO: Agent storage is up to date. idp | Error al importar el DID: TypeError: Cannot read properties of undefined (reading 'connect') idp | at CheqdQuerier.connectWithExtensions (/usr/src/app/node_modules/@cheqd/sdk/build/cjs/querier.js:26:111) idp | at CheqdSDK.loadQuerierExtensions (/usr/src/app/node_modules/@cheqd/sdk/build/cjs/index.js:80:54) idp | at CheqdSDK.build (/usr/src/app/node_modules/@cheqd/sdk/build/cjs/index.js:85:35) idp | at createCheqdSDK (/usr/src/app/node_modules/@cheqd/sdk/build/cjs/index.js:106:40) idp | at CheqdLedgerService.connect (/usr/src/app/node_modules/@aries-framework/cheqd/build/ledger/CheqdLedgerService.js:36:58) idp | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) idp | at async CheqdModule.initialize (/usr/src/app/node_modules/@aries-framework/cheqd/build/CheqdModule.js:27:9) idp | at async Agent.initialize (/usr/src/app/node_modules/@aries-framework/core/build/agent/Agent.js:127:17) idp | at async IssuerFinal.initializeIssuer (file:///usr/src/app/Issuer/Issuer.js:29:5) idp | at async ini_issuer (file:///usr/src/app/App/controllers/mainController.js:43:3)
If i use the @credo-ts: 0.5.1 I get this error: idp | Error: TypeInfo not known for "AgentConfig" idp | at /usr/src/app/node_modules/tsyringe/dist/cjs/dependency-container.js:292:27 idp | at InternalDependencyContainer.construct (/usr/src/app/node_modules/tsyringe/dist/cjs/dependency-container.js:297:11) idp | at InternalDependencyContainer.resolve (/usr/src/app/node_modules/tsyringe/dist/cjs/dependency-container.js:114:33) idp | at DependencyManager.resolve (/usr/src/app/node_modules/@aries-framework/core/build/plugins/DependencyManager.js:34:31) idp | at CheqdModule.register (/usr/src/app/node_modules/@credo-ts/cheqd/build/CheqdModule.js:14:14) idp | at DependencyManager.registerModules (/usr/src/app/node_modules/@aries-framework/core/build/plugins/DependencyManager.js:20:20) idp | at new Agent (/usr/src/app/node_modules/@aries-framework/core/build/agent/Agent.js:56:27) idp | at Issuer_gen.add (file:///usr/src/app/Agente.js:14:20) idp | at new Issuer_gen (file:///usr/src/app/Issuer/Issuer_gen.js:6:10) idp | at IssuerFinal.initializeIssuer (file:///usr/src/app/Issuer/Issuer.js:16:25) idp | Error al importar el DID: TypeError: Cannot read properties of null (reading 'registerOutboundTransport') idp | at IssuerFinal.initializeIssuer (file:///usr/src/app/Issuer/Issuer.js:19:23) idp | at ini_issuer (file:///usr/src/app/App/controllers/mainController.js:43:16) idp | at schem (file:///usr/src/app/App/controllers/mainController.js:368:24) idp | at file:///usr/src/app/App/routes/routes.js:122:3 idp | at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) idp | at next (/usr/src/app/node_modules/express/lib/router/route.js:149:13) idp | at Route.dispatch (/usr/src/app/node_modules/express/lib/router/route.js:119:3) idp | at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) idp | at /usr/src/app/node_modules/express/lib/router/index.js:284:15 idp | at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)
I initialize the agent this way:
...
this.agent = new Agent({
config: this.config,
modules: this.modules,
dependencies: agentDependencies,
});
...
being modules this variable: export const modules = { // Configuración Askar askar: new AskarModule({ ariesAskar, }), // Configuracion de conexiones connections: new ConnectionsModule({ autoAcceptConnections: true }),
// Configuración AnonCreds anoncredsRs: new AnonCredsRsModule({ anoncreds, }), anoncreds: new AnonCredsModule({ registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()], }),
// Configuración Dids dids: new DidsModule({ registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()], resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()], }),
// Configuración Indy Vdr indyVdr: new IndyVdrModule({ indyVdr, networks: [ { isProduction: false, indyNamespace: "bcovrin:test", genesisTransactions: bcovrin, connectOnStartup: true, }, ], }),
// Configuración cheqd cheqd: new CheqdModule( new CheqdModuleConfig({ networks: [ { network: "testnet", cosmosPayerSeed: "robust across amount corn curve panther opera wish toe ring bleak empower wreck party abstract glad average muffin picnic jar squeeze annual long aunt", }, ], }) ), };
(i have gotten bcovrin constant from its web)
and being the agent_config this: export const Issuer_agentConfig = { label: "I_agente", walletConfig: { id: "Issuer_wallet", key: "issuertestkey0000", keyDerivationMethod: KeyDerivationMethod.Argon2IMod, storage: { type: "sqlite", database: "issuer.db", }, }, logger: new ConsoleLogger(LogLevel.info), endpoints: ["http://localhost:5000"], didCommMimeType: DidCommMimeType.V1, useDidSovPrefixWhereAllowed: true, useDidKeyInProtocols: true, autoUpdateStorageOnStartup: false, };
After updating all the packages, the error has changed to the one existing in issue (#1826). Therefore, I'm closing this issue as it's now redundant.
I started a proyect using the tutorials on the website and everything worked all right and I could even create a schema, however I stopped working on the proyect for a week more or less and when i started working on it again, I encountered a problem when creating the agent. I have performed several tests, such as removing the Cheqd module when creating the agent, and then the agent is created without any problem. However, when I include the Cheqd module in the creation of the agent, I encounter issues which doesnt let me create the agent and I don't know why this is .I didn't have any problems with this module before. I haven't added anything new to my code, and suddenly it fails when it used to work.
Additionally, is there any less formal channel where I can ask more general questions? I am a student and I want to design a project related to this