When I create new account in Metamask and authenticate it with ceramic, and then try to add information in Ceramic Network using datastore.set, it throws an error:
Error: HTTP request to ‘https://ceramic-clay.3boxlabs.com/api/v0/commits’ failed with status ‘Internal Server Error’: {“error”:"Can not verify signature for commit : Signature does not belong to issuer
Does anybody know what could be the reason? I could provide you more details if needed.
Few weeks ago we recognised that SIWE prompt cacao library uses is not really compatible with EIP-4361 “Sign in with Ethereum”. We made it compatible. The change is “Chain ID” field in the signed string (see “Example message” in EIP-4361: Sign-In with Ethereum). It should be after “Version” field, as per standard. We had set the threshold date for the change. CACAOs generated after certain date (2022-09-20) are expected to comply with EIP-4361. CACAOs generated before the date are treated as they can be both in “new”=EIP-4361 and “old” (erroneous) format. Now, after the threshold date the UI part asks the user to sign the old erroneous format. The error from the server is a result of enforcing a fully EIP-4361 compliant SIWE message. If you upgrade ceramic-cacao library on UI (as part of dids package or otherwise), it should stop the errors.
UPD: Make sure your node also uses latest ceramic-cacao (1.4.0 at the time of the writing).
The expectation was that one month is enough for everyone to upgrade, so that the change goes unnoticed. Yet, apparently, one month is not enough for an upgrade path.
So, please, make sure you use the latest ceramic-cacao library.
Hello Sergey, thanks for the reply and all the information!
So I updated ceramic-cacao to 1.4.0 and dids to 3.3.0, but still having same issue.
I could provide you the different versions that I have installed for ceramic:
“@ceramicnetwork/blockchain-utils-linking”: “2.0.11”,
“@ceramicnetwork/http-client”: “2.3.4”,
“did-session”: “^0.1.1”,
“dids”: “3.3.0”,
“key-did-provider-ed25519”: “^2.0.1”,
“key-did-resolver”: “2.1.1”,
“ceramic-cacao”: “1.4.0”,
“@glazed/datamodel”: “0.3.1”,
“@glazed/did-datastore”: “0.3.2”,
“@glazed/did-session”: “^0.1.1”,
“@glazed/tile-loader”: “0.2.1”,
“@ceramicnetwork/stream-tile”: “2.4.3”,
I am using DIDSession and EthereumAuthProvider, just in case this information was useful, and the error only happens when I try to set information in the datastore:
I confirmed creating a composite is working with threeID with a secret, but when I use DIDSession with EthereumAuthProvider, the ‘Signature does not belong to issuer’ error occurs.
I dont know if this could work, but use did-session, installing it by using:
yarn add did-session, and import that one, not @glazed/did-session. I realized that these are kind of different packages
After replacing @glazed/did-session with did-session and refactoring the DIDSession.authorize function, I’m now receiving this error when calling createComposite():
Capability does not have appropriate permissions to update this Stream
This issue has not been resolved for me after following the instructions to the best of my ability. I have installed and updated every relevant package as a sanity check. The only version of ceramic-cacao in my yarn.lock is ^1.4.0
I’ve cleared my next.js cache for a fresh compile, cleared my browser cache, cleared active logins, and logged in fresh with the updated packages installed. I still receive the error.
Is there any other relevant information that can be shared to help me debug this?