Media Manager - Failed to Load Media (Strapi)

When clicking to open the Media Manager after setting up the StrapiMediaStore I’m getting the following error:

Failed To Load Media

When checking the console, I’m seeing this:

_app.js:112418 TypeError: this.store.list is not a function
    at d.<anonymous> (_app.js:1040)
    at _app.js:1040
    at Object.next (_app.js:1040)
    at _app.js:1040
    at new Promise (<anonymous>)
    at c (_app.js:1040)
    at d.list (_app.js:1040)
    at n (_app.js:112418)
    at _app.js:112418
    at commitHookEffectListMount (main.js:40007)
    at commitPassiveHookEffects (main.js:40045)
    at HTMLUnknownElement.callCallback (main.js:20464)
    at Object.invokeGuardedCallbackDev (main.js:20513)
    at invokeGuardedCallback (main.js:20568)
    at flushPassiveEffectsImpl (main.js:43129)
    at unstable_runWithPriority (main.js:49269)
    at runWithPriority$1 (main.js:31315)
    at flushPassiveEffects (main.js:43096)
    at main.js:42975
    at workLoop (main.js:49213)
    at flushWork (main.js:49168)
    at MessagePort.performWorkUntilDeadline (main.js:48780)

If I attempt to drag/drop a media file to upload through the sidebar, I get this error:

index.js:1 Uncaught (in promise) TypeError: this.store.persist is not a function
    at d.<anonymous> (index.js:1)
    at index.js:1
    at Object.next (index.js:1)
    at index.js:1
    at new Promise (<anonymous>)
    at c (index.js:1)
    at d.persist (index.js:1)
    at index.js:1
    at index.js:1
    at Object.next (index.js:1)
    at index.js:1
    at new Promise (<anonymous>)
    at v (index.js:1)
    at onDrop (index.js:1)
    at index.js:643

Any help would be appreciated!

I think I fixed this, when creating the new cms object I had this:

      new TinaCMS({
        enabled: true,
        sidebar: true,
        plugins: [MarkdownFieldPlugin],
        apis: {
          strapi: new StrapiClient(process.env.STRAPI_URL),
        },
        media: 
          store: new StrapiMediaStore(process.env.STRAPI_URL),
      }),

Removing store from the media line enabled all of my images to appear, and uploading from the sidebar to the Strapi backend is working correctly.

      new TinaCMS({
        enabled: true,
        sidebar: true,
        plugins: [MarkdownFieldPlugin],
        apis: {
          strapi: new StrapiClient(process.env.STRAPI_URL),
        },
          media: new StrapiMediaStore(process.env.STRAPI_URL),
      }),
2 Likes

yeah, run today in the same problem. the Guide is not up to date anymore

Thank you! Updated the guide in this PR.