Skip to content
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

Installation and activation of Jetpack plugin from a blueprint return critical errors #1516

Open
juanmaguitar opened this issue Jun 15, 2024 · 5 comments · May be fixed by #1805
Open

Installation and activation of Jetpack plugin from a blueprint return critical errors #1516

juanmaguitar opened this issue Jun 15, 2024 · 5 comments · May be fixed by #1805
Labels
[Aspect] Networking [Type] Bug An existing feature does not function as intended

Comments

@juanmaguitar
Copy link
Collaborator

The following blueprint returns several errors

{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/wp-admin/",
  "preferredVersions": {
    "php": "8.3",
    "wp": "latest"
  },
  "features": {
    "networking": true
  },
  "plugins": [
    "jetpack"
  ],
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    }
  ]
}

See blueprint.json live in Playground Builder

Screenshot 2024-06-15 at 15 52 30
See errors returned with the blueprint above
Access to fetch at 'https://jetpack.wordpress.com/jetpack.test/1/' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
wordpress-dfeba26b.js:615 
        
        
       GET https://jetpack.wordpress.com/jetpack.test/1/ net::ERR_FAILED 200 (OK)
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
sw.js:4 Event handler of 'message' event must be added on the initial evaluation of worker script.
(anonymous) @ sw.js:4
A @ sw.js:4
N @ sw.js:4
await in N (async)
n @ sw.js:4
await in n (async)
handleRequest @ sw.js:4
(anonymous) @ sw.js:4
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
remote.html:1 Access to fetch at 'https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack' from origin 'https://playground.wordpress.net' has been blocked by CORS policy: Request header field x-forwarded-for is not allowed by Access-Control-Allow-Headers in preflight response.
wordpress-dfeba26b.js:615 
        
        
       GET https://public-api.wordpress.com/rest/v1.1/products?locale=en_US&type=jetpack net::ERR_FAILED
hd @ wordpress-dfeba26b.js:615
(anonymous) @ wordpress-dfeba26b.js:615
n @ wordpress-dfeba26b.js:8
worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:1 PHP.run() output was: <!DOCTYPE html>
<html class="wp-toolbar"
	lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>My Jetpack &lsaquo; My WordPress Website &#8212; WordPress</title>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var ajaxurl = '/scope:0.1543661625367296/wp-admin/admin-ajax.php',
	pagenow = 'jetpack_page_my-jetpack',
	typenow = '',
	adminpage = 'jetpack_page_my-jetpack',
	thousandsSeparator = ',',
	decimalPoint = '.',
	isRtl = 0;
</script>
<!DOCTYPE html>
<html lang="en-US">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width">
		<meta name='robots' content='max-image-preview:large, noindex, follow' />
	<title>WordPress &rsaquo; Error</title>
	<style type="text/css">
		html {
			background: #f1f1f1;
		}
		body {
			background: #fff;
			border: 1px solid #ccd0d4;
			color: #444;
			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
			margin: 2em auto;
			padding: 1em 2em;
			max-width: 700px;
			-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
			box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
		}
		h1 {
			border-bottom: 1px solid #dadada;
			clear: both;
			color: #666;
			font-size: 24px;
			margin: 30px 0 0 0;
			padding: 0;
			padding-bottom: 7px;
		}
		#error-page {
			margin-top: 50px;
		}
		#error-page p,
		#error-page .wp-die-message {
			font-size: 14px;
			line-height: 1.5;
			margin: 25px 0 20px;
		}
		#error-page code {
			font-family: Consolas, Monaco, monospace;
		}
		ul li {
			margin-bottom: 10px;
			font-size: 14px ;
		}
		a {
			color: #2271b1;
		}
		a:hover,
		a:active {
			color: #135e96;
		}
		a:focus {
			color: #043959;
			box-shadow: 0 0 0 2px #2271b1;
			outline: 2px solid transparent;
		}
		.button {
			background: #f3f5f6;
			border: 1px solid #016087;
			color: #016087;
			display: inline-block;
			text-decoration: none;
			font-size: 13px;
			line-height: 2;
			height: 28px;
			margin: 0;
			padding: 0 10px 1px;
			cursor: pointer;
			-webkit-border-radius: 3px;
			-webkit-appearance: none;
			border-radius: 3px;
			white-space: nowrap;
			-webkit-box-sizing: border-box;
			-moz-box-sizing:    border-box;
			box-sizing:         border-box;

			vertical-align: top;
		}

		.button.button-large {
			line-height: 2.30769231;
			min-height: 32px;
			padding: 0 12px;
		}

		.button:hover,
		.button:focus {
			background: #f1f1f1;
		}

		.button:focus {
			background: #f3f5f6;
			border-color: #007cba;
			-webkit-box-shadow: 0 0 0 1px #007cba;
			box-shadow: 0 0 0 1px #007cba;
			color: #016087;
			outline: 2px solid transparent;
			outline-offset: 0;
		}

		.button:active {
			background: #f3f5f6;
			border-color: #7e8993;
			-webkit-box-shadow: none;
			box-shadow: none;
		}

			</style>
