-
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
Loading(Static Query) white screen on gatsby build #25920
Comments
Started getting the same thing when building on Linux (both RHEL7 and Ubuntu) without any version changes, was working fine last week. |
Getting the same thing after updating to the latest Gatsby. Works for me 2.24.4 and below. |
Hi @abedziak, @SpicyPete, and @jjprices! Sorry to hear you're running into an issue. Thank you for reporting it and adding context! To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction either in a public repo or on something like codesandbox. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look. Thanks for using Gatsby! 💜 |
I am getting this exact same issue. I noticed some other devs before having it: #6350 I saw that some devs recommend removing the const query = graphql`...` Instead of this: export const query = graphql`...` But this is not my case. Everything was working good until some hours ago. I have all of my pages with queries like this: // imports
const CollectionProduct = ({ data }) => {...}
export const query = graphql`
query($handle: String!) {
shopifyCollection(handle: { eq: $handle }) {
products {
id
title
handle
createdAt
}
}
}
}
` In that component I am using So how is that today out of nothing this became an issue? |
Hmm yeah that seems like it may be that. I am exporting |
My issues comes exactly after I added a Locally it works, I can build the project and see it on my This is my ESLint config: module.exports = {
globals: {
__PATH_PREFIX__: true,
},
'parser': 'babel-eslint',
parserOptions: {
extraFileExtensions: ['.js'],
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
useJSXTextNode: true,
include: ['**/*js'],
},
env: {
es6: true,
node: true,
jest: true,
browser: true,
commonjs: true,
serviceworker: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'semistandard', 'plugin:import/react'],
plugins: ['react'],
rules: {
semi: 'off',
'strict': 0,
curly: [1, 'all'],
'no-console': 'error',
"react/prop-types": 0,
camelcase: ['off', {}],
'react/jsx-uses-vars': 1,
'react/jsx-uses-react': 1,
'react/jsx-boolean-value': 2,
"react/display-name": 'warn',
'react/react-in-jsx-scope': 1,
'brace-style': ['error', '1tbs'],
'comma-dangle': ['error', 'never'],
'linebreak-style': ['error', 'unix'],
'react-hooks/exhaustive-deps': 'off',
'standard/no-callback-literal': [0, []],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: '*', next: 'multiline-const' },
{ blankLine: 'always', prev: 'multiline-const', next: '*' },
{ blankLine: 'always', prev: '*', next: 'block-like' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'react/jsx-curly-brace-presence': [
'error',
{ props: 'never', children: 'never' },
],
},
}; |
Same thing here when upgrading from gatsby 2.23.22 and gatsby-cli 2.12.59. Problem is with
|
I just had the same issue.
to your package.json |
The downgrade works for me (a little bit different with npm, but it works with 2.9.12 and gatsby 2.24.2). |
This issue started impacting our production environment too today. |
I started getting this issue today. |
I can confirm that I fixed this issue by upgrading to gatsby@2.24.7. This was mentioned on another issue that I cannot find to link to, anyway everything builds fine now. |
For me none of the version downgrades (babel-plugin-remove-graphql-queries or gatsby) or upgrades are working. I noticed that the fully rendered component shows for a split second before it gets replaced by Loading (Static Query). Will continue to investigate tomorrow. |
As @abedziak reported, upgrading to gatsby v2.24.7 worked for me as well. Here's my version:
|
Also can confirm Gatsby version 2.24.7 resolved the issue for us as well. |
Congratulations @herrwitzi, you are now a hero... I was ready to jump out of my apartment's window for spending the last whole day with a mysterious issue that even rolling back the packages updates didn't solves the problem... Was going crazy, and you saved me! Thanks for this! |
the fix from @herrwitzi works for me as well, thanks for that work-around. |
+1 for the fix from @herrwitzi. I pin So this mean is quite clear that |
Fixed in |
I still have this bug after auto deploying to Vercel. When manually redeploying, the page is back. I'm on |
Still having this issue on vercel. If any want to see what's really happening, here is the link - https://trend-d8qyatqwc.vercel.app It's very frustrating. I don't see any error in the console or anything. The site just breaks. |
anyone looking into this? |
I am still having this issue locally too. The proposed solutions above don't work for me |
I solved it on vercel with pinning |
Going to try out downgrading babel-plugin-remove-graphql-queries, but I started having this problem out of the blue about 4 weeks ago, I've made sure everything is updated, deleted the cache folders as was suggested in the other issue. It's happening on my local and live version of the site, but the problem is that it's extremely random and impossible to reproduce. As soon as you reload the page, it's gone, and won't come back even if you clear the cache. Then randomly it will happen again. I've had consistent reports of it popping up randomly no matter what I do. But it seems to be limited to Chrome. |
This could probably be re-opened as it's an ongoing issue: I've never seen it before, but I upgraded to
Currently trying a rebuild after clearing the cache, will update this comment if it has any effect. The even more frustrating aspect is that Gatsby Cloud told me I needed to upgrade core gatsby to solve an issue that was stopping our builds from working, so I can't downgrade |
@rub1e I solved this by removing the static query altogether. I had to move the static query to page level and pass down the data to the actual component. My client got frustrated with us due to this bug. :/ |
@jjprices |
@jjprices |
Has this bug been fixed? I’m on 2.24.50 and keep running into this issue. Builds don’t throw any errors but the site renders white. Sometimes individual pages will make the entire site crash. Deleting the cache on every build increases build times by three fold. |
This bug seems to still be happening in production for us. We are on Gatsby 3.1.2 and babel-plugin-remove-graphql-queries version 3.5.0 We run two StaticQueries in two separate components that render on the homepage. Here is the code for them: Gist 1: https://gist.github.com/grahamd711/5855edb75457d804ce1d2c391a019a94 Gist 2: https://gist.github.com/grahamd711/28f62bc44b8abc82e856f14cc7b872df There are no errors in the console and nothing to display besides the Loading(StaticQuery) and the white page. This error only occurs on production and not on development. We have tried to clear the cache manually within Gatsby Cloud and the issue still occurs intermittently. Is anyone running into this same problem or have advice on how to fix? Here is my package.json
|
Just wanted to note that I ran into this problem recently and the solution was to unregister a service worker that was presumably hanging around from another build. My issue was local so I just unregistered it in Chrome DevTools. In production the answer might be to look at gatsby-plugin-remove-serviceworker. Possibly related: Uncaught Error: The result of this StaticQuery could not be fetched. #26563 |
I was having this issue on |
Description
This is a first issue I am submitting, so if there is any information missing, apologies.
After upgrading to
gatsby@2.23.5
and runninggatsby build
I am seeing a white screen with no errros in the console.Running
gatsby develop
is working as expected.When running in a CI in AWS Codepipeline I can see the actual error
I have not made any changes to StaticQueries in any of the components since the last successful build.
Steps to reproduce
I'll try to make a repro demo but have literally zero time now.
Expected result
There should be an actual page on the screen
Actual result
Every page renders like that:
Environment
As mentioned above running version
gatsby@2.23.5
also triedgatsby@2.23.19
as I was seeing a different error related to this issue #25481The text was updated successfully, but these errors were encountered: