decentralized-identity/universal-resolver-frontend

Result Tab stays empty?

Closed this issue · 5 comments

Hey there,

I am trying to deploy this project for research purposes, but the UI does not want to show any results of my did-server, no errors in the network-panel or the console.

the did-url I am trying to get resolved did:web:didserver.sdika.we.network:bob
my deployed instance https://uni-resolver.sdika.we.network/

Result stays empty:
image

The raw-did-document I expected to be rendered in the ui:

{"@context":["https://www.w3.org/ns/did/v1"],"id":"did:web:didserver.sdika.we.network:bob","verificationMethod":[{"type":"Ed25519VerificationKey2018","id":"did:web:didserver.sdika.we.network:bob#key-1","publicKeyBase58":"FyfKP2HvTKqDZQzvyL38yXH7bExmwofxHf2NR5BrcGf1"}],"service":[{"type":"ServiceEndpointProxyService","serviceEndpoint":"https://myservice.com/myendpoint"}]}

@keydon for some reason the frontend is sending a wrong Accept header. According to your screenshot, the Accept header is:

application/json, text/plain, */*

But the frontend code (see https://github.com/decentralized-identity/universal-resolver-frontend/blob/main/src/components/ResolverInput.jsx#L16) should be sending this Accept header:

application/ld+json;profile="https://w3id.org/did-resolution"

The result is that the Universal Resolver returns only the DID document, rather than the DID document plus metadata, and therefore the frontend UI can't render it.

Do you maybe have an explanation for this? Are you using an older version of the frontend, or how did you deploy it exactly?

@peacekeeper hmm interesting.
Its the latest untouched dockerimage from universalresolver/universal-resolver-frontend (except I mounted a different env.js into the container)
Its deployed in kubernetes with a nginx-ingress, but I see no reason for the accept header not be set correctly :O

I just tried it by pulling the latest universalresolver/universal-resolver-frontend image, and it sends the correct header when clicking on "Resolve".

So I'm sorry but it must have something to do with your environment. Maybe you're not actually using the latest image? Or your env.js is changing something? Or you have some browser plugin that manipulates headers?

haha sorry, found the issue. I used the 2 year old universalresolver/uni-resolver-frontend instead of the month old universalresolver/universal-resolver-frontend in the deployment. I guess it was a copy & paster error out of your readme :D
Works now like a charm :)

@keydon Oops so our README was wrong! Thanks for pointing that out, I just fixed it, and I also deleted that obsolete image from Dockerhub.

Sorry about this.