-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix: og-image 500 error in production #370
Comments
Hi, I've tried to replicate this without any success. Can you provide the stacktrace for the 500 error you're getting? |
Hey Harlan happy new year - and thanks for checking into this 🙏 Here is the live URL... This is the url where the image lives and what error is thrown... If I go to http://localhost:3000/__og-image__/image/og.png while dev is running the image shows correctly. So I assume this is happening during the build. In Cloudflare Workers I'm not seeing an uploaded image. Below is the assets uploaded... Assets uploaded 62 Files uploaded |
Relates to harlan-zw/nuxt-seo#370
I've tried to replicate this on my test Cloudflare workers instance and it seems to be working fine. (https://playground.harlanzw.workers.dev/__og-image__/image/satori/wave/og.png) Debugging this is a bit difficult so what I'd recommend is to prerender your home page (if possible) which will automatically have this home page og image pre-rendered as well. The zero runtime mode was made for Cloudflare workers as they have some quirks and limited size for the worker. I'm in the process of some heavy internal improvements that should improve the stability and debugging of Cloudflare workers but likely ~1 week away from being released. |
Thanks again 🙏 So I deployed a million times with different settings (thanks Nuxthub for the easy auto deploys 😆). When I set the zero runtime config and the pre-render routes I got stuck in an infinite loop of redirects to the main domain (https://wellnesswavesapp.com). I also noticed the preview domains did not work - they redirected to the main domain. Once I removed the Could this be due the DNS settings? I only have a CNAME record pointing to the root domain Update: I added another CNAME record with www and tried with the I then removed the |
so ,must i delete this:seo: { |
Not sure of your exact instance @shidaizaiweixiao but if you previously had that setting set to true, try to remove it and redeploy to see if your issue was the same as mine. |
🐛 The bug
I'm getting a 500 error with both defineOgImageScreenshot() and defineOgImageComponent()
Both show in the Nuxt DevTools ok but the image gets a 500 when deployed.
Deploying to Cloudflare via NuxtHub with @nuxtjs/seo: "2.0.2"
Tried installing "@resvg/resvg-js-linux-x64-gnu": "^2.6.2", #361 but that did not solve the issue
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-62jdmcub?file=package.json
🌈 Expected behavior
ℹ️ Additional context
I was getting a node error in stackblitz and wasn't able to run it but the package.json, nuxt.config.ts, and file structure is correct
The text was updated successfully, but these errors were encountered: