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 deleting AnonCreds credentials after upgrading from 0.4.2 to 0.5.3 #1882

Closed
bryce-mcmath opened this issue May 27, 2024 · 9 comments · Fixed by #1887
Closed

Error deleting AnonCreds credentials after upgrading from 0.4.2 to 0.5.3 #1882

bryce-mcmath opened this issue May 27, 2024 · 9 comments · Fixed by #1887

Comments

@bryce-mcmath
Copy link
Contributor

Credo raises an error when attempting to delete a credential in 0.5.3 that was received in 0.4.2

Error originates in @credo-ts/anoncreds V1CredentialProtocol.ts
[CredoError: Unsupported credential record type anoncreds for v1 issue credential protocol (need w3c)]

This occurs when calling agent.credentials.deleteById(credential.id) from Bifold. I might be wrong but I believe we were using V1 protocol with AnonCreds in Credo/AFJ 0.4.2 so I'm confused why it appears to no longer be supported.

Of credentialRecord.credentials the credentialRecord part seems to be deleted successfully but not the .credentials part. I think, higher up in Credo, it's failing during 'deleting associated credentials' loop here

Thank you for any help and let me know if I can provide more info or assist in any way

@genaris
Copy link
Contributor

genaris commented May 28, 2024

Looking at the error you got, it looks like the credential exchange record was not properly migrated, so it is still bound to an anoncreds credential record instead of a w3c one.

It's a bit weird because this was fixed in #1849, just before 0.5.3 was released. Actually, we did that fix right after @wadeking98 reported the very same issue on Discord.

Are you upgrading from 0.4.2 to 0.5.3 directly or did you pass by 0.5.0/0.5.1/0.5.2 in the middle?

@bryce-mcmath
Copy link
Contributor Author

Hmm. I'm going directly from 0.4.2 to 0.5.3

I'll confer with @wadeking98 and make sure I'm not missing anything and then report back

@wadeking98
Copy link
Contributor

I'm able to reproduce this too, funny I thought it was fixed but maybe I was mistaken

@bryce-mcmath
Copy link
Contributor Author

@genaris @TimoGlastra any ideas? Any way we can help with this one?

@genaris
Copy link
Contributor

genaris commented May 30, 2024

@genaris @TimoGlastra any ideas? Any way we can help with this one?

Could you give me some pointers to reproduce this issue easily? I've reproduced an upgrade from 0.4.2 to 0.5.3 with two credential exchanges: an Indy credential received with Issue Credential V1 protocol (taken from https://demo.animo.id) and a newer AnonCreds with Issue Credential V2 protocol (from 2060 chatbot demos) and both were succesfully found and updated to have the bindings to the w3c record.

I've tried also with BC Showcase but for some reason it is not working with Hologram app: it sends an 'abandoned' error when I request the credential. Weird, since it used to work fine not so long ago.

@bryce-mcmath
Copy link
Contributor Author

I believe in this case (and in most of our ecosystem) it's all AnonCreds but with V1, so if you could try that combo hopefully you'll be able to repro.

@wadeking98 possible Traction issue with the showcase?

@bryce-mcmath
Copy link
Contributor Author

For us to repro it, we basically install the last AFJ 0.4.2 version of Bifold or BC Wallet, get a credential from the showcase, and then upgrade to our latest development build (0.5.3) and attempt to delete the credential.

@wadeking98
Copy link
Contributor

@genaris running into an issue with the student showcase credential, try the lawyer/person credentials in the showcase

@genaris
Copy link
Contributor

genaris commented Jun 2, 2024

@genaris running into an issue with the student showcase credential, try the lawyer/person credentials in the showcase

Allright, so I could reproduce it by installing the tagged v1.0.16, receiving Lawyer and Person credentials, and then switching to main. After the fix in #1887 it seems to work properly (I tested presenting the credentials and the deleting them).

I'll leverage all this environment setup to check also the Mobile Verifier issue that raised hyperledger/anoncreds-rs#335. Hopefully we can get some proposal to fix it during next week. You are more than welcome to participate in next Credo contributor meeting (Thursday June 6th), as we may have some good discussion about this topic!

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

Successfully merging a pull request may close this issue.

3 participants