Skip to content

agent is not working in docker compose #114

@HuangMinming

Description

@HuangMinming

Hi everyone,
I tried to build and run this demo in docker compose, but the agent is not working after I run the command

docker compose up -d

The error log is below, it needs sqlite3 to run. However, I tried to install sqlite3 through Dockerfile, it still failed to start. I can find sqlite3 in oid4vci-demo-frontend. It showed that the sqlite3 was successfully installed.
How to fix this issue, thanks.

root@3637a8d1ad3d:/opt/oid4vc-demo/packages/oid4vci-demo-frontend# pnpm list |grep sqlite3
sqlite3 5.1.7

oid4vc-demo-ssi-agent error log.

Attaching to oid4vc-demo-ssi-agent
oid4vc-demo-ssi-agent    |
oid4vc-demo-ssi-agent    | > @sphereon/oid4vc-demo-agent@0.1.0 start:dev
oid4vc-demo-ssi-agent    | > node --experimental-specifier-resolution=node --loader ts-node/esm src/agent.ts
oid4vc-demo-ssi-agent    |
oid4vc-demo-ssi-agent    | (node:18) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
oid4vc-demo-ssi-agent    | --import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
oid4vc-demo-ssi-agent    | (Use `node --trace-warnings ...` to show where the warning was created)
oid4vc-demo-ssi-agent    | (node:18) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
oid4vc-demo-ssi-agent    | (Use `node --trace-deprecation ...` to show where the warning was created)
oid4vc-demo-ssi-agent    | dotenv-flow: "HOSTNAME" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "NODE_ENV" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "HOSTNAME" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "PORT" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "COOKIE_SIGNING_KEY" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "DB_CONNECTION_NAME" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "DB_SQLITE_FILE" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "DB_ENCRYPTION_KEY" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "OID4VP_ENABLED" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "OID4VP_WEBAPP_BASE_URI" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "OID4VP_AGENT_BASE_URI" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "AUTH_REQUEST_EXPIRES_AFTER_SEC" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "OID4VCI_ENABLED" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "CONF_PATH" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | dotenv-flow: "UNIVERSAL_RESOLVER_RESOLVE_URL" is already defined in `process.env` and will not be overwritten
oid4vc-demo-ssi-agent    | DID config found for: did:ion:EiAeobpQwEVpR-Ib9toYwbISQZZGIBck6zIUm0ZDmm9v0g:eyJkZWx0YSI6eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljS2V5cyI6W3siaWQiOiJhdXRoLWtleSIsInB1YmxpY0tleUp3ayI6eyJjcnYiOiJzZWNwMjU2azEiLCJrdHkiOiJFQyIsIngiOiJmUUE3WUpNRk1qNXFET0RrS25qR1ZLNW0za1VSRFc1YnJ1TWhUa1NYSGQwIiwieSI6IlI3cVBNNEsxWHlqNkprM3M2a3I2aFNrQzlDa0ExSEFpMVFTejZqSU56dFkifSwicHVycG9zZXMiOlsiYXV0aGVudGljYXRpb24iLCJhc3NlcnRpb25NZXRob2QiXSwidHlwZSI6IkVjZHNhU2VjcDI1NmsxVmVyaWZpY2F0aW9uS2V5MjAxOSJ9XX19XSwidXBkYXRlQ29tbWl0bWVudCI6IkVpQnpwN1loTjltaFVjWnNGZHhuZi1sd2tSVS1oVmJCdFpXc1ZvSkhWNmprd0EifSwic3VmZml4RGF0YSI6eyJkZWx0YUhhc2giOiJFaUJvbWxvZ0JPOERROFdpVVFsa3diYmxuMXpsRFU2Q3Jvc01wNDRySjYzWHhBIiwicmVjb3ZlcnlDb21taXRtZW50IjoiRWlEQVFYU2k3SGNqSlZCWUFLZE8yenJNNEhmeWJtQkJDV3NsNlBRUEpfamtsQSJ9fQ
oid4vc-demo-ssi-agent    | DID config found for: did:jwk:eyJhbGciOiJFUzI1NiIsInVzZSI6InNpZyIsImt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4IjoiVEcySDJ4MmRXWE4zdUNxWnBxRjF5c0FQUVZESkVOX0gtQ010YmdqYi1OZyIsInkiOiI5TThOeGQwUE4yMk05bFBEeGRwRHBvVEx6MTV3ZnlaSnM2WmhLSVVKMzM4In0
oid4vc-demo-ssi-agent    | DID config found for: did:jwk:eyJhbGciOiJFUzI1NksiLCJ1c2UiOiJzaWciLCJrdHkiOiJFQyIsImNydiI6InNlY3AyNTZrMSIsIngiOiI2SlQxMkdKbU5KOWVGOXp4N19HQm1SekR4TjV6ejExaFFPMnRsTEUtZWFRIiwieSI6IlB1TlZoLVdySi05b3RMdkpTWE5YTVFpM3o5cjFwRms4X09TdE02amhybEUifQ
oid4vc-demo-ssi-agent    | DID config found for: did:web:dbc2023.test4.sphereon.com
oid4vc-demo-ssi-agent    | DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
oid4vc-demo-ssi-agent    |     at SqliteDriver.loadDependencies (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
oid4vc-demo-ssi-agent    |     at new SqliteDriver (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
oid4vc-demo-ssi-agent    |     at DriverFactory.create (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/DriverFactory.js:44:24)
oid4vc-demo-ssi-agent    |     at new DataSource (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/data-source/DataSource.js:56:59)
oid4vc-demo-ssi-agent    |     at getDbConnection (file:///opt/oid4vc-demo/packages/agent/src/database/databaseService.ts:16:30)
oid4vc-demo-ssi-agent    |     at file:///opt/oid4vc-demo/packages/agent/src/agent.ts:23:22
oid4vc-demo-ssi-agent    |     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
oid4vc-demo-ssi-agent    |     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
oid4vc-demo-ssi-agent    |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
oid4vc-demo-ssi-agent    | DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
oid4vc-demo-ssi-agent    |     at SqliteDriver.loadDependencies (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
oid4vc-demo-ssi-agent    |     at new SqliteDriver (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
oid4vc-demo-ssi-agent    |     at DriverFactory.create (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/DriverFactory.js:44:24)
oid4vc-demo-ssi-agent    |     at new DataSource (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/data-source/DataSource.js:56:59)
oid4vc-demo-ssi-agent    |     at getDbConnection (file:///opt/oid4vc-demo/packages/agent/src/database/databaseService.ts:16:30)
oid4vc-demo-ssi-agent    |     at file:///opt/oid4vc-demo/packages/agent/src/agent.ts:23:22
oid4vc-demo-ssi-agent    |     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
oid4vc-demo-ssi-agent    |     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
oid4vc-demo-ssi-agent    |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
oid4vc-demo-ssi-agent    | DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
oid4vc-demo-ssi-agent    |     at SqliteDriver.loadDependencies (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
oid4vc-demo-ssi-agent    |     at new SqliteDriver (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
oid4vc-demo-ssi-agent    |     at DriverFactory.create (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/DriverFactory.js:44:24)
oid4vc-demo-ssi-agent    |     at new DataSource (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/data-source/DataSource.js:56:59)
oid4vc-demo-ssi-agent    |     at getDbConnection (file:///opt/oid4vc-demo/packages/agent/src/database/databaseService.ts:16:30)
oid4vc-demo-ssi-agent    |     at file:///opt/oid4vc-demo/packages/agent/src/agent.ts:23:22
oid4vc-demo-ssi-agent    |     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
oid4vc-demo-ssi-agent    |     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
oid4vc-demo-ssi-agent    |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
oid4vc-demo-ssi-agent    | DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
oid4vc-demo-ssi-agent    |     at SqliteDriver.loadDependencies (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
oid4vc-demo-ssi-agent    |     at new SqliteDriver (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
oid4vc-demo-ssi-agent    |     at DriverFactory.create (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/DriverFactory.js:44:24)
oid4vc-demo-ssi-agent    |     at new DataSource (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/data-source/DataSource.js:56:59)
oid4vc-demo-ssi-agent    |     at getDbConnection (file:///opt/oid4vc-demo/packages/agent/src/database/databaseService.ts:16:30)
oid4vc-demo-ssi-agent    |     at file:///opt/oid4vc-demo/packages/agent/src/agent.ts:23:22
oid4vc-demo-ssi-agent    |     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
oid4vc-demo-ssi-agent    |     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
oid4vc-demo-ssi-agent    |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
oid4vc-demo-ssi-agent    | No identifier for DID did:ion:EiAeobpQwEVpR-Ib9toYwbISQZZGIBck6zIUm0ZDmm9v0g:eyJkZWx0YSI6eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljS2V5cyI6W3siaWQiOiJhdXRoLWtleSIsInB1YmxpY0tleUp3ayI6eyJjcnYiOiJzZWNwMjU2azEiLCJrdHkiOiJFQyIsIngiOiJmUUE3WUpNRk1qNXFET0RrS25qR1ZLNW0za1VSRFc1YnJ1TWhUa1NYSGQwIiwieSI6IlI3cVBNNEsxWHlqNkprM3M2a3I2aFNrQzlDa0ExSEFpMVFTejZqSU56dFkifSwicHVycG9zZXMiOlsiYXV0aGVudGljYXRpb24iLCJhc3NlcnRpb25NZXRob2QiXSwidHlwZSI6IkVjZHNhU2VjcDI1NmsxVmVyaWZpY2F0aW9uS2V5MjAxOSJ9XX19XSwidXBkYXRlQ29tbWl0bWVudCI6IkVpQnpwN1loTjltaFVjWnNGZHhuZi1sd2tSVS1oVmJCdFpXc1ZvSkhWNmprd0EifSwic3VmZml4RGF0YSI6eyJkZWx0YUhhc2giOiJFaUJvbWxvZ0JPOERROFdpVVFsa3diYmxuMXpsRFU2Q3Jvc01wNDRySjYzWHhBIiwicmVjb3ZlcnlDb21taXRtZW50IjoiRWlEQVFYU2k3SGNqSlZCWUFLZE8yenJNNEhmeWJtQkJDV3NsNlBRUEpfamtsQSJ9fQ exists yet. Will create the DID...
oid4vc-demo-ssi-agent    | This really is a demo and should not be used in production!
oid4vc-demo-ssi-agent    | privateKeyHex: [object Promise]
oid4vc-demo-ssi-agent    | No identifier for DID did:jwk:eyJhbGciOiJFUzI1NiIsInVzZSI6InNpZyIsImt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4IjoiVEcySDJ4MmRXWE4zdUNxWnBxRjF5c0FQUVZESkVOX0gtQ010YmdqYi1OZyIsInkiOiI5TThOeGQwUE4yMk05bFBEeGRwRHBvVEx6MTV3ZnlaSnM2WmhLSVVKMzM4In0 exists yet. Will create the DID...
oid4vc-demo-ssi-agent    | No identifier for DID did:jwk:eyJhbGciOiJFUzI1NksiLCJ1c2UiOiJzaWciLCJrdHkiOiJFQyIsImNydiI6InNlY3AyNTZrMSIsIngiOiI2SlQxMkdKbU5KOWVGOXp4N19HQm1SekR4TjV6ejExaFFPMnRsTEUtZWFRIiwieSI6IlB1TlZoLVdySi05b3RMdkpTWE5YTVFpM3o5cjFwRms4X09TdE02amhybEUifQ exists yet. Will create the DID...
oid4vc-demo-ssi-agent    | No identifier for DID did:web:dbc2023.test4.sphereon.com exists yet. Will create the DID...
oid4vc-demo-ssi-agent    | DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
oid4vc-demo-ssi-agent    |     at SqliteDriver.loadDependencies (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
oid4vc-demo-ssi-agent    |     at new SqliteDriver (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
oid4vc-demo-ssi-agent    |     at DriverFactory.create (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/DriverFactory.js:44:24)
oid4vc-demo-ssi-agent    |     at new DataSource (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/data-source/DataSource.js:56:59)
oid4vc-demo-ssi-agent    |     at getDbConnection (file:///opt/oid4vc-demo/packages/agent/src/database/databaseService.ts:16:30)
oid4vc-demo-ssi-agent    |     at file:///opt/oid4vc-demo/packages/agent/src/agent.ts:23:22
oid4vc-demo-ssi-agent    |     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
oid4vc-demo-ssi-agent    |     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
oid4vc-demo-ssi-agent    |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
oid4vc-demo-ssi-agent    | node:internal/modules/run_main:122
oid4vc-demo-ssi-agent    |     triggerUncaughtException(
oid4vc-demo-ssi-agent    |     ^
oid4vc-demo-ssi-agent    |
oid4vc-demo-ssi-agent    | DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
oid4vc-demo-ssi-agent    |     at SqliteDriver.loadDependencies (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
oid4vc-demo-ssi-agent    |     at new SqliteDriver (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
oid4vc-demo-ssi-agent    |     at DriverFactory.create (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/driver/DriverFactory.js:44:24)
oid4vc-demo-ssi-agent    |     at new DataSource (/opt/oid4vc-demo/node_modules/.pnpm/typeorm@0.3.20_sqlite3@5.1.7_ts-node@10.9.2_@types+node@18.19.79_typescript@4.9.5_/node_modules/typeorm/data-source/DataSource.js:56:59)
oid4vc-demo-ssi-agent    |     at getDbConnection (file:///opt/oid4vc-demo/packages/agent/src/database/databaseService.ts:16:30)
oid4vc-demo-ssi-agent    |     at file:///opt/oid4vc-demo/packages/agent/src/agent.ts:23:22
oid4vc-demo-ssi-agent    |     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
oid4vc-demo-ssi-agent    |     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
oid4vc-demo-ssi-agent    |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
oid4vc-demo-ssi-agent    |
oid4vc-demo-ssi-agent    | Node.js v22.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions