Closed kyle-tully closed 1 year ago
Hi!
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. 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! π
Experiencing the same. Cannot reproduce on a fresh install
also happens in v6.24.1
Seems like it can be an issue caused by the latest update of the WPGRAPHQL plugin
Also experienced this issue this morning.
+1 up on your suggestion @tsamantanis "Seems like it can be an issue caused by the latest update of the WPGRAPHQL plugin"
For a temporary fix before this is resolved I downloaded an older version of the WPGraphQL plugin v12.3
here and replaced the existing v13.0
on our Wordpress instance. Seems to havre resolved the issue.
So the new WPGraphQL version seems to be the cultprit here.
@REDSoftwareRasmus I actually downgraded to v12.3 and the issue was resolved.
Yeah that's what I did as well π @turbz
Downgrading WPGraphQL does fix the issue @REDSoftwareRasmus. Thanks!
Please open an issue on the WPGraphQL GitHub then. Thanks!
Hey everyone, the errors here come from upgrading WPGraphQL but are due to how gatsby-source-wordpress
works. There were some breaking changes in the latest version of WPGraphQL that aren't noticeable for most users but break the assumptions gatsby-source-wordpress
makes about WPGraphQL's schema.
I'm currently working on a fix for it and I'll post an update here when I have a new version of gatsby-source-wordpress
for you.
Thanks!
Thanks, this fixed the issue for me too.
Downgraded to Version 1.12.2 of WPGraphQL plugin fixed it.
Exact same issue here after WPGraphQL update to 1.13.x, downgrading fixed it. Using an outdated version of a plugin in a production environment isn't a suitable long-term solution though.
Yesterday I identified the problem, I'm just reading through the code right now and updating it with the fix, as the fix needs to be applied in multiple places. I'll have a PR up today
Hey folks, it's taking a little longer than expected but I want to drop an update here. I've fixed all of the issues that were failing builds and causing connections to break. I'm now working through integration test failures on older versions of WPGraphQL. Once I can be sure the changes I made wont break sites on earlier versions of WPGraphQL I'll be able to ship the fix
I have a fix which is forward/backwards compatible with WPGraphQL! I released it as a canary here gatsby-source-wordpress@7.3.0-alpha-wpgql-13.36
. I'll also flag the PR as a hotfix so it's released asap after being approved
I've installed the alpha above and get the error below during the develop process, I had to upgrade everything to Gatsby v5 in order to get this far :
success building schema - 0.521s
ERROR #11321 API.NODE.EXECUTION
"gatsby-node.js" threw an error while running the createPages lifecycle:
Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.
7 | const { createPage } = actions;
8 |
> 9 | const result = await graphql(`
| ^
10 | {
11 | allWpStudent {
12 | edges {
File: gatsby-node.js:9:24
Tried commenting out gatsby-node.js, but still get the following error:
ERROR UNKNOWN
Missing onError handler for invocation 'extracting-queries', error was 'Error: Interface field WpEdgeType.node expected but
WpEnqueuedScriptConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.'. Stacktrace was 'Error: Interface field
WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.
happy to paste in the much fuller errors if needed
@amcc is there a repo or api endpoint I can use to reproduce it?
@TylerBarnes sent in the wp-graphql slack (hope that's ok, rather than here)
@amcc thanks for the repro!
Turns out I published the last canary incorrectly, or from the wrong commit. This new canary version fixes the issue gatsby-source-wordpress@7.3.0-alpha-wpgql-thirteen.20
This is published in:
Successfully published:
- gatsby-source-wordpress@7.2.1
lerna success published 1 package
and
Successfully published:
- gatsby-source-wordpress@6.24.2
lerna success published 1 package
Sorry but I'm not quite sure what I need to do on my end to fix this but I'm still getting the errors:
@aaronjtonner if you upgrade to the latest version of gatsby-source-wordpress
it should go away
Thanks Tyler. That got rid of those errors and caused a new one, haven't seen any fixes for this and no idea where it's coming from:
I haven't seen that before either. I recommend opening a new issue :)
I saw that too. Only on gatsby cloud, not a local build. Still built though
On Wed, 7 Dec 2022 at 00:00, Tyler Barnes @.***> wrote:
I haven't seen that before either. I recommend opening a new issue :)
β Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/37114#issuecomment-1340175879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4EX7TMWDRQ3EKDZM64SDWL7HQTANCNFSM6AAAAAASOETQOE . You are receiving this because you were mentioned.Message ID: @.***>
I still get the same error as @amcc after upgrading to gatsby-source-wordpress@7.2.1
. The error message is the same:
ERROR #11321 API.NODE.EXECUTION
"gatsby-node.js" threw an error while running the createPages lifecycle:
Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it.
Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.
Using the gatsby-source-wordpress@7.3.0-alpha-wpgql-thirteen.20
version I get this error instead:
Error executing the GraphQL query inside gatsby-plugin-sitemap:
Field "nodeType" is not defined by type "WpContentNodeFilterInput".
GraphQLError: Field "nodeType" is not defined by type "WpContentNodeFilterInput".
@Haldaug the error from the canary was because I needed to remove the nodeType field to support the latest WPGraphQL version. You should be able to use the __typename field instead. That's odd that the canary doesn't have the other errors though while the newly published version does π€ I'll look into that and see if I can figure out what's going on
@Haldaug any way I can use your repo to reproduce the problem?
I've invited you to view my repo, @TylerBarnes.
Thanks @Haldaug !
I still get the same error as @amcc after upgrading to
gatsby-source-wordpress@7.2.1
. The error message is the same:ERROR #11321 API.NODE.EXECUTION "gatsby-node.js" threw an error while running the createPages lifecycle: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.
I'm getting this same error
I am also getting this error now. I think this issue can be reopened as it is caused by the latest update.
I still get the same error as @amcc after upgrading to
gatsby-source-wordpress@7.2.1
. The error message is the same:ERROR #11321 API.NODE.EXECUTION "gatsby-node.js" threw an error while running the createPages lifecycle: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.
I'm getting this same error
Me too.
I am also getting this error now. I think this issue can be reopened as it is caused by the latest update.
I still get the same error as @amcc after upgrading to
gatsby-source-wordpress@7.2.1
. The error message is the same:ERROR #11321 API.NODE.EXECUTION "gatsby-node.js" threw an error while running the createPages lifecycle: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.
I'm getting this same error
I narrowed down the issue, turns out the problem is I split the fix into 2 PR's. The first PR was the actual fix and the second was supposed to just be updating the integration tests. This one line should've been in the first PR but was in the second. I marked that second PR to be backported and have a hotfix release so once that's released it should be fixed. Sorry for the mistake folks! For now the canary version is identical to what's about to be released.
Gatsby 5 version of source-wordpress with the full fix is published as gatsby-source-wordpress@7.2.2
. I verified this fixes the issue on a site I reproduced the problem on, so should actually be good this time.
The v4 compatible version isn't published just yet but should be soon.
It seems the removal of the nodeType
field in the latest version is problematic for some folks. I'll add it back in. The alternative is to use the contentType
field but it seems enough folks are using nodeType
that it can't be removed without needing to change a lot of site queries which is a big problem.
Apologies for the rocky time here everyone. We're getting close to this problem being over, but there's a little more to go.
Thanks Tyler :)
The Gatsby 4 version was just published as gatsby-source-wordpress@6.25.1
. I tested this on a site I could reproduce the issues on and it's working great.
This new version doesn't include a nodeType field fix though, that's coming soon.
I released a canary that adds back the nodeType
field here gatsby-source-wordpress@7.3.0-alpha-wpgql-thirteen.26
. I marked the PR to be backported in a hotfix release for Gatsby 4 and 5 versions, so that should be released tomorrow. I'll drop a message here with the final fixed versions when it's released
Hi Tyler,
Just upgraded to version 7.2.2. Builds are failing on Netlify.
Is this related?
9:11:01 AM: error UNHANDLED REJECTION Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.
9:11:01 AM:
9:11:01 AM:
9:11:01 AM: Error: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnection EdgeType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdg eType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEd geType does not provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does n ot provide it.
9:11:01 AM: Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does no t provide it.
9:11:01 AM:
9:11:01 AM: - graphql-runner.ts:129 GraphQLRunner.validate
9:11:01 AM: [repo]/[gatsby]/src/query/graphql-runner.ts:129:14
9:11:01 AM:
9:11:01 AM: - graphql-runner.ts:218 GraphQLRunner.query
9:11:01 AM: [repo]/[gatsby]/src/query/graphql-runner.ts:218:49
9:11:01 AM:
9:11:01 AM: - create-graphql-runner.ts:57
9:11:01 AM: [repo]/[gatsby]/src/bootstrap/create-graphql-runner.ts:57:8
9:11:01 AM:
9:11:01 AM: - create-pages-from-collection-builder.js:45 createPagesFromCollectionBuilder
9:11:01 AM: [repo]/[gatsby-plugin-page-creator]/create-pages-from-collection-builder.js: 45:13
9:11:01 AM: Creating deploy upload records
9:11:01 AM:
9:11:01 AM: - create-page-wrapper.js:43 createPage
9:11:01 AM: [repo]/[gatsby-plugin-page-creator]/create-page-wrapper.js:43:76
9:11:01 AM:
9:11:02 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
9:11:01 AM: - gatsby-node.js:135
9:11:01 AM: [repo]/[gatsby-plugin-page-creator]/gatsby-node.js:135:41
9:11:01 AM:
9:11:01 AM: - Array.forEach
9:11:01 AM:
9:11:01 AM: - gatsby-node.js:134 Object.createPagesStatefully
9:11:01 AM: [repo]/[gatsby-plugin-page-creator]/gatsby-node.js:134:11
9:11:01 AM:
9:11:01 AM:
9:11:01 AM: not finished createPagesStatefully - 0.188s
9:11:01 AM: β
9:11:01 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:11:01 AM: "build.command" failed
9:11:01 AM: βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Two new versions with the nodeType field fix were published earlier today: gatsby-source-wordpress@7.2.3
and gatsby-source-wordpress@6.25.2
.
@hamiltonbrooke are you able to share your WPGrphQL /graphql endpoint with me so I can reproduce the issue? My email is tyler@gatsbyjs.com if you don't want to share it publicly
Hi Tyler, I was not previously getting this error until after the update. This is the same for all ACF queries:
@aaronjtonner are you able to send me your WPGraphQL api endpoint so I can reproduce the problem? Our integration tests do test using wp-graphql-acf
but perhaps there's some case we're not testing, or our test site doesn't have the same setup as you
Sure, here's the endpoint: https://staging.innerspiritphoto.com/graphql
Thanks @aaronjtonner
@aaronjtonner that might be due to a change in how WPGraphQL 1.13.0+ works. The field is named aCF_BooksPage
, not ACF_BooksPage
(notice the first letter is lowercase).
In WPGraphQL:
{
pages {
nodes {
aCF_BooksPage {
fieldGroupName
}
}
}
}
in Gatsby:
{
allWpPage {
nodes {
aCF_BooksPage {
fieldGroupName
}
}
}
}
Thanks Tyler, that fixed those errors!
Still dealing with a few other errors that might be due to something else.
I believe the last remaining issue is the problem you mentioned @hamiltonbrooke but since I'm not able to reproduce it I'm not able to fix it. Is anyone else seeing those same errors on the latest versions?
v12.3 There is only version 12.2
I'm going to close this since I haven't heard any more reports recently. If anyone is still running into problems please respond here with reproduction steps or open a new issue and I can help you out. Thanks everyone for your patience on this issue and for helping me reproduce bugs!
Preliminary Checks
Description
Trying to setup Gatsby with Wordpress.
"Encountered a critical error when running the buildNodeQueries build step."
"TypeError: Cannot destructure property 'fields' of 'nodesType' as it is undefined. at generateNodeQueriesFromIngestibleFields"
Reproduction Link
na
Steps to Reproduce
Fresh WP install with latest plugin versions of
graphql url is reachable and graphiql ide returns correct post data for a basic query.
Fresh Gatsby install with Wordpress.
Run gatsby develop and get the above error.
Expected Result
success
Actual Result
error
Environment
Config Flags
No response