Closed luminous8 closed 1 year ago
Hi @luminous8, could you share what version you're using and anything else that would be useful for reproducing the error.
Yes, sorry (I knew i was forgetting something)
I was using 1.5.7 and I've now migrated to the ^2.0.0-beta.30 (hopping it would fix the bug)
My code is fairly simple, I'm using
defineOgImageStatic({ component: 'MyOgImage', item: item, });
and my component looks like this
<script setup lang="ts">
const props = defineProps({
job: Object,
});
</script>
<template>
<div
class="relative flex flex-col items-center justify-center w-full h-full p-12 bg-gray-200"
>
<div
class="flex flex-col items-center justify-center w-full bg-white shadow-md rounded-xl p-14 h-max"
>
<div
class="flex flex-col justify-between w-full pt-8 md:flex-row md:items-center"
>
<div class="flex">
redacted text
</div>
<div class="flex text-right text-[24px] leading-3 mt-2 text-gray-500">
redacted text
</div>
</div>
</div>
</template>
You can try to access the URL it's trying to fetch directly and see what 500 error is thrown
http://localhost:3000/api/og-image-options?path=/item/item-slug
I'm getting an ERR_CONNECTION_TIMED_OUT in my browser (i've done the same in local and it works perfectly)
Which nitro preset are you using and are you using nuxt build
or nuxt generate
?
I'm using Nuxt build
On Wed, May 3, 2023 at 12:16 PM Harlan Wilton @.***> wrote:
Which nitro preset are you using and are you using nuxt build or nuxt generate?
— Reply to this email directly, view it on GitHub https://github.com/harlan-zw/nuxt-og-image/issues/47#issuecomment-1532775379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIMBXLTCQFYE2SMODWTBLLXEIV6FANCNFSM6AAAAAAXUE2IOE . You are receiving this because you were mentioned.Message ID: @.***>
I'm having the exact same issue. Also using nuxt build.
update on my side: it's really weird, it started working after a couple of hours - i haven't changed anything
Hmm very strange! Feel free to re-open if it pops back up :)
Describe the bug
When loading the /__og_image__/og.png url on my production server i got an 500 error (Things works fine on my computer)
[nuxt] [request error] [unhandled] [500] fetch failed (https://mydomain.com/api/og-image-options?path=/item/item-slug) at $fetchRaw2 (./.output/server/node_modules/ofetch/dist/shared/ofetch.502a4799.mjs:180:24) at ./node_modules/nuxt-og-image/dist/runtime/nitro/middleware/og.png.mjs:16:19 at Object.handler (./.output/server/node_modules/h3/dist/index.mjs:1247:19) at Server.toNodeHandle (./.output/server/node_modules/h3/dist/index.mjs:1322:7) [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [nuxt] [request error] [unhandled] [500] fetch failed (https://mydomain.com/api/og-image-options?path=/item/item-slug) at $fetchRaw2 (./.output/server/node_modules/ofetch/dist/shared/ofetch.502a4799.mjs:180:24) at ./node_modules/nuxt-og-image/dist/runtime/nitro/middleware/og.png.mjs:16:19 at Object.handler (./.output/server/node_modules/h3/dist/index.mjs:1247:19) at Server.toNodeHandle (./.output/server/node_modules/h3/dist/index.mjs:1322:7) [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png" [Vue Router warn]: No match found for location with path "/item/item-slug/__og_image__/og.png"
Thanks for your help!
Reproduction
/
System / Nuxt Info