Skip to content
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

OG Image generation dynamic example failing on Vercel #435

Closed
Thamasky opened this issue Oct 29, 2022 · 1 comment · Fixed by #450
Closed

OG Image generation dynamic example failing on Vercel #435

Thamasky opened this issue Oct 29, 2022 · 1 comment · Fixed by #450
Assignees
Labels
bug Something isn't working

Comments

@Thamasky
Copy link

I'm having issues with using dynamic images with the new @vercel/og package.

Issue 1

When I run the example vercel-og-next-js, and try out api/dynamic-image?username=vercel it works. However, when I change it to my own username ?username=thamasky it's broken. Even though https://github.com/thamasky.png exists!

The logs on Vercel say the following:

Error: Unsupported image type: unknown
    at node_modules/satori/dist/esm/index.wasm.js:6:0

I get this error as well in another project whenever I pass an invalid URL. So perhaps it's not recognising the github url as a valid url. I just wonder why the vercel username works and mine doesn't.

Issue 2

My original error (from another project deployed to Vercel) where I'm trying to achieve the dynamic image with a valid URL is different than the one above:

RuntimeError: unreachable
    at wasm://wasm/00417392:wasm-function[72]:0x7a642
    at wasm://wasm/00417392:wasm-function[14]:0x1f508
    at wasm://wasm/00417392:wasm-function[11]:0xc4f
    at wasm://wasm/00417392:wasm-function[91]:0x84ee4
    at wasm://wasm/00417392:wasm-function[11]:0xdec
    at wasm://wasm/00417392:wasm-function[91]:0x84ee4
    at wasm://wasm/00417392:wasm-function[11]:0xbe2
    at wasm://wasm/00417392:wasm-function[317]:0xc675d
    at wasm://wasm/00417392:wasm-function[21]:0x381cc
    at node_modules/@resvg/resvg-wasm/index.mjs:148:0

I tried several options, one of them was passing invalid url:

Error: Can't load image https:/.../abc.png: Unsupported image type: unknown
    at node_modules/satori/dist/index.wasm.js:6:0

As you can see, when the url isn't valid we get a different error. So I'm definitely passing a valid image url, but somehow it just won't generate. Even though it works on localhost.

Any feedback would be appreciated, as I'm currently hard-stuck 😬

@domeccleston domeccleston self-assigned this Nov 10, 2022
@domeccleston domeccleston added the bug Something isn't working label Nov 10, 2022
@domeccleston
Copy link
Contributor

@Thamasky Would you mind creating a new issue for Issue 2 and including steps to reproduce, including the code you're using and the URL? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants