nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
939 stars 53 forks source link

Failed to fetch remote storage: Project not found. #290

Open aaronLejeune opened 2 weeks ago

aaronLejeune commented 2 weeks ago

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:

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 :)

atinux commented 1 week ago

Hey,

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

What is nuxt multicache?

atinux commented 6 days ago

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

aaronLejeune commented 5 days ago

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

atinux commented 2 days ago

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