</head>
<body id="error-page">
	<div class="wp-die-message"><p>There has been a critical error on this website. Please check your site admin email inbox for instructions.</p><p><a href="https://wordpress.org/documentation/article/faq-troubleshooting/">Learn more about troubleshooting WordPress.</a></p></div></body>
</html>
	
logToConsole @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:1
logMessage @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4
warn @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4
run @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:53
await in run (async)
#u @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61
#c @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61
await in #c (async)
request @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61
request @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4
(anonymous) @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:65
n @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:65
worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:1 Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:53:1748)
    at async #u (worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61:5750)
    at async #c (worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61:5321)
    at async PlaygroundWorkerEndpoint.request (worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4:8696)
logToConsole @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:1
logMessage @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4
error @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4
run @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:53
await in run (async)
#u @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61
#c @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61
await in #c (async)
request @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61
request @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4
(anonymous) @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:65
n @ worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:65
index.js:222 PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:53:1748)
    at async #u (https://playground.wordpress.net/worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61:5750)
    at async #c (https://playground.wordpress.net/worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:61:5321)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-a4a5f8de.js?wpVersion=6.5&phpVersion=8.3&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=&site-slug=wordpress:4:8696)
$o @ index.js:222
logMessage @ index.js:266
(anonymous) @ index.js:389
n @ index.js:8958
wordpress-dfeba26b.js:621 
        
        
       GET https://playground.wordpress.net/scope:0.1543661625367296/wp-admin/admin.php?page=my-jetpack 500 (Internal Server Error)
goTo @ wordpress-dfeba26b.js:621
await in goTo (async)
(anonymous) @ wordpress-dfeba26b.js:8
n @ wordpress-dfeba26b.js:8
@bgrgicak
Copy link
Collaborator

Blueprint url

Error

[18-Jun-2024 08:58:54 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "Automattic\Jetpack\Status\DNS_NS" in /wordpress/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php:149
Stack trace:
#0 /wordpress/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php(219): Automattic\Jetpack\Status\Host->get_nameserver_dns_records('playground.word...')
#1 /wordpress/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php(273): Automattic\Jetpack\Status\Host->get_hosting_provider_by_nameserver('playground.word...')
#2 /wordpress/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php(393): Automattic\Jetpack\Status\Host->get_known_host_guess()
#3 /wordpress/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php(244): Automattic\Jetpack\My_Jetpack\Initializer::is_user_from_known_host()
#4 /wordpress/wp-includes/class-wp-hook.php(3): Automattic\Jetpack\My_Jetpack\Initializer::enqueue_scripts('jetpack_page_my...')
#5 /wordpress/wp-includes/class-wp-hook.php(3): WP_Hook->apply_filters(NULL, Array)
#6 /wordpress/wp-includes/plugin.php(2): WP_Hook->do_action(Array)
#7 /wordpress/wp-admin/admin-header.php(17): do_action('admin_enqueue_s...', 'jetpack_page_my...')
#8 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-a...')
#9 {main}
  thrown in /wordpress/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php on line 149

@dd32
Copy link
Member

dd32 commented Sep 25, 2024

Just ran into this, it would be great if we could polyfill the unavailable networking functionalities with the return error response and load the requisite constants.. which it appears we do: #1067 so I guess it's just the constants that are missing?

@bgrgicak bgrgicak moved this from Inbox to Up next in Playground Board Sep 25, 2024
@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Aspect] Networking labels Sep 25, 2024
@bgrgicak
Copy link
Collaborator

DNS_NS isn't on this list I assume that adding it should resolve the bug.

@dd32
Copy link
Member

dd32 commented Sep 25, 2024

DNS_NS isn't on this list I assume that adding it should resolve the bug.

Took a look at the constants.. It looks like DNS_NS isn't a guaranteed PHP constant, although doesn't appear documented as such anywhere..

None of the DNS_* constants are defined in PHP either:

$ var_dump( preg_grep( '/^DNS/i', get_defined_constants() ) );
array(0) {}

https://github.com/php/php-src/blob/2a3dae18edc51c3384459401db02c84d7439ebd2/ext/standard/basic_functions_arginfo.h#L3589-L3591

#if (defined(PHP_WIN32) || (defined(HAVE_DNS_SEARCH_FUNC) && defined(HAVE_FULL_DNS_FUNCS)))
REGISTER_LONG_CONSTANT("DNS_NS", PHP_DNS_NS, CONST_PERSISTENT);
#endif

Ultimately I think that means HAVE_FULL_DNS_FUNCS isn't truthful, which makes sense.

I expect something like this is needed, ie. to actually register them with PHP
trunk...dd32:wordpress-playground:dns-polyfill-constants
(untested)

@bgrgicak
Copy link
Collaborator

Good catch! Would you like to open a PR for it and we can work together on testing it?

@dd32 dd32 linked a pull request Sep 25, 2024 that will close this issue
@adamziel adamziel linked a pull request Oct 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Networking [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants