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

Cannot read properties of undefined (reading '265') #649

Open
shinyuna opened this issue Nov 24, 2024 · 3 comments
Open

Cannot read properties of undefined (reading '265') #649

shinyuna opened this issue Nov 24, 2024 · 3 comments

Comments

@shinyuna
Copy link

shinyuna commented Nov 24, 2024

Description / Observed Behavior

image

When using the Satori library, approximately 1 out of every 2 attempts fails to generate an SVG, throwing the following error:
Cannot read properties of undefined (reading '265').

Expected Behavior
Satori should generate the SVG consistently without encountering this error.

Reproduction

  1. npm run dev
  2. Enter URL : https://pfk83h-3000.csb.app/api/og

Additional Context

Satori version: 0.12.0
Configuration details:

  • We are using the loadAdditionalAsset option to dynamically load required fonts as part of the SVG generation process.
  • Local font files in both .ttf and .otf formats are being used for the dynamic font loading.

This issue might be related to the dynamic asset loading process, as the error occurs sporadically.

@shinyuna
Copy link
Author

image

I think there is a problem with this dependency.

@erxclau
Copy link

erxclau commented Nov 27, 2024

Hey @shinyuna, the error you're running into seems similar to the error in #162. Are you loading variable fonts? If not, would you be able to provide a reproduction?

@shinyuna
Copy link
Author

shinyuna commented Nov 28, 2024

Hey @shinyuna, the error you're running into seems similar to the error in #162. Are you loading variable fonts? If not, would you be able to provide a reproduction?안녕하세요 @shinyuna, 발생한 오류는 #162의 오류와 유사한 것 같습니다. 가변 글꼴을 로드하고 있습니까? 그렇지 않다면 복제품을 제공할 수 있습니까?

I do not use variable fonts. Here is the reproduction! https://codesandbox.io/p/devbox/pfk83h

image

You can see the same error here.

  1. npm run dev
  2. enter preview url https://pfk83h-3000.csb.app/api/og

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants