-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Jest fails with Couldn't find temp query result
error
#35018
Comments
I'm also experiencing this problem with |
Same for me.
Env: Linux (CI), Gatsby 4.7.2. Note: it started happening recently. I haven't seen this error before. No changes were done to the site in between. CI just started encountering this problem out of the blue moon. Trying |
|
I'm experiencing the same issue with Running |
Same issue here! :( |
Creating a new blank gatsby project builds locally on MacOS Monterrey (ARM & x64) but fails on jenkins server build (Debian 11).
Dependencies for brand new gatsby project:
|
I had this issue too with v4.12.1. Hope it helps someone. |
Same on gatsby v4.15.2. Neither Precisely I'm getting
upon running
|
gatsby build
since [email protected]
gatsby build
fails with Couldn't find temp query resul
error
@LekoArts here's a URL to the faulty project (minimal reproduction): https://github.com/belfz/gatsby-bug-reproduce |
gatsby build
fails with Couldn't find temp query resul
errorgatsby build
fails with Couldn't find temp query result
error
gatsby build
fails with Couldn't find temp query result
errorCouldn't find temp query result
error
Ooh, good find! Sneaky one |
I wouldn't consider it resolved. My use case doesn't involve executing createPage in onCreateWebpackConfig. |
If you can provide a minimal reproduction we'd be able to look at it |
big thank you @LekoArts, indeed that was it - I didn't spot that I was using a wrong lifecycle hook 😅 |
@Nowaker Agreed - I'm getting this intermittently on netlify deploys and I'm not doing anything funny with |
@beamercola Not really. Going back to some older lockfile did resolve most of it, but not all. It happens every once in a while. |
We're facing the same issue when running |
I'm getting the same issue on netlify when running |
Yeah and just so you know, this exact problem drove me to using Jenkins and dedicated servers and even local builds instead of Gatsby Cloud as it was always failing there.. and working on my local mac.. |
Here is the error in all its glory; it happens at "random" and usually is fixed by rerunning the build with an empty cache: https://app.netlify.com/sites/aiid/deploys/633bd0132ef6160009949592 (I know, I know, netlify, but this is the example I have at hand) The repo: https://github.com/responsible-ai-collaborative/aiid My spider sense tells me that it has to do with concurrency/size, and a minimal repro case is impossible. edit: we are also considering moving to Jenkins :/ |
@coreyward @ZeldOcarina @cesarvarela Thanks, I know it's frustrating, it's just near impossible for us to address without a reproduction locally. Do any of you have links to a build where this is happening on Gatsby Cloud? I have more tools available on that end, but I don't see any links to builds on Gatsby Cloud, or any links to reproductions that happen locally. |
I do! |
Thanks @ZeldOcarina! I'll open up a ticket on the Gatsby Cloud side and take a look. Do you mind sending an email to [email protected] and tag me in that email and we can track it that way and report back on this thread. |
Actually @ZeldOcarina I don't see the |
@ZeldOcarina For the builds you sent, they are OOM'ing. Often, it OOMs and exits before the error can be written to the logs. Without looking at the code for a while, I can't say why exactly (at a glance I think adding But I still don't see an instance of the |
Hi @graysonhicks, |
I am also experiencing it, randomly. It's a shame because my site is supposed to rebuild automatically on a certain interval, but one time in two I have to clear cache and relaunch the build myself ... |
Also running into this since updating to v4 (from v2). Very intermittent. It definitely seems to happen more frequently with our larger sites. If this issue is related to PQR/LMDB stuff, is it possible to add additional debug logging to it? Or perhaps a way to open up the cache db to try and figure out where things have gone off the rails. I have a netlify instance where it fails maybe 1/6th of the time. I would be willing to possibly run some tests with our data set. We are not using GatsbyImages in our site. |
I've had some success setting I guess that it limits how much stuff Gatsby tries to do at once, limiting memory consumption. Also, if you are on CI and have a limited number of cores, it leaves free cores for other processes, like Cypress, local servers, etc. |
I don't want to jinx it, b/c it's still not a terribly large sample size, but this has shown improvements for us. I was getting the temp query failure intermittently, but it's been clear for a bit. 🤞 It doesn't seem to significantly affect build times either, which was an initial concern. I'll report back if it pops back up or stays clear over a larger sample size. |
Limiting the concurrency is a very bad workaround. The whole selling point of Node.js and Gatsby is the fact it's highly concurrent. No or low concurrency is like using Jekyll - a huge downgrade. |
It is a bad workaround depending on how much it affects your build time, which in my case, was not that much different. |
Also, I don't think any of us are suggesting that this issue can be closed or that this "solves" it. But perhaps it can allow some of us that are stuck w/ these errors to move forward in the interim. |
This issue has been closed though. @cesarvarela would you be able to put your repo and reproduction details in a new issue? It doesn't look like anyone has done this as yet for builds, this issue was related to Jest. Although I don't think Jest had anything to do with it I believe a new issue needs to be opened and linked here as people are still experiencing this problem. Unfortunately the repo I am having the issue with is private 😞 |
Same here. I do feel like it has something to do with larger amts of data/pages. I wonder if we tried to make a really basic project that's pushing a TON of faked data thru the gatsby pipeline and creating thousands of pages, maybe we can get sth public. I may give it a shot if I have time, sad thing is, I rarely do 😞 |
As an additional data point, I too am observing relief from this issue with |
Even if a problem manifests itself when resource use is high, the core issue in such situations is race conditions caused by buggy concurrent code. It's easy to make bugs even in green threads environment when working with multiple variables, let alone when real workers are involved. It's always easier to trigger race conditions in CPU-contested environments. |
Hey @Nowaker what is a "green thread" environment? |
@ZeldOcarina Green threads: https://en.wikipedia.org/wiki/Green_thread - and Node.js itself uses green threads for "concurrency", while some other language may or may not use it. "Concurrency" and not concurrency because Node.js has GIL: https://en.wikipedia.org/wiki/Global_interpreter_lock, though it's still more concurrent than other languages with GIL because I/O waits put its green thread in sleep mode, and a different non-blocked green thread is running. |
@Nowaker wow what a deep insight, thank you so much! |
Did anyone find a solution for this? |
for netlify, creating an environment variable |
I have this in place but am still getting the error, just less frequently than before (we used to have around 50% of builds fail, now it's probably more like 5%). |
Am also having this issue. |
Still observing this issue - random pages error as @belfz mentioned. Updated my build Netlify commands to I built a custom front end used the Gatsby Shopify Starter - https://github.com/gatsbyjs/gatsby-starter-shopify Also, feel like it's worth mentioning that I experience the same error for local builds and running |
I am also experiencing this issue, |
Just a reminder, this is still happening. We can't provide a reproducible sample since it appears randomly (racing condition? memory issue?)
|
Preliminary Checks
Description
As part of a site's unit tests, it may need to compile the site. Previously this was simple to do by running the cli via
child_process
orexeca
. This works until[email protected]
, but since[email protected]
this fails. The site builds correctly if build manually from the CLI.Reproduction Link
https://github.com/ascorbic/gatsby-jest-bug
Steps to Reproduce
Expected Result
Site builds and test passes
Actual Result
Site build fails with the following error:
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: