gatsby icon indicating copy to clipboard operation
gatsby copied to clipboard

Build failed because "all worker queries are not dirty"

Open moose96 opened this issue 2 years ago β€’ 2 comments

Preliminary Checks

  • [X] This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
  • [X] This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions

Description

Gatsby build failed at Merge worker state. I got this error message:

Assertion failed: all worker queries are not dirty (worker #1)



  Error: Assertion failed: all worker queries are not dirty (worker #1)

  - queries.ts:400 assertCorrectWorkerState
    [frontend]/[gatsby]/src/redux/reducers/queries.ts:400:13

  - queries.ts:233 queriesReducer
    [frontend]/[gatsby]/src/redux/reducers/queries.ts:233:7

  - redux.js:536 combination
    [frontend]/[redux]/lib/redux.js:536:29

  - redux.js:296 next
    [frontend]/[redux]/lib/redux.js:296:22

  - index.ts:72
    [frontend]/[gatsby]/src/redux/index.ts:72:68

  - index.js:27 Object.dispatch
    [frontend]/[redux-thunk]/lib/index.js:27:16

  - pool.ts:136 mergeWorkerState
    [frontend]/[gatsby]/src/utils/worker/pool.ts:136:13

  - build.ts:305 build
    [frontend]/[gatsby]/src/commands/build.ts:305:11

I followed this instructions: https://github.com/gatsbyjs/gatsby/issues/34051#issuecomment-996834803 and I got this log:

trackedQueries: Map(22) {                                                                              
  'sq--src-components-seo-tsx' => { dirty: 0, running: 0 },                                            
  'sq--src-components-molecules-navigation-tsx' => { dirty: 0, running: 0 },                           
  'sq--src-components-organisms-partners-tsx' => { dirty: 0, running: 0 },                             
  'sq--src-hooks-cookies-use-cookies-translations-ts' => { dirty: 4, running: 0 },                   
  'sq--src-components-organisms-description-video-tsx' => { dirty: 0, running: 0 },                    
  '/contact/' => { dirty: 0, running: 0 },                                                             
  '/our-mission2/' => { dirty: 0, running: 0 },                                               
  '/9-style-clues-1/' => { dirty: 0, running: 0 },                  
  '/the-pull-factor-workshop-2/' => { dirty: 0, running: 0 },                                          
  '/innovation-framework-6/' => { dirty: 0, running: 0 },                                              
  '/john-doe-1/' => { dirty: 0, running: 0 },                                                  
  '/' => { dirty: 0, running: 0 },                                                                     
  '/norman-de-greve-4/' => { dirty: 0, running: 0 },                                                   
  '/jeff-fielkow-5/' => { dirty: 0, running: 0 },                                                      
  '/michele-baeten-6/' => { dirty: 0, running: 0 },                                                    
  '/jan-tharp-3/' => { dirty: 0, running: 0 },                                                         
  '/thibaut-mongon-8/' => { dirty: 0, running: 0 },                                                    
  '/ad-sustainability-awareness-platform-asap-3/' => { dirty: 0, running: 0 },                         
  '/michael-okoroafor-7/' => { dirty: 0, running: 0 },                                                 
  '/shaping-behaviors-for-impact22-2/' => { dirty: 0, running: 0 },                                    
  '/brands-can-create-effective-storytelling-that-inspires-action-and-positive-impact-for-people-and-pl
et-3/' => { dirty: 0, running: 0 },                                                                    
  '/blog/' => { dirty: 0, running: 0 }                                                                 
},                                                                                                     

Query (static) from use-cookies-translations.ts file:

const query = graphql`
    query {
        allFile(filter: { sourceInstanceName: { eq: "cookies" }, extension: { eq: "md" } }) {
            edges {
                node {
                    name
                    relativeDirectory
                    childMarkdownRemark {
                        rawMarkdownBody
                    }
                }
            }
        }
    }
`;

As you can see I don't use gatsby-plugin-image in this file, this is why I decided to create new issue. In the hook file I tried to load markdown files from src/assets/cookies-data/en/ directory. I added an appropriate config in gatsby-config.ts file (to gatsby-source-filesystem and I added gatsby-transformer-remark plugin).

This build fails only on production-testing environment, where it is run on Docker container. I tried to run this build locally on Windows and WSL and it worked fine...

Does anybody know how to resolve this error, or although how to better debug this issue?

Reproduction Link

Unfortunately, I don't have any

Steps to Reproduce

I'm not sure if it could be reproduced, but you can try instructions below:

  1. Set the envinronment - Docker Node:16-alpine with those packages: git build-base gcc libtool autoconf automake zlib-dev libpng-dev nasm bash openssh git-review python3
  2. Create clean project, with 4 markdown files in src/assets/cookies-data/en/ directory
  3. Install gatsby-source-filesystem and gatsby-transformer-remark plugins
  4. Create hook file with query in description (You don't even have to use the hook in project)
  5. Try to build Gatsby site

Expected Result

I wanted my site to be built

Actual Result

Build failed due to error: Assertion failed: all worker queries are not dirty (worker #1)

Environment

System:
    OS: Linux 4.18 Alpine Linux
    CPU: (4) x64 Intel Core i7 9xx (Nehalem Class Core i7)
    Shell: 1.34.1 - /bin/ash
  Binaries:
    Node: 16.15.0 - /usr/local/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 8.5.5 - /usr/local/bin/npm
  npmPackages:
    gatsby: ^4.19.0 => 4.19.0
    gatsby-plugin-image: ^2.15.1 => 2.19.0
    gatsby-plugin-manifest: ^4.15.1 => 4.19.0
    gatsby-plugin-meta-redirect: ^1.1.1 => 1.1.1
    gatsby-plugin-react-helmet: ^5.15.0 => 5.19.0
    gatsby-plugin-react-svg: ^3.1.0 => 3.1.0
    gatsby-plugin-robots-txt: ^1.7.1 => 1.7.1
    gatsby-plugin-sass: ^5.15.1 => 5.19.0
    gatsby-plugin-sharp: ^4.15.1 => 4.19.0
    gatsby-plugin-sitemap: ^5.15.1 => 5.19.0
    gatsby-source-filesystem: ^4.21.0 => 4.21.0
    gatsby-transformer-remark: ^5.21.0 => 5.21.0
    gatsby-transformer-sharp: ^4.15.1 => 4.19.0

Config Flags

No response

moose96 avatar Aug 19 '22 13:08 moose96

Hi @moose96, sorry to hear you're running into this issue. Without a reproduction it will be very difficult for someone on our team to work on this. If this is an error you're running into often I would encourage you to take a shot at making a minimal reproduction repo of it to help us solve it.

TylerBarnes avatar Aug 19 '22 17:08 TylerBarnes

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

github-actions[bot] avatar Sep 09 '22 00:09 github-actions[bot]

Hi!

Since we didn't receive an answer for 7 days or more about the ask of a reproduction I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do answer here or open a new issue with a reproduction. Thanks!

LekoArts avatar Oct 04 '22 06:10 LekoArts