-
Notifications
You must be signed in to change notification settings - Fork 24
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
Upload Delegation - Error: stored principal and passed principal must match #1274
Comments
Try using the in-memory store: import * as Client from '@web3-storage/w3up-client'
import { StoreMemory } from '@web3-storage/w3up-client/stores'
const principal = Signer.parse("...")
const store = new StoreMemory()
const client = await Client.create({ principal, store }) |
Thank you, now I'm able to create the client Please fix you code block changing the import with this: import { StoreMemory } from '@web3-storage/access/stores/store-memory' now in parseProof function: /** @param {string} data Base64 encoded CAR file */
async function parseProof (data) {
const blocks = []
const reader = await CarReader.fromBytes(Buffer.from(data, 'base64'))
for await (const block of reader.blocks()) {
blocks.push(block)
}
return importDAG(blocks)
} during reader creation I have this error in console: Can you please help me? I can't figure out the problem. |
@rinaldorossiavvale I didn't have this exact problem but I had a problem with creating the Reader from proof |
@rinaldorossiavvale Also, the code block |
@rinaldorossiavvale Finally, I just realized that it looks like you are passing When you generate a Key/DID pair, use |
@magror I'm already passing the key as principal and I created the proof starting from the did. |
@magror upgrading to 12.1.0 throw me an error in console
|
`stores.js` was importing code that uses nodejs modules and is not bundleable.... refs #1274 (comment)
@rinaldorossiavvale v12.2.1 should fix this, use import: import { StoreMemory } from '@web3-storage/w3up-client/stores/memory' |
@alanshaw upgraded to v12.2.1 but on reader creation it throw:
|
@rinaldorossiavvale Have you downloaded the new version of the CLI from GitHub and generated a brand new set of key/proof? |
and now I have: |
@rinaldorossiavvale Do not use the version on NPM. It is out of date. I am recommending you go to GitHub and clone the CLI project directly from GitHub. GitHub has version 7.5.0, whereas NPM only has version 3.0.1
|
@magror done but always the same error.
|
We are currently in the process of migrating our code to new version.
Our current focus is on uploading files through delegation. Here are the steps we've taken in the console:
w3 login [my-mail]
w3 space use did:key:z6Mkf6GqWzVJQVdX5d4S4skrRetFRXPM2YwTarvn7fg2NLZH
npx ucan-key ed
w3 delegation create did:key:z6MkjDpk6K6B4Bec2b2M98SESAVz4iquVyfXVSpARSw4LKT1
During the client creation on React:
we have an error in console:
Uncaught (in promise) Error: store cannot be used with did:key:z6MkjDpk6K6B4Bec2b2M98SESAVz4iquVyfXVSpARSw4LKT1, stored principal and passed principal must match
The text was updated successfully, but these errors were encountered: