question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Unsupported message type when handling Verifiable Presentation

See original GitHub issue

Bug severity 2

Describe the bug Trying to verify a Verifiable Presentation with did:key as holder/ verifier via MessageHandler throws an “Unsupported message type” error.

To Reproduce Steps to reproduce the behaviour:

  1. Create a credential where issuer and subject are the same did:key -> Works
  2. Use that credential to create a presentation. Holder and verifier are the same did:key as in 1. -> Still works
  3. Verify that presentation via agent.handleMessage({ raw: presentation.proof.jwt }) -> Error

Observed behaviour Step 3 throws an Unsupported message type error.

Expected behaviour A resolved Message from input jwt.

Details

Error: Unsupported message type
    at Object.<anonymous> (.../node_modules/@veramo/message-handler/src/abstract-message-handler.ts:4:44)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (.../node_modules/@veramo/message-handler/src/index.ts:8:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

Additional context This bug seems to be related to the did:key method. If you redo those 3 steps with did:ion or did:ethr, all steps work perfectly. Maybe it’s due to the key types? (Ed25519 of did:key vs Secp256k1 of did:ion/ethr) You can find my Veramo setup here, in case I missed something.

Versions (please complete the following information):

  • Veramo: 1.2.0
  • Browser Chrome + Safari (not helpful here)
  • Node Version 14.15.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
awoiecommented, May 25, 2021

@strumswell Thanks for re-sharing the example (I guess I did a copy&paste error). The issue is that the VC contains the right alg=EdDSA but the VP doesn’t. The VP is a JWT with alg=ES256K which should be EdDSA.

@mirceanis imo, this is a bug.

0reactions
awoiecommented, May 26, 2021

Oh, I see. Let me know if you need more. I’ll keep an eye on the issue. 🙂

Should now be fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Error codes reference - Microsoft Entra Verified ID
The URI is too long. The specified media type is unsupported. The requested range of data requested can't be satisfied. The Expect header ......
Read more >
Presentation | IOTA Wiki
Allows presentation of one or more verifiable credentials that are issued to a holder and are uniquely presented to a third-party verifier ...
Read more >
Verifiable Credentials Data Model v1.1 - W3C
An assertion made about a subject. A set of one or more claims made by an issuer. A verifiable credential is a tamper-evident...
Read more >
OpenID for Verifiable Credential Issuance
This specification defines an API and corresponding OAuth 2.0-based authorization mechanisms for the issuance of verifiable Credentials.
Read more >
Red Hat Enterprise Linux 6.x guest on VMware products ...
UNSUPPORTED HARDWARE DEVICE: CPU family 6 model > 59. [RHEL6.4 or RHEL6.5] ... The error message during boot can also be ignored.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found