universal-resolver icon indicating copy to clipboard operation
universal-resolver copied to clipboard

Add did:ev driver

Open davux opened this issue 1 year ago • 8 comments

Hello,

I would like to submit a driver for DID method "did:ev".

Point of contact: <firstName.lastName>@nttdata.com with my full name.

davux avatar Sep 30 '22 17:09 davux

Thx for your contribution.

When pulling the image I get following error:

Error response from daemon: Head "https://ghcr.io/v2/kaytrust/driver-did-ev/manifests/latest": unauthorized

Images have to be available without authorization

BernhardFuchs avatar Oct 01 '22 10:10 BernhardFuchs

Hi @BernhardFuchs, sorry for the misconfiguration, it's fixed now.

davux avatar Oct 02 '22 17:10 davux

The image is pulled and the driver starts but the resolver can't connect to it. Following error is thrown:

2022-10-03T16:48:02,254 WARN  [qtp893523498-20] u.w.s.ResolveServlet: Resolve problem for did:ev:bmM8MpeJAGF2ky7YUnwgJGKxyHdCL6DGAUmEW: Driver cannot retrieve resolve result for did:ev:bmM8MpeJAGF2ky7YUnwgJGKxyHdCL6DGAUmEW from http://driver-did-ev:8080/1.0/identifiers/did:ev:bmM8MpeJAGF2ky7YUnwgJGKxyHdCL6DGAUmEW: Connect to driver-did-ev:8080 [driver-did-ev/10.100.36.212] failed: Connection refused (Connection refused)
uniresolver.ResolutionException: Driver cannot retrieve resolve result for did:ev:bmM8MpeJAGF2ky7YUnwgJGKxyHdCL6DGAUmEW from http://driver-did-ev:8080/1.0/identifiers/did:ev:bmM8MpeJAGF2ky7YUnwgJGKxyHdCL6DGAUmEW: Connect to driver-did-ev:8080 [driver-did-ev/10.100.36.212] failed: Connection refused (Connection refused)

BernhardFuchs avatar Oct 03 '22 16:10 BernhardFuchs

Thanks @BernhardFuchs.

Apparently the microservice is crashing, which would explain why the resolver can't reach it. It worked in our test environment, but we'll try to see what could be happening. To help us debug it, is there a way we could see the logs of the driver itself?

davux avatar Oct 03 '22 19:10 davux

The driver itself shows just the startup logs:

2022-10-03T07:03:56.488Z [⚡️ provider resolver] info: Register identifiers routes
2022-10-03T07:03:56.535Z [⚡️ provider resolver] info: Server is running at https://localhost:8000

Seems the call never reaches the application code itself.

BernhardFuchs avatar Oct 03 '22 20:10 BernhardFuchs

I wasn't passing the port number correctly, it should be fixed now.

davux avatar Oct 04 '22 02:10 davux

The issue with the port was actually a wrong port number in the application.yml. Fixed that for you.

But there is still an problem with the driver. It crashes with the following error:

2022-10-04T13:26:15.229Z [⚡️ provider resolver] info: Register identifiers routes
2022-10-04T13:26:15.236Z [⚡️ provider resolver] info: Server is running at https://localhost:8000
/usr/src/dist/node_modules/@kaytrust/ev-did-resolver/lib/errors.js:23
        var _this = _super.call(this, message) || this;
                           ^

ContractAddressRequired: a contract address is required
    at new ContractAddressRequired (/usr/src/dist/node_modules/@kaytrust/ev-did-resolver/lib/errors.js:23:28)
    at Function.Web3Instance.setContractInstance (/usr/src/dist/node_modules/@kaytrust/ev-did-resolver/lib/web3.js:68:19)
    at Function.Web3Instance.setWeb3Instance (/usr/src/dist/node_modules/@kaytrust/ev-did-resolver/lib/web3.js:64:22)
    at Object.getResolver (/usr/src/dist/node_modules/@kaytrust/ev-did-resolver/lib/evResolver.js:47:20)
    at Identifiers.<anonymous> (/usr/src/dist/routes/identifiers.js:38:58)
    at Generator.next (<anonymous>)
    at /usr/src/dist/routes/identifiers.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/src/dist/routes/identifiers.js:4:12)
    at /usr/src/dist/routes/identifiers.js:32:74
    at Layer.handle [as handle_request] (/usr/src/dist/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/src/dist/node_modules/express/lib/router/route.js:144:13)
    at Route.dispatch (/usr/src/dist/node_modules/express/lib/router/route.js:114:3)
    at Layer.handle [as handle_request] (/usr/src/dist/node_modules/express/lib/router/layer.js:95:5)
    at /usr/src/dist/node_modules/express/lib/router/index.js:284:15
    at param (/usr/src/dist/node_modules/express/lib/router/index.js:365:14)

PS: We are aware that the configuration is a bit confusing. Hope we find some time to fix that in the future.

BernhardFuchs avatar Oct 04 '22 13:10 BernhardFuchs

Thanks, we'll take a look at it ASAP (ping @jmiranda1996).

davux avatar Oct 04 '22 13:10 davux

@BernhardFuchs, the PR should be ready now!

davux avatar Oct 20 '22 18:10 davux

Thx for fixing. I'm merging this with https://github.com/decentralized-identity/universal-resolver/tree/test-driver-did-ev because I had to add the env variables to our custom CD script.

BernhardFuchs avatar Oct 25 '22 09:10 BernhardFuchs

Thanks @BernhardFuchs. Does it mean the driver will not be listed on the main branch?

davux avatar Oct 25 '22 14:10 davux