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

web3.storage client.get(cid).files() is broken #384

Closed
ryscheng opened this issue Feb 24, 2023 · 3 comments
Closed

web3.storage client.get(cid).files() is broken #384

ryscheng opened this issue Feb 24, 2023 · 3 comments
Assignees
Labels
p2:grabbag If you got time, grab one

Comments

@ryscheng
Copy link
Member

Which area(s) of Hypercerts are affected? (leave empty if unsure)

SDK

To Reproduce

  1. Use the SDK in an upstream repo like frontend
  2. Store some data with sdk.storeData
  3. Get the data with sdk.getData.

You'll get an exception inside getData at await res.files();

Describe the Bug

I'm not totally sure what's going on here, since we do have a unit test that passes. But it seems to me like web3.storage client.get doesn't know what to do when we call client.put with wrapWithDirectory: false.

This requires more digging, but I'm deprioritizing it until we have more time. I think we might need to ask the web3.storage team what's going on here...

As a workaround, just use sdk.getMetadata with the CID. It should work.

Expected Behavior

Should just work

@ryscheng ryscheng added type:bug p2:grabbag If you got time, grab one labels Feb 24, 2023
@ryscheng
Copy link
Member Author

Looks like both web3.storage and nft.storage are moving towards w3up

https://github.com/web3-storage/w3up/tree/main/packages/w3up-client

So maybe we should migrate and see if there's still an issue

@ryscheng
Copy link
Member Author

Confirming with Travis Vachon, recommended we just use the gateway (faster, cheaper etc)
https://web3.storage/products/w3link/

@ryscheng
Copy link
Member Author

Fixed here
#685

Filing a separate issue for w3up transition:
#684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2:grabbag If you got time, grab one
Projects
None yet
Development

No branches or pull requests

1 participant