-
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
Gatsby 4: wordpress source looses auth credientials during "validating engines" phase #34387
Comments
Hey @wardpeet, sorry for pinging your directly but as you wrote the most critical line in this issue you might be able to help me out here. |
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. Thanks for being a part of the Gatsby community! 💪💜 |
not stale. still an issue… |
I'll let the team know 👍 |
@joernroeder I'm not able to reproduce this. Can you share a minimal reproduction as well as the output of |
you can use the info of this test site to make the repro url: https://gatsbypreview.wpengine.com/graphql It's just a test site and the user/pass is only for the server basic auth so it's fine to share it here. |
@TylerBarnes Thanks for lloking into this and providing the wp instance. I'll look into it this upcoming week and will come back to you. |
Hey @TylerBarnes, you're right this issue seem to have disappeared with the latest version — gatsby Strangely, the moment I swap out the wp creds and url with my url I run into issues, unrelated to the htaccess problem. It seems those occur while fetching media items and the subsequent run of the I'll leave this issue open this week until I was able to do some more testing. Here is the projects gatsby-4 branch in the cloud If that's helpful https://www.gatsbyjs.com/dashboard/d51a9a01-a8f2-4842-92b6-da5b9f8ac9da/sites/3bc1e35a-011b-4bdf-b904-c4da011f221c/builds/67f518b8-8c09-40f7-b5f5-9d16e10622cb/details#all |
Do you think it makes sense to add a couple of images to your wp instance so we can test the same behavior there as well? |
Hey @TylerBarnes, I'm still experimenting with gatsby 4 and try to get the site ported over. I'm on |
@TylerBarnes can you add some images to the wp test instance mentioned above and I'll spin up a dedicated instance with it on the cloud to see if that also breaks. currently your wp instance does not contain any media items. |
Closing as a duplicate of #35151. I did add a featured image on a post in the test site though! |
Preliminary Checks
Description
I'm in the process of moving a multi source page from gatsby 3 to v4 and I am currently running into issues with the wordpress source. The following is my current process of digging through it. I've found the root of the (first) issue eventually and will try to lay out my findings in a linear way, even tho I did not find them in this order while I was digging through the source:
The WP Setup
I have a WP instance secured behind basic auth. I'm using authentication as described here without any issue for a while.
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/plugin-options.md#authhtaccess
The Build Error
since switching to v4 (currently gatsby 4.4, wp-source v6.4.0) my builds are failing with
I always thought this is due some incompatibility with the source plugin or a rate limiting on the wp hosting side due to more processes being involved now and did not pay any attention, hoped it would resolve itself with the next gatsby/wp-source version — but it did not.
I finally looked more closely at this over the holidays, logged out the
htaccessCredentials
.gatsby/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts
Line 389 in 4a765b5
During the sourcing phase of gatsby this looked fine,
but it failed at the very end during rendering engine validation 🤔
So why are they not there anymore? Plugin options are passed in, and are coming from
gatsby/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts
Line 694 in 4a765b5
So let's take a look of the store:
store is there, also custom limits, concurrency, url etc but the auth data are missing. 🤔
After realizing that the store already lost the auth information I continued my digging and found:
gatsby/packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts
Line 171 in 492068b
commenting out that line let me proceed that step
But my build fails at another phase:
I'll continue to dig into this, but as it's time consuming i am not sure when and for how long. I'd love to take advantage of the features v4 brings, so there is some need on my side to get this resolved.
I don't have a full understanding of the gatsby architecture but why this this being removed at all? or when will this be shared with the browser?
Reproduction Link
todo
Steps to Reproduce
...
Expected Result
build to succeed
Actual Result
build fails
Environment
System: Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.0 Yarn: 1.18.0 npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Config Flags
No response
The text was updated successfully, but these errors were encountered: