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

Error message improvement: No key was resolved when trying to resolve key to sign token #731

Open
alegomes opened this issue Sep 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@alegomes
Copy link
Contributor

alegomes commented Sep 2, 2024

I got this error when trying to use and offer request (/wallet-api/wallet/{wallet}/exchange/useOfferRequest) but it doesn't make sense to me, as a user.

No key was resolved when trying to resolve key to sign token

Wallet API log:

java.lang.IllegalStateException: No key was resolved when trying to resolve key to sign token
	at id.walt.webwallet.service.oidc4vc.TestCredentialWallet.tryResolveKeyId(TestCredentialWallet.kt:440)
	at id.walt.webwallet.service.oidc4vc.TestCredentialWallet.access$tryResolveKeyId(TestCredentialWallet.kt:63)
	at id.walt.webwallet.service.oidc4vc.TestCredentialWallet$signToken$1.invokeSuspend(TestCredentialWallet.kt:92)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at id.walt.webwallet.service.oidc4vc.TestCredentialWallet.signToken(TestCredentialWallet.kt:89)
	at id.walt.oid4vc.interfaces.ITokenProvider$DefaultImpls.signToken$default(ITokenProvider.kt:16)
	at id.walt.oid4vc.providers.OpenIDCredentialWallet.generateDidProof(OpenIDCredentialWallet.kt:71)
	at id.walt.oid4vc.providers.OpenIDCredentialWallet.generateDidProof$default(OpenIDCredentialWallet.kt:51)
	at id.walt.webwallet.service.exchange.ProofOfPossessionFactory.didProofOfPossession(ProofOfPossessionFactory.kt:29)
	at id.walt.webwallet.service.exchange.ProofOfPossessionFactory.new(ProofOfPossessionFactory.kt:21)
	at id.walt.webwallet.service.exchange.IssuanceService.processCredentialOffer(IssuanceService.kt:137)
	at id.walt.webwallet.service.exchange.IssuanceService.access$processCredentialOffer(IssuanceService.kt:37)
	at id.walt.webwallet.service.exchange.IssuanceService$processCredentialOffer$1.invokeSuspend(IssuanceService.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)

@alegomes alegomes added the enhancement New feature or request label Sep 2, 2024
@SuperBatata
Copy link
Contributor

The issue is thrown when the key is missing from the db , i suggest to have an extra verification step in the web-wallet before deleting the keys , something like a pop up saying : dids associated with this key will be no longer functional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants