You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
connecting it to a LocalWP Atlas spin up (Local v9.0.2+6676; Atlas Add-on v1.7.2), and then deleting /node_modules and package-lock.json files and upgrading Next to v14, Faust to v3, and React and react-dom to v18, Faustjs no longer functions as intended. On startup npm run dev, the app crashes with this error:
error - Validation Failed: Your Faust front-end site URL value is misconfigured. It should NOT match the NEXT_PUBLIC_WORDPRESS_URL.
Error message
The front end Node environment runs on localhost:3000 and LocalWP environment runs on localhost:10010. There is no code, regex or otherwise, within Faustjs validateNextWordPressUrl.js that actually compares the front end Node URL and the WP URL, so the error message implying that the two URLs match is somewhat misleading. There is some other cause to the Bad Request that I have unfortunately been unable to identify as of yet.
Environment:
The Local /app directory points to an exterior folder with the Faustjs Getting Started sample project instead of Local's own /app-node folder. In this example, Faustjs starts up with v1 and Next on v12.
The .env.local file in the root of the Getting Started contains
and the WP Admin Faust Settings page contains Front-end site URL: http://localhost:3000.
Steps to reproduce
Debugging hints
After some testing in Faustjs node_modules, validateFaustEnvVars.js returns status 200 and then passes to validateNextWordPressUrl.js which is returning 400, bad request with no other details.
When updating from older versions to the newer version, this error appears consistently.
After reverting Faustjs to v1.2.0 where the validation does not exist yet (but still keeping Next v14 and React v18 upgrades), the app runs without issue.
Additional context
No response
@faustwp/core Version
3.0.1
@faustwp/cli Version
3.0.1
FaustWP Plugin Version
1.2.3
WordPress Version
6.5.3
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
Yes
The text was updated successfully, but these errors were encountered:
miacias
changed the title
Inaccurate error message & "Getting Started" to 3.0 Upgrade Bug
Misleading error message & "Getting Started" to 3.0 Upgrade Bug
May 10, 2024
It checks the domains of both the frontend url and WordPress url do not match. I think when both point to localhost it fails. Maybe there should be an exception for localhost or check the ports as well?
A solution for this is to change your Wordpress url to point to a different local domain by changing the /etc/hosts file for localhost to point to a custom domain.
Local does this automatically for us for example:
## Local - Start ##
::1 mysite.local #Local Site
127.0.0.1 mysite.local #Local Site
::1 www.mysite.local #Local Site
127.0.0.1 www.mysite.local #Local Site
theodesp
changed the title
Misleading error message & "Getting Started" to 3.0 Upgrade Bug
[faustwp] WordPress URL validation fail when both front-end URL and WP URL are on localhost
May 13, 2024
I agree that a quick workaround this bug would be to swap out the WP URL, but I fully agree that there should be a localhost exception made, especially because it is no longer backwards compatible. Thanks for pointing me to the right code snippet!
Description
Version Upgrade Bug Scenario
After starting a project using the Faustjs.org Getting Started npx command,
connecting it to a LocalWP Atlas spin up (Local v9.0.2+6676; Atlas Add-on v1.7.2), and then deleting
/node_modules
andpackage-lock.json
files and upgrading Next to v14, Faust to v3, and React and react-dom to v18, Faustjs no longer functions as intended. On startupnpm run dev
, the app crashes with this error:Error message
The front end Node environment runs on localhost:3000 and LocalWP environment runs on localhost:10010. There is no code, regex or otherwise, within Faustjs
validateNextWordPressUrl.js
that actually compares the front end Node URL and the WP URL, so the error message implying that the two URLs match is somewhat misleading. There is some other cause to the Bad Request that I have unfortunately been unable to identify as of yet.Environment:
The Local
/app
directory points to an exterior folder with the Faustjs Getting Started sample project instead of Local's own/app-node
folder. In this example, Faustjs starts up with v1 and Next on v12.The
.env.local
file in the root of the Getting Started containsand the WP Admin Faust Settings page contains
Front-end site URL: http://localhost:3000
.Steps to reproduce
Debugging hints
After some testing in Faustjs node_modules,
validateFaustEnvVars.js
returns status 200 and then passes tovalidateNextWordPressUrl.js
which is returning 400, bad request with no other details.When updating from older versions to the newer version, this error appears consistently.
Original:
updated (breaking):
After reverting Faustjs to v1.2.0 where the validation does not exist yet (but still keeping Next v14 and React v18 upgrades), the app runs without issue.
Additional context
No response
@faustwp/core Version
3.0.1
@faustwp/cli Version
3.0.1
FaustWP Plugin Version
1.2.3
WordPress Version
6.5.3
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
The text was updated successfully, but these errors were encountered: