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

Error: 'document' is missing. #166

Open
maxsteenbergen opened this issue Mar 26, 2024 · 4 comments
Open

Error: 'document' is missing. #166

maxsteenbergen opened this issue Mar 26, 2024 · 4 comments
Labels
Issue: figma-api Issue on the Figma API end

Comments

@maxsteenbergen
Copy link

Hi,

Somewhere in the last week, something on —as far as I can gather— Figma's side changed causing the package to fail with the error Error: 'document' is missing. It also does this on your example project, see screenshot:

Screenshot 2024-03-26 at 09 28 59
@Diaan
Copy link

Diaan commented Mar 26, 2024

Hi,

We're encountering the same problem, I've tried initially with version 4.7.0 and now with 5.1.0.
I've tried debugging in the figma.js file and when i copy the yield client.file() function (with all parameters of course) to put it in a variable I can log to see what is happening, just before it is called initially (to set the document and styles properties) it works.
So for some reason it looks like a timing issue?

@maxsteenbergen
Copy link
Author

Ten hours later, I tried again and it all works as intended. So I assume @Diaan is on the right track with it being some timing issue or high workload on Figma's side. If there's anything I can do to monitor this, let me know.

@marcomontalbano
Copy link
Owner

Hi @maxsteenbergen and @Diaan, I'm unable to reproduce this issue. Everything is working fine on my end, even with large files. Can you confirm the same? Is it working now?

The same issue happened in the past when Figma API started responding with 202 but with an empty body.

To get "monitored" about this in the future, they have this page https://status.figma.com but it looks like they didn't publish any incident yet.

They also have a community on Discord and someone mentioned the same issue yesterday.

One thing I can do on my end is to provide a more technical error message, maybe showing the simplest cURL you could run. If we get the same error message from interacting directly with Figma API we could promptly open an issue on their side with all the details.

@marcomontalbano marcomontalbano added the Issue: figma-api Issue on the Figma API end label Mar 27, 2024
@Diaan
Copy link

Diaan commented Mar 27, 2024

It seems to be working with the huge file we have as well this morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: figma-api Issue on the Figma API end
Projects
None yet
Development

No branches or pull requests

3 participants