Some users continue to experience errors in some places when using Site Kit, particularly around the splash/setup screen which prevents them from using the plugin.
E.g.
Loading chunk 0 failed. (error: https://theguyinthekitchen.com/wp-content/plugins/google-site-kit/dist/assets/js/chunk-googlesitekit-adminbar~chunk-googlesitekit-setup-wizard~chunk-googlesitekit-setup-wizard-proxy-7b6a86fd3073896743e0.js)
in Unknown
in Suspense
in DashboardSplashApp
in ErrorHandler
in GoogleSitekitDashboardSplash
The error indicates a chunk loading failure, which is an on-demand loading of a React component or JavaScript partial.
These were added as part of the original design of the plugin but no longer offer much benefit, and result in a poor experience in the event of a loading failure which could happen for a number of reasons.
As such, they should be removed and we can re-evaluate their use and implementation in the future if needed.
Historical context
Following on from #1323 investigate JS error below. This occurs after clicking on the "Proceed" button during site verification.
Since reporting the user who initially reported this error has been able to proceed with setup successfully.
Initial report (via WordPress support forum):
https://wordpress.org/support/topic/connection-loop/
Additional information:
_Do not alter or remove anything below. The following sections will be managed by moderators only._
lazy imports with normal static imports and remove use of React.Suspenseassets/js/components/dashboard-splash/dashboard-splash-app.jsassets/js/googlesitekit-module.jsassets/js/googlesitekit-adminbar-loader.js, entry in webpack, etcgooglesitekit-adminbar in its placeassets/js/googlesitekit-adminbar.js to delay rendering the Admin Bar app until the menu item is hovereddomReady, add an event listener onto the admin bar menu item's mouseover event to call the init function (should only run once)focus or other event for accessibility_trackEvent( 'admin_bar', 'page_stats_view' ) to GoogleSitekitAdminbar for consistency with loader behavioruseEffect with no dependencies to only run once when first renderedThis issue removed the chunks that were failing to load for some users entirely so there is no longer a possibility of this error being raised again. The main thing to check are the areas that previously used these chunks which are only a few places:
Other users experienced similar errors before this, and some resolved it in different ways:
https://wordpress.org/support/topic/error-plugin-help/
https://wordpress.org/support/topic/loading-chunk-0-failed/ (disabled security plugin firewall)
https://wordpress.org/support/topic/site-kit-encountered-an-error-2/ (used workaround to reset proxy)
Another support topic: https://wordpress.org/support/topic/site-kit-encountered-an-error-loading-chunk-1-failed/
I just had the same issue. Disabling my GridPane 6g WAF to process set-up resolved it.
Another scenario where this issue can be recreated is using a site with Cloudflare's SSL and not updating the WordPress Settings (in some configurations like with Cloudflare's Flexible SSL this may occur when proper redirections are not in place). Site Kit's requests are served as mixed content and blocked in the browser:


Going to move this one to Execution looking at the reproducible steps.
me too have same problem and fixed it after installing cloudflare official plugin :) thanks for the support :)
Yes, I had this problem. Then I have Cloudfare with HTTPS forced. But at configure the plugin Site Kit shown me the message "encountered an error: Loading chunk 3 failed." Additionally I had to activate the Really Simple SSL plugin in Wordpress, then the Google Site Kit it's functioning ok now.
@jamesozzie @ernee @LuckynaSan Has this (or similar "random" JS issues) still been surfacing over the past few weeks? This should have been fixed in 1.15.0, since we only use hashed JavaScript filenames since that, which change every release, basically preventing any over-aggressive caching.
@felixarntz They have in fact, we've had 3 or 4 topics open in relation to this. It's been a "Loading chunk 1 failed" (as opposed to 0)
Some users have confirmed clearing their cache resolves the issue. See below:
https://wordpress.org/support/topic/error-in-admin-phppagegooglesitekit-splash/ (Resolved - clearing cache)
https://wordpress.org/support/topic/issue-for-adsense/ (Awaiting response) - Loading chunk 5
https://wordpress.org/support/topic/loading-chunk-1-failed/ (Awaiting response)
https://wordpress.org/support/topic/help-please-226/ (Awaiting response)
Also there was a separate JS error reported today:
https://wordpress.org/support/topic/google-site-kit-2/
Additional topics opened with similar errors this week, awaiting response from users. Unknown whether the issue occurred after a plugin updated from a specific version.
https://wordpress.org/support/topic/loading-chunk-1-failed-2/ (Awaiting response) Loading chunk 1 failed
https://wordpress.org/support/topic/error-after-install-plugin-3/ (Possibly hosting/firewall related) Loading chunk 4 failed
@tofumatt @eugene-manuilov Any ideas why users could still experience this? I guess caching is ruled out because we now use file hashes.
@felixarntz It looks like those topics report the same problem that happens at the splash screen in certain circumstances. It's definitely not relevant to the work that we did to add hashes to javascript files because these issues happen only with chunk files that's functionality hasn't been changed.
I have tried to replicate it on my end, but haven't been able to do it. We need more information about the environment (plugins/theme/hosting/etc) in which this issue can be reproduced.
@felixarntz @eugene-manuilov I'm able to reproduce this issue on one site using a hosting provider that blocks outgoing http connections (Loading chunk 4 failed). More details in the related support topic.

