Title: Lighthouse Errors
Last modified: July 21, 2021

---

# Lighthouse Errors

 *  Resolved [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/)
 * Ok, so I added your plugin, and added /wp.serviceworker to wprocket to exclude
   the url from the cache.
 * However, I test my site in lighthouse, and its still erroring:
 * [https://www.logoglo.com/wp-content/uploads/2021/07/1.png](https://www.logoglo.com/wp-content/uploads/2021/07/1.png)
 * I read I need to have the favicon as a png, and I checked the manifest, and it
   is, so unsure why its still erroring, but the main ones are the other.
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flighthouse-errors-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14687335)
 * Hummm. I’m seeing the same thing. Nevertheless, the service worker is installed
   and I can see the offline template is being served.
 * Nevertheless, I’m not seeing the error message being shown on the error template.
   Currently the PWA plugin injects the error message by replacing an HTML comment
   with the message, but when accessing the error template directly I’m not seeing
   any comment: [https://www.logoglo.com/?wp_error_template=offline](https://www.logoglo.com/?wp_error_template=offline)
 * It seems you have an optimization plugin which is stripping out all HTML comments?
 * Nevertheless, this wouldn’t explain why Lighthouse is failing the audit.
 * When looking at the source code of the page, I’m seeing something peculiar:
 *     ```
       <script type="rocketlazyloadscript">
       		if ( navigator.serviceWorker ) {
       			window.addEventListener( 'load', function() {
       									{
       						navigator.serviceWorker.register(
       							"https:\/\/www.logoglo.com\/wp.serviceworker",
       							{"scope":"\/"}						).then( reg => {
       													} );
       					}
       							} );
       		}
       	</script>
       ```
   
 * Notice the `rocketlazyloadscript` type. I’m guessing this JS lazy-loading feature
   of WP Rocket is conflicting with Lighthouse’s audit.
 *  Thread Starter [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14687396)
 * Ahhh ok, so this is a feature of wprocket, I can add to exclude for things to
   work, at the moment i have this:
 *     ```
       /jquery.min.js
       /plugins/revslider/public/assets/js/
       setREVStartSize
       rev_slider_
       jquery
       /wp-includes/js/jquery/ui/core.min.js
       /wp-includes/js/jquery/ui/tabs.min.js
       /plugins/cornerstone/assets/dist/js/site/cs.2155f74.js
       /themes/x/framework/dist/js/site/x.js
       /plugins/wp-rocket/assets/js/lazyload/16.1/lazyload.min
       /wp-content/cache/min/1/ajax/libs/jquery/3.6.0/jquery.min.js
       /wp-includes/js/jquery/jquery.min.js
       lazyload
       window.RS_MODULES
       ```
   
 * What could I add to exclude PWA? would it be “navigator.serviceWorker”?
 * Or could it be asset clean up pro? “Strip HTML comments? This feature will strip
   all comments except the Internet Explorer conditional ones. If you wish to keep
   specific comments, use the textarea below to add exception patterns (one per 
   line).
    Do not remove comments containing the following (case insensitive) text:”
 * Thanks so much for your help thus far.
    -  This reply was modified 4 years, 10 months ago by [logoglo](https://wordpress.org/support/users/logoglo/).
 *  Thread Starter [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14687443)
 * **Update. I disabled the strip html, cleared caches, and its still erroring, 
   so Im guessing its the wprocket.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14687445)
 * > What could I add to exclude PWA? would it be “navigator.serviceWorker”?
 * I recommend excluding scripts that include `wp.serviceworker`.
 *  Thread Starter [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14690268)
 * Ok, but how would I know what those scripts would be? maybe you have a better
   idea?
 * Thanks.
 *  Thread Starter [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14690401)
 * Would this work? /plugins/pwa/wp-includes/js (.*) If I add it?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14690503)
 * The script in question is an inline script, not an external one. So you’d need
   to exclude the inline script that contains `wp.serviceworker` from being lazy-
   loaded. I don’t know how WP Rocket provides configuration for that.
 *  Thread Starter [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14690520)
 * No worries, I just included all scripts tat your plugin uses, and it worked 🙂
   im getting green..the only issue in red is now “Manifest doesn’t have a maskable
   icon
    A maskable icon ensures that the image fills the entire shape without being
   letterboxed when installing the app on a device. Learn more.”
 * My favicon is a png, so not sure whats going on there, any thoughts?
 * Again, thanks for your help with getting to the bottom of this.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14690899)
 * For the maskable icon, please see this issue: [https://github.com/GoogleChromeLabs/pwa-wp/issues/304](https://github.com/GoogleChromeLabs/pwa-wp/issues/304)
 * There is some PHP code you can use to indicate that the icon is maskable. Currently
   there is no UI to enable that, but that’s what the issue is for.
 *  Thread Starter [logoglo](https://wordpress.org/support/users/logoglo/)
 * (@logoglo)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14691290)
 * Perfect! that worked, thank you so much for all your time.
    -  This reply was modified 4 years, 10 months ago by [logoglo](https://wordpress.org/support/users/logoglo/).

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Lighthouse Errors’ is closed to new replies.

 * ![](https://ps.w.org/pwa/assets/icon.svg?rev=1908485)
 * [PWA](https://wordpress.org/plugins/pwa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pwa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pwa/)
 * [Active Topics](https://wordpress.org/support/plugin/pwa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pwa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pwa/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [logoglo](https://wordpress.org/support/users/logoglo/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/lighthouse-errors-4/#post-14691290)
 * Status: resolved