Closed emson-digital closed 3 years ago
Can you check Craft logs? The first error would happen if Craft did not return an array there for the GraphQL query, however, it's not possible unless some error occurs which just throws the entire query off (https://github.com/craftcms/gatsby-helper/blob/main/src/gql/resolvers/UpdatedNode.php#L29).
The second error is a generic network DNS lookup error that is not something that would be related to Craft.(https://www.codingdefined.com/2015/06/nodejs-error-errno-eaiagain.html)
Hello, Adding more details on this issue. We see that the error occurs when deleting nodes. 2 examples are below.
`16:27:29 PM: ERROR "gatsby-source-craft" threw an error while running the sourceNodes lifecycle:
16:27:29 PM: | ^
16:27:29 PM:
512 | await sourceNodeChanges(config, { nodeEvents });
16:27:29 PM: 513 | }
16:27:29 PM:
514 | await cache.set(CRAFT_CONFIG_VERSION
, remoteConfigVersion);
16:27:29 PM: 511 | // And source, if needed
16:27:29 PM:
515 | await cache.set(CRAFT_LAST_CONTENT_UPDATE
, remoteContentUpdateTime);
16:27:29 PM:
16:27:29 PM: 16:27:29 PM: Error: Unknown type contentBuilder_faq_BlockType
16:27:29 PM: [www]/[gatsby-graphql-source-toolkit]/src/source-nodes/node-actions/delete-n odes.ts:10:13
16:27:29 PM:
16:27:29 PM:`
`16:35:36 PM: info Sourcing changes for 89 nodes.
16:35:36 PM: ERROR "gatsby-source-craft" threw an error while running the sourceNodes lifecycle:
16:35:36 PM: Unknown type contentBuilder_faq_BlockType
16:35:36 PM: 511 | // And source, if needed
16:35:36 PM: | ^
16:35:36 PM:
512 | await sourceNodeChanges(config, { nodeEvents });
16:35:36 PM: 510 | }
16:35:36 PM: 513 | }
16:35:36 PM:
514 | await cache.set(CRAFT_CONFIG_VERSION
, remoteConfigVersion);
16:35:36 PM:
515 | await cache.set(CRAFT_LAST_CONTENT_UPDATE
, remoteContentUpdateTime);
16:35:36 PM: Error: Unknown type contentBuilder_faq_BlockType
16:35:36 PM: 16:35:36 PM:
16:35:36 PM: [www]/[gatsby-graphql-source-toolkit]/src/source-nodes/node-actions/delete-n odes.ts:10:13
16:35:36 PM:
16:35:36 PM:
16:35:36 PM:
16:35:36 PM: [www]/[gatsby-graphql-source-toolkit]/src/source-nodes/source-node-changes.t s:34:9
16:35:36 PM:
16:35:36 PM:`
More to add. Previews build as expected and never seem to fail. Just when I save the entry through the CMS and trigger a build.
Preview with expected changes. In this case I added text to the description field and moved the "Embed" block below the Callout Block.
Result in Gatsby Cloud with error message.
Clearing cache and rebuilding on Gatsby side allows for a clean build, but will still error with the next incremental change from the CMS webhook.
This is an issue with the Neo plugin. It's not really a bug, it's just that support for Gatsby Helper/source plugin has not been added yet. I've opened an issue there and also provided a fix, so this should be resolved rather quickly.
Should be resolved with Neo 2.11.11.1, thanks again @andris-sevcenko for bringing this to our attention.
@emson-digital can you update to Neo 2.11.11.1 and give it another shot?
@andris-sevcenko that seems to have resolved it. I haven't been able to produce a build error today. Much appreciated to you and @ttempleton !
Description
Having some very consistent, but inconsistent errors. Most of the time I can run "Clear Cache and Rebuild" and the site will rebuild without error, but not always. Almost always if a rebuild is triggered by webhook it will fail, but very rarely it will succeed.
If I run local builds 'Gatsby Develop' I never get a failure. But those are never triggered by webhook.
Error is sometimes:
Triggered by Gatsby Build webhook Build failed for branch staging Failed after 0:10
Raw logs "gatsby-source-craft" threw an error while running the sourceNodes lifecycle:
Cannot read property 'map' of null
488 | // Create the sourcing node events 489 | const nodeEvents = [
Error is sometimes:
Triggered by Gatsby Build webhook Build failed for branch staging Failed after 0:19
Raw logs "gatsby-source-craft" threw an error while running the onPreBootstrap lifecycle:
request to https://[redacted].com/api failed, reason: getaddrinfo EAI_AGAIN [redacted].com
For more details see https://gatsby.dev/issue-how-to
Steps to reproduce
Additional info
Google Cloud Storage 1.4.1 Google Cloud Storage integration for Craft CMS
Incognito Field 1.2.0 PlainText drop-in replacement that can be set to disabled, hidden or readonly.
Navigation 1.4.21 A Craft CMS plugin to create navigation menus for your site.
Neo 2.11.9 A Matrix-like field type that uses existing fields
Redactor 2.8.8 Edit rich text content in Craft CMS using Redactor by Imperavi.
SEOmatic 3.4.6 SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
Webhooks
Additional Info: