metaplex-foundation / js

A JavaScript SDK for interacting with Metaplex's programs
357 stars 182 forks source link

Mock Storage is not working #169

Closed dedlockdave closed 2 years ago

dedlockdave commented 2 years ago

Issue on 0.12.0 and 11.7

Metaplex instantiation

mxconn = Metaplex.make(new Connection(clusterApiUrl("devnet")))
        .use(mockStorage())
  1. store data and get URL: mxconn.storage().upload(file)
  2. try to fetch that data with: mxconn.storage().upload("https://mockstorage.example.com/2NAHu8Kqqv7P9tiwisGZ")
  3. Get Error `MetaplexError] Asset Not Found

    Source: SDK Problem: The asset at [https://mockstorage.example.com/2NAHu8Kqqv7P9tiwisGZ] could not be found. Solution: Ensure the asset exists at the given path or URI.`

I am running this locally in a React App on React 18 on M1 Mac V12.2.1.

lorisleiva commented 2 years ago

Hi there 👋

I'm assuming you mean mxconn.storage().download("https://...") for step 2.

Not sure why it wouldn't work for you though because the entire test suite uses the mock storage. 😕

dedlockdave commented 2 years ago

hmm not sure, I just wired in a real AWS driver and things worked, but I couldn't get mock example to work. could have been a mixup on my end with the URLs I was passing in