Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve short-form URL after publishing the document to ION #56

Open
xushijie opened this issue Jun 27, 2023 · 0 comments
Open

Comments

@xushijie
Copy link

xushijie commented Jun 27, 2023

Using the following code and fill with some concrete detail information for DID:

import { anchor, DID, generateKeyPair } from '@decentralized-identity/ion-tools';

// Generate keys and ION DID
let authnKeys = await generateKeyPair();
let did = new DID(..);

// Generate and publish create request to an ION node
let createRequest = await did.generateRequest(0);
//anchor: post and publish DID document to https://beta.ion.msidentity.com/api/v1.0/proof-of-work-challenge
let anchorResponse = await anchor(createRequest);
console.log(anchorResponse) 
let uri = await did.getURI();
let shortURI = await did.getURI('short');
console.log("Long URI "+ uri+ "\nShort URI: "+ shortURI);
const didDoc = await resolve(shortURI);
console.log(didDoc);

and the output is:

Short URI: did:ion:EiCLUBIxcHqc1CXNyru-hM5vQyo5yFT1GwLaWMG4ex2iPA
file:///work/did/did_demo/node_modules/@decentralized-identity/ion-tools/dist/esm/src/utils.js:175
    throw new Error(response.statusText);
          ^

Error: Not Found
    at resolve (file:///work/did/did_demo/node_modules/@decentralized-identity/ion-tools/dist/esm/src/utils.js:175:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async file:///work/did/did_demo/test.js:51:16

I also get the same 404 when using another two GUI resolvers: https://identity.foundation/ion/explorer and https://dev.uniresolver.io/(refer attached screenshot), while I could get the exact DID document using the resolver.

This error happens only since 28 June, and it still not work even today.
According to the document, the short URI is also resolved when it is published to the ION network(i.e., completing anchoring).

Thanks
image
The output of script execution screenshot(The post request to https://beta.ion.msidentity.com/api/v1.0/proof-of-work-challenge succeeds, according to the ion-pow-sdk/src/index.js:IonProofOfWork::submitIonRequest )
image

@xushijie xushijie changed the title Unable to create DID document suddenly. Unable to query DID document. Jun 29, 2023
@xushijie xushijie changed the title Unable to query DID document. Unable to query DID document from resolver Jun 29, 2023
@xushijie xushijie changed the title Unable to query DID document from resolver Unable to resolve short-form URL after registering a DID document Jun 30, 2023
@xushijie xushijie changed the title Unable to resolve short-form URL after registering a DID document Unable to resolve short-form URL after publishing the document to ION Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant