js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

Breaks at decrypt - parsing SIWE message

Open aymenx17 opened this issue 1 year ago • 3 comments

It breaks here at decrypt: try { decryptedString = await LitJsSdk.decryptToString( { authSig, accessControlConditions, ciphertext, dataToEncryptHash, chain: "ethereum", }, litNodeClient, ); } catch (e) { console.log(e); }

With error:

[Lit-JS-SDK v3.0.27] [ERROR] [core] [id: 168cd37033d2a] Something went wrong, internal id for request: lit_168cd37033d2a. Please provide this identifier with any support requests. Error is Error parsing SIWE message - validation error: SIWE validation failed: parser error: Session key expiration time is not set,Session key expiration time is not set

[Lit-JS-SDK v3.0.27] [ERROR] [core] [id: 168cd37033d2a] most common error: {"errorKind":"Parser","errorCode":"NodeSIWEMessageError","status":400,"message":"Error parsing SIWE message","correlationId":"lit_168cd37033d2a","details":["validation error: SIWE validation failed: parser error: Session key expiration time is not set","Session key expiration time is not set"]}

aymenx17 avatar Dec 30 '23 10:12 aymenx17

Receiving this as well, not using session sigs

polus-arcticus avatar Feb 01 '24 12:02 polus-arcticus

Hey @aymenx17 sorry for the late reply. Is this still the case? would you be able to create a repo for me to re-produce this error? :)

Ansonhkg avatar Feb 14 '24 00:02 Ansonhkg

you might have to add expirationTime in your SiweMessage arguments: const msg = new SiweMessage({... expirationTime: [some future Date]})

robyn3choi avatar Feb 27 '24 20:02 robyn3choi