Title: serviceworker problem
Last modified: April 7, 2024

---

# serviceworker problem

 *  Resolved [aga2442](https://wordpress.org/support/users/aga2442/)
 * (@aga2442)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/)
 * Hello,
 * i use the translatepress plugin on my website. with this plugin, my website has
   several different languages.
 * the pages in the default language of my website (in the developer tools section)
   do not have any error warnings.
 * However, when I switch to any language other than the default language, the error
   warning you see in the picture appears.
 * what could be the cause of this? do you have any suggestions for a solution?
 * > [View post on imgur.com](https://imgur.com/a/Dp70iQ9)
    -  This topic was modified 2 years, 5 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fserviceworker-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/#post-17558008)
 * humm. Hard to know without seeing your site. It seems there is a syntax error
   in the service worker that is causing it to fail to install. What is the URL 
   of your service worker?
 *  Thread Starter [aga2442](https://wordpress.org/support/users/aga2442/)
 * (@aga2442)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/#post-17558021)
 * Hello [@westonruter](https://wordpress.org/support/users/westonruter/)
 * Thank you for your support.
 * I would also like to mention one more problem.
 * again similarly related to the multi language feature.
 * the default language of my website is English. but strangely the PWA feature (
   browser alert) is not activated when in english language.
 * However, when a different language is selected, the PWA warning and loading quickly
   occurs on both mobile devices and the computer browser 🙂
 * please review this when you review the previous issue.
 * _[ Short link removed ]_
 * (I wanted to add it as an abbreviation so as not to share my URL explicitly.)
    -  This reply was modified 2 years, 5 months ago by [aga2442](https://wordpress.org/support/users/aga2442/).
    -  This reply was modified 2 years, 5 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/#post-17558051)
 * [@aga2442](https://wordpress.org/support/users/aga2442/) Do not use short links
   in these forums, that has been abused in the past and is expanded when found.
   I have expanded yours into the link field.
 * The link field cannot be seen any search engines. Normally the link is expanded
   when found but I expanded it into the hidden from search engines link field.
 *  Thread Starter [aga2442](https://wordpress.org/support/users/aga2442/)
 * (@aga2442)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/#post-17558824)
 * Hello [@westonruter](https://wordpress.org/support/users/westonruter/)
 * Thank you for your support.
 * I would also like to mention one more problem.
 * again similarly related to the multi language feature.
 * the default language of my website is English. but strangely the PWA feature (
   browser alert) is not activated when in english language.
 * However, when a different language is selected, the PWA warning and loading quickly
   occurs on both mobile devices and the computer browser 🙂
 * please review this when you review the previous issue.
 * _[ redundant link removed ]_
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/#post-17561004)
 * I’m looking at the service worker code and it seems that the translation plugin
   is corrupting the JavaScript. For example, in the JS file:
 *     ```wp-block-code
       	const offlinePostRequestHandler = ({ event }) => {
       		return fetch(event.request)
       			.then((response) => {
       				if (response.status < 500) {
       					return response;
       				}
   
       				// @todo This is duplicated with code in service-worker-navigation-routing.js.
       				return response.text().then(function (errorText) {
       ```
   
 * This is getting turned into the following in the French version:
 *     ```wp-block-code
       const offlinePostRequestHandler = ({ event }) => {
           return fetch(event.request)
               .then((response) => {
                   if (response.status &lt; 500) { réponse de retour&nbsp;; } // @todo Ceci est dupliqué avec le code dans service-worker-navigation-routing.js. return réponse.text().then(function (errorText) ...
       ```
   
 * So the translation logic is erroneously attempting to translate the JavaScript
   code.
 * So I think this is something you should raise with the plugin author, or if you
   can perhaps find a way to prevent translation for URLs that end in `wp.serviceworker`.

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

The topic ‘serviceworker problem’ 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/)

 * 6 replies
 * 3 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/serviceworker-problem/#post-17561004)
 * Status: resolved