• Resolved rantakemisti

    (@rantakemisti)


    It looks like the plugin is not able to fetch the critical CSS. It’s just generating about a thousand errors to the browser console with the message”:
    Blocked script execution in ‘<URL>’ because the document’s frame is sandboxed and the ‘allow-scripts’ permission is not set.

    I assume that Jetpack is using XML-RPC file and we have special rules in place to allow access to xmlrpc.php from Jetpack and WordPress but blocks the rest. The hosting provider is automatically fetching those IPs from here: https://jetpack.com/ips-v4.json

    I read from some other support thread that we should allowlist the URL 35.188.32.9. If that’s the case, then you should add it to that list.

    https://jetpack.com/support/hosting-faq/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Kevin

    (@kevinsandlingmailcom)

    Same result here.

    Hello @rantakemisti

    Glad to help!

    The IP 35.188.32.9 is not related to the Jetpack, but a Google Cloud Service.

    If your Jetpack connection is working with the xmlrpc.php restrictions, Jetpack Boost will work too.

    Could you please post your site URL here so that we can have a look?

    If you want it to remain private, you can also contact us via this contact form. If you choose to reach out directly, please include a link to this thread.

    Thanks!

    Let me know if you have any questions.

    My best regards,

    Michelle

    Thread Starter rantakemisti

    (@rantakemisti)

    Sorry, I was unclear on the first message. When I wrote Jetpack, then I obviously meant Jetpack Boost. I’m not using Jetpack or any other Jetpack products on our sites. I just know that on your plugin name is a word “Jetpack,” and I assume the same group made this. I don’t know if Jetpack would work, but I believe that it would since our hosting provider (Seravo) is using that Jetpack’s JSON allowlist I posted earlier.

    Jetpack Boost works otherwise, but the critical CSS fails on 99% of pages. I don’t know what you meant that if the Jetpack connection is working with the xmlrpc.php restrictions, Jetpack Boost will work too. Or is the Jetpack also using that same Google Cloud IP?

    Plugin Support Dan (a11n)

    (@drawmyface)

    Hi there

    Thanks for clarifying. What Michelle meant is that Jetpack Boost uses the same connection method as Jetpack, so if one has a working connection, the other should too.

    Regarding the critical CSS issue, we will need your site URL to investigate further.

    As Michelle said, if you want it to remain private, you can also contact us via this contact form. If you choose to reach out directly, please include a link to this thread.

    Thanks!

    Plugin Contributor Mark (a11n)

    (@thingalon)

    Hi there!

    Thanks for taking the time to try to debug the issue, and sending in your site URL via our support forms.

    The error messages “Blocked script execution” are expected behavior, and don’t indicate that anything has gone wrong. Jetpack Boost uses an invisible iframe with strict security settings while generating Critical CSS, and some browsers report everything the iframe settings block as errors in the console. It’s noise I wish we could eliminate, but browser security rules don’t allow that.

    The Jetpack Boost UI uses WordPress’ JSON API to talk to the server – but by the time you see “Blocked script execution” messages in your console, it has already successfully spoken to the server – so it seems unlikely to be an issue with server communications. I doubt this is an issue with your XMLRPC settings.

    The IP address you’ve seen on other forum threads is out of date now. Early versions of Jetpack Boost used a callback mechanism when generating Speed Scores, which required some users to allow-list our IP address. But due to problems we have changed the way speed scores are returned to sites, eliminating the need to allow that IP address.

    I’ve taken a look at your site, and I can’t see anything there which should break our Critical CSS Generator.

    Can I ask you some more questions about the way it fails?

    Does the Jetpack Boost dashboard show an error at the end of the generation process? It should appear in red text below the Critical CSS toggle. If so, can you please let me know what it says there?

    If it doesn’t show anything useful there, it may be worth scrolling to the bottom of your browser’s console to see if there is an error generated at the end of the process which doesn’t say “Blocked script execution” – in case that sheds some light on what has gone wrong.

    Finally, can I please ask which browser you are using while generating Critical CSS for your site? I do test our plugin in a variety of browsers, but you never know – it may turn out to be something we hadn’t thought of before.

    Thanks for bearing with us, I hope we can get this sorted out.

    — Mark George
    Jetpack Boost developer

    Thread Starter rantakemisti

    (@rantakemisti)

    Hi! Thanks for your extensive reply. Previously I tried to run it with my Macbook Pro’s Vivaldi browser and it only generated WP admin toolbar CSS as a critical CSS. Now I tried with Safari and I got the same console errors but it seems like it managed to create working critical CSS for web pages. So, I guess the problem was in my browser choice?

    Jetpack itself wasn’t showing any errors when I ran it with both browsers. After the process, it showed the following text: “10 files generated 3 minutes ago.
    1 file could not be automatically generated. Visit the advanced recommendations page to optimize this file.”

    Plugin Contributor Mark (a11n)

    (@thingalon)

    Thanks for your reply!

    I’m surprised to hear about Critical CSS Generation problems in Vivaldi; it’s a Chromium-based browser, and should behave similarly to Chrome. At least in theory. ??

    I’ve tested Critical CSS Generation with Vivaldi on my own test sites, and haven’t found any issues there yet. I’ve also loaded your homepage in Vivaldi, and manually run a Critical CSS Generation process in the browser console – which successfully completed.

    While I’m glad to hear that it works in Safari, I’m unsure why it didn’t work for you in Vivaldi.

    For now, I recommend using Safari to generate Critical CSS. I’ll keep testing future versions with Vivaldi, and will see if I can identify circumstances which might cause it to fail in that browser.

    Anonymous User 18700194

    (@anonymized-18700194)

    Hi there,

    It has been more than one week since we have heard from you, so I’m marking this topic as resolved.

    But if you have any further questions or need some more help, you’re welcome to reply here or open another thread.

    Kevin

    (@kevinsandlingmailcom)

    Well, it’s weird, but next time I tried this, didn’t do anything different, and it just worked. Go figure. Thank you for the help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can’t generate critical CSS’ is closed to new replies.