0xPolygonID / js-sdk-examples

examples of usage polygonid-js-sdk
Apache License 2.0
15 stars 17 forks source link

Error: Can't load credential schema. #10

Closed franvf closed 7 months ago

franvf commented 1 year ago

I'm running the examples on my computer, but each time the example needs to load the Age Credential v3 schema, the code throws the next error:

=============== issue credential ===============
=============== user did ===============
did:iden3:polygon:mumbai:wzfASkb3ZF1EKYJUBQ2BGNrPguhPmnDKfACP5eKoJ
Error: can't load credential schema https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json
    at IdentityWallet.issueCredential (/Users/test/Documents/js-sdk-examples/node_modules/@0xpolygonid/js-sdk/src/identity/identity-wallet.ts:557:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async issueCredential (/Users/test/Documents/js-sdk-examples/index.ts:146:22)
    at async main (/Users/test/Documents/js-sdk-examples/index.ts:737:7)
    at async /Users/test/Documents/js-sdk-examples/index.ts:748:3

I'm also behind a corporative proxy and need to figure out how this could affect accessing the schema. If I copy and paste the schema's URL on the browser, I can see the JSON file.

vmidyllic commented 1 year ago

did you change something in the code? or you just run an example npm run start -- issueCredential? What is a best way to reproduce the issue?

franvf commented 1 year ago

I just cloned the repository locally and executed it

did you change something in the code? or you just run an example npm run start -- issueCredential? What is a best way to reproduce the issue?