There wa a problem encountered loading a remote context [https://www.w3.org/2018/credentials/v1])
Is this a regression?
Yes
Description
I got this error when send credential using SDK Sometime it return successfull
2024-12-03_03:58:14.816 ERROR o.h.i.s.m.MessagingService@L171:[zio-default-blocking-11171] {} - zio-fiber-1772077966 Error processing message: 8da0bdd4-84d5-4744-baa7-7dc36a100fd7
zio.FiberFailure: Attempt failed with: PresentationVerificationError(There wa a problem encountered loading a remote context [https://www.w3.org/2018/credentials/v1])
at org.hyperledger.identus.agent.server.jobs.PresentBackgroundJobs$.handleMessage$$anonfun$2$$anonfun$2$$anonfun$3$$anonfun$1$$anonfun$1(PresentBackgroundJobs.scala:90)
at zio.ZIO$.fail$$anonfun$1(ZIO.scala:3237)
at zio.ZIO$.failCause$$anonfun$1$$anonfun$1$$anonfun$1(ZIO.scala:3246)
at zio.FiberRef$unsafe$$anon$2.getWith$$anonfun$1(FiberRef.scala:474)
Caused by: java.lang.RuntimeException: Attempt failed with: PresentationVerificationError(There wa a problem encountered loading a remote context [https://www.w3.org/2018/credentials/v1])
at org.hyperledger.identus.agent.server.jobs.PresentBackgroundJobs$.handleMessage$$anonfun$2$$anonfun$2$$anonfun$3$$anonfun$1$$anonfun$1(PresentBackgroundJobs.scala:90)
at zio.ZIO$.fail$$anonfun$1(ZIO.scala:3237)
at zio.ZIO$.failCause$$anonfun$1$$anonfun$1$$anonfun$1(ZIO.scala:3246)
at zio.FiberRef$unsafe$$anon$2.getWith$$anonfun$1(FiberRef.scala:474)
at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1089)
at zio.internal.FiberRuntime.evaluateEffect(FiberRuntime.scala:413)
at zio.internal.FiberRuntime.evaluateMessageWhileSuspended(FiberRuntime.scala:489)
at zio.internal.FiberRuntime.drainQueueOnCurrentThread(FiberRuntime.scala:250)
at zio.internal.FiberRuntime.run(FiberRuntime.scala:138)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
Environment
- Image:
docker.io/hyperledgeridentus/identus-cloud-agent:1.40.2(also tried with:ghcr.io/hyperledger/identus-cloud-agent:1.38.0) - Prism-node:
ghcr.io/input-output-hk/prism-node:2.5.0
(also tried with:ghcr.io/input-output-hk/prism-node:2.4.0) - Vault: 1.15.6 (dev-mode)
- KEYCLOAK_ENABLED = false
API_KEY_ENABLED=true,API_KEY_AUTO_PROVISIONING=true
What I’m trying to do
Test both the connection-less and connection-based Issue Credential I follow the sequence:
POST /issue-credentials/credential-offers/invitationPOST /issue-credentials/credential-offers/accept-invitationPOST /issue-credentials/records/{recordId}/accept-offer(Holder)POST /issue-credentials/records/{recordId}/issue-credential(Issuer)
(👆connection-less)
What happens
- Holder record stops at
protocol_state = "RequestSent" - Issuer record stops at
protocol_state = "CredentialPending"
(same behaviour for both connection-less and connection-based runs)
Logs
Right after the issue-credential call the agent prints the stack-trace I’ll attach below.
Key line:
agent-dev | 2025-05-05_15:52:36.485 ERROR o.h.i.s.m.MessagingService@L171:[ZScheduler-Worker-0] {} - zio-fiber-2039624575 Defect processing message: f14e2a2f-157b-4e78-9165-a460c53f580b
agent-dev | zio.FiberFailure: There wa a problem encountered loading a remote context [https://www.w3.org/2018/credentials/v1]
agent-dev | at com.apicatalog.jsonld.context.ActiveContextBuilder.fetch(ActiveContextBuilder.java:533)
agent-dev | at com.apicatalog.jsonld.context.ActiveContextBuilder.create(ActiveContextBuilder.java:172)
agent-dev | at com.apicatalog.jsonld.expansion.ObjectExpansion.initLocalContext(ObjectExpansion.java:197)
agent-dev | at com.apicatalog.jsonld.expansion.ObjectExpansion.expand(ObjectExpansion.java:101)
agent-dev | at com.apicatalog.jsonld.expansion.Expansion.compute(Expansion.java:119)
agent-dev | at com.apicatalog.jsonld.processor.ExpansionProcessor.expand(ExpansionProcessor.java:124)
agent-dev | at com.apicatalog.jsonld.processor.ToRdfProcessor.toRdf(ToRdfProcessor.java:69)
agent-dev | at com.apicatalog.jsonld.api.ToRdfApi.get(ToRdfApi.java:166)
agent-dev | at org.hyperledger.identus.shared.json.Json$.canonicalizeJsonLDoRdf$$anonfun$1(Json.scala:40)
agent-dev | at scala.util.Try$.apply(Try.scala:217)
agent-dev | at org.hyperledger.identus.shared.json.Json$.canonicalizeJsonLDoRdf(Json.scala:47)
agent-dev | at org.hyperledger.identus.pollux.vc.jwt.EcdsaSecp256k1Signature2019ProofGenerator$.generateProof$$anonfun$1(Proof.scala:59)
agent-dev | at zio.ZIO$.fromEither$$anonfun$1(ZIO.scala:3680)
agent-dev | Caused by: com.apicatalog.jsonld.JsonLdError: There wa a problem encountered loading a remote context [https://www.w3.org/2018/credentials/v1]
agent-dev | at com.apicatalog.jsonld.context.ActiveContextBuilder.fetch(ActiveContextBuilder.java:533)
agent-dev | at com.apicatalog.jsonld.context.ActiveContextBuilder.create(ActiveContextBuilder.java:172)
agent-dev | at com.apicatalog.jsonld.expansion.ObjectExpansion.initLocalContext(ObjectExpansion.java:197)
agent-dev | at com.apicatalog.jsonld.expansion.ObjectExpansion.expand(ObjectExpansion.java:101)
agent-dev | at com.apicatalog.jsonld.expansion.Expansion.compute(Expansion.java:119)
agent-dev | at com.apicatalog.jsonld.processor.ExpansionProcessor.expand(ExpansionProcessor.java:124)
agent-dev | at com.apicatalog.jsonld.processor.ToRdfProcessor.toRdf(ToRdfProcessor.java:69)
agent-dev | at com.apicatalog.jsonld.api.ToRdfApi.get(ToRdfApi.java:166)
agent-dev | at org.hyperledger.identus.shared.json.Json$.canonicalizeJsonLDoRdf$$anonfun$1(Json.scala:40)
agent-dev | at scala.util.Try$.apply(Try.scala:217)
agent-dev | at org.hyperledger.identus.shared.json.Json$.canonicalizeJsonLDoRdf(Json.scala:47)
agent-dev | at org.hyperledger.identus.pollux.vc.jwt.EcdsaSecp256k1Signature2019ProofGenerator$.generateProof$$anonfun$1(Proof.scala:59)
agent-dev | at zio.ZIO$.fromEither$$anonfun$1(ZIO.scala:3680)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:999)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
agent-dev | at zio.internal.FiberRuntime.evaluateEffect(FiberRuntime.scala:413)
agent-dev | at zio.internal.FiberRuntime.evaluateMessageWhileSuspended(FiberRuntime.scala:489)
agent-dev | at zio.internal.FiberRuntime.drainQueueOnCurrentThread(FiberRuntime.scala:250)
agent-dev | at zio.internal.FiberRuntime.run(FiberRuntime.scala:138)
agent-dev | at zio.internal.ZScheduler$$anon$3.run(ZScheduler.scala:380)
agent-dev | Caused by: com.apicatalog.jsonld.JsonLdError: Unexpected response code [429]
agent-dev | at com.apicatalog.jsonld.loader.DefaultHttpLoader.loadDocument(DefaultHttpLoader.java:95)
agent-dev | at com.apicatalog.jsonld.loader.HttpLoader.loadDocument(HttpLoader.java:6)
agent-dev | at com.apicatalog.jsonld.loader.LRUDocumentCache.loadDocument(LRUDocumentCache.java:56)
agent-dev | at com.apicatalog.jsonld.context.ActiveContextBuilder.fetch(ActiveContextBuilder.java:529)
agent-dev | ... 29 common frames omitted
agent-dev | 2025-05-05_15:52:36.487 INFO o.h.i.s.m.k.InMemoryConsumer@L163:[ZScheduler-Worker-0] {} - zio-fiber-2039624575 Message processed in group identus-cloud-agent, topic:issue
agent-dev | 2025-05-05_15:52:38.169 INFO o.h.i.i.c.IssueServerEndpoints@L163:[ZScheduler-Worker-0] {} - zio-fiber-759559534 Trace IssueServerEndpoints.getCredentialRecordEndpoint
agent-dev | 2025-05-05_15:52:40.191 INFO o.h.i.i.c.IssueServerEndpoints@L163:[ZScheduler-Worker-0] {} - zio-fiber-400848394 Trace IssueServerEndpoints.getCredentialRecordEndpoint
ok, interesting, I cannot reproduce this issue, and loading the URL directly works fine (there is no redirect, etc).
I have 2.5 questions:
- is this still an issue?
- could it be due to a temporary network issue at that moment? / (is your agent able to reach the internet?)
Hi, @robertocarvajal! Thanks for keeping an eye on this issue. I fixed the related issue in the PR (the root cause is the same - the JSON-LD public endpoints are flicky). So, I suggest closing the current ticket as well.
solved. thank you everyone