I have a similar error from a host that does NOT block outbound HTTP:
Test of HTTP from the host:
# curl -v ifconfig.me
* About to connect() to ifconfig.me port 80 (#0)
* Trying 216.239.34.21... connected
* Connected to ifconfig.me (216.239.34.21) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ifconfig.me
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 28 Sep 2020 13:58:26 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 14
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Via: 1.1 google
<
* Connection #0 to host ifconfig.me left intact
* Closing connection #0
199.188.200.14
Specific error:
Loading chunk 1 failed.
(error: https://www.rpiathome.com/wp-content/plugins/google-site-kit/dist/assets/js/chunk-googlesitekit-adminbar~chunk-googlesitekit-setup-wizard-proxy-f262ebd34a6cc64e6bbf.js)
in Unknown
in Suspense
in DashboardSplashApp
in GoogleSitekitDashboardSplash
in RestoreSnapshots
in ErrorHandler
in Root
It would lead one to believe that HTTP vs HTTPS is not a factor.
Looking at the second screenshot in https://github.com/google/site-kit-wp/issues/1391#issuecomment-628008695, it looks like the chunk file is loaded with the insecure HTTP protocol although the site is using HTTPS (and the JS file enqueued by WordPress also uses HTTPS as expected). Could there be some problem in the way Webpack loads these chunks possibly? cc @eugene-manuilov
I would think any chunks would be loaded using the same scheme as the script that calls it.
Also, a host which blocks outbound requests wouldn't matter here as this request is from the browser to the host. The only thing that might block it would be something like a CSP (although it's loading from the same host as the main script so I wouldn't think that could be a problem) or perhaps some kind of rule on the server which happens to block the URL based on some pattern.
One thing we should do is revisit whether or not we need these dynamically loaded component chunks at all. Perhaps we should just replace the dynamic imports with static ones?
Otherwise, any kind of normal request failure (e.g. network interruption) should be recoverable using a plugin like this to retry a chunk if it fails to load? https://github.com/mattlewis92/webpack-retry-chunk-load-plugin
@tofumatt – moving this to AC for definition after discussing further with @felixarntz .
IB âś…
Ah, so just to be clear, the Webpack chunk loader will handle loading the Admin Bar chunks on-demand and this won’t mess with the JS assets loaded for non-Site Kit pages where the admin bar is present?
I suppose loading that asset for admins/logged-in-users-only would be fine anyway, but just curious.
At any rate, either way IB âś…
@tofumatt The only reason this "lazy-loading" was implemented originally was to not load the entire admin bar JS code immediately. However, we're using dependencies and those already are loaded on pageload, so the impact of loading the actual googlesitekit-adminbar.js file immediately is minimal.
It may be worth revisiting optimization of what's immediately enqueued in the frontend when the Site Kit admin bar menu is relevant, but that can happen in a separate issue and is lower priority, especially because of the above (we're not really causing a performance regression here by doing this).
Another user encountered a similar error, while including some console errors. The same occurs when checking from another administrator account in an incognito window.
GET …/wp-content/plugins/google-site-kit/dist/assets/js/chunk-googlesitekit-adminbar~chunk-googlesitekit-setup-wizard-proxy-39bf2f5072bd0d1cdc96.js
[HTTP/2 403 Forbidden 151ms]
The resource from “…/wp-content/plugins/google-site-kit/dist/assets/js/chunk-googlesitekit-adminbar~chunk-googlesitekit-setup-wizard-proxy-39bf2f5072bd0d1cdc96.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
admin.php
ChunkLoadError: Loading chunk 1 failed.
(error: …/wp-content/plugins/google-site-kit/…unk-googlesitekit-setup-wizard-proxy-39bf2f5072bd0d1cdc96.js)
Caught an error: ChunkLoadError: Loading chunk 1 failed.
(error: …/wp-content/plugins/google-site-kit/…unk-googlesitekit-setup-wizard-proxy-39bf2f5072bd0d1cdc96.js)
@aaemnnosttv Assigning to you for QA Brief.
Confirmed:
WP: 5.5.3
PHP: 7.3.21
SiteKit: 1.19.0 (on develop branch)