core icon indicating copy to clipboard operation
core copied to clipboard

Failed to fetch remote storage: Project not found.

Open aaronLejeune opened this issue 1 year ago • 4 comments

Hello there,

Im creating a large webshop with NuxtHub (love it) but got issues when trying to connect to my local KV and Cache storage.

Context:

I want to store PSQL-api responses in KV storage with nuxt multicache but I cant seem to connect to the external KV storage. This is what my files look like:

nuxt.config.ts

...
hub: {
  cache: true,
  kv: true,
}

.data/hub/wrangler.toml

[[kv_namespaces]]
binding = "KV"
id = "kv_default"

Weird thing is that I always see this in the nuxthub (both for KV and Cache), while in I can see that both KV and Cache are created in Cloudflare. image

cloudflare project: image

What I tried:

  • redeploy the project using nuxthub deploy
  • relink the project to a newly created one using npx nuxthub link. Again KV and Caches are created but still get the same error

Expected behavior

I cant seem to reproduce this issue easely so I hope the description can give enough context. Would be nice to test this out locally. Looking forward to your reply :)

aaronLejeune avatar Sep 17 '24 12:09 aaronLejeune

Hey,

Do you still have the installation page after deploying your project?

What is nuxt multicache?

atinux avatar Sep 23 '24 13:09 atinux

Could you please upgrade to latest version (v0.7.20) and deploy again?

atinux avatar Sep 25 '24 10:09 atinux

Hi @atinux,

Thanks for waiting, was on vacation. I updated nuxthub to the latest version and deployed the website, but the issue does not seem to be resolved.

Linked to https://admin.hub.nuxt.com/skargards-web-three/skargards-web                                      nuxt:hub 3:41:14 PM
Using production environment                                                                                nuxt:hub 3:41:14 PM
Using remote storage from http://skargards-web.pages.dev                                                    nuxt:hub 3:41:14 PM

ERROR  Failed to fetch remote storage: Project not found.                                                     nuxt:hub 3:41:14 PM
Make sure to deploy the project using nuxthub deploy or add the deployed URL as NUXT_HUB_PROJECT_URL environment variable.

I also added env variables NUXT_HUB_PROJECT_KEY and NUXT_HUB_PROJECT_URL with the correct settings just to make sure. On the local side, can it be CORS related by any chance?

I also tried to add some KV keys in Cloudlfare, but still no link with NuxtHub: image image

aaronLejeune avatar Sep 26 '24 13:09 aaronLejeune

it seems that https://skargards-web.pages.dev/api/_hub/manifest/ is sending back a 301, did you have any server middleware in place?

atinux avatar Sep 29 '24 14:09 atinux

Feel free to re-open if update your server middleware is not the issue

atinux avatar Oct 18 '24 17:10 atinux