Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter infinitymusics

    (@infinitymusics)

    I had try remove fallbackImage from filesToCache so it becomes const filesToCache = [startPage, offlinePage]; but it still not working.

    Hello @infinitymusics

    Thanks for the kind words.

    Even though I have seen this error before I haven’t had a chance to figure it out yet. Jose and I are looking into it.

    Interesting thing is that I cannot see the error on your website anymore, but I have seen this in the past. Are you seeing on the homepage? or a different page?

    I will do some tests and get back to you with a suggestion soon.

    Thread Starter infinitymusics

    (@infinitymusics)

    It can be see in both homepage and post page. Thank you and hope hearing for the solutions soon.

    Thread Starter infinitymusics

    (@infinitymusics)

    I changed the code to become like this so it will works.

    // Install
    self.addEventListener(‘install’, function(e) {
    console.log(‘SuperPWA service worker installation’);
    e.waitUntil(
    caches.open(cacheName).then(function(cache) {
    console.log(‘SuperPWA service worker caching dependencies’);
    //return cache.addAll(filesToCache);

    /*
    Solution 1
    return Promise.all(
    filesToCache.map(function (url) {
    return cache.add(url).catch(function (reason) {
    return console.log(url + “failed: ” + String(reason));
    });
    })
    );*/

    // Solution 2 without debug
    return Promise.all(
    filesToCache.map(function(url){ cache.add(url) })
    );
    })
    );
    });

    SuperPWA 1.9 should take care of this.

    Here is the commit for reference: https://github.com/SuperPWA/Super-Progressive-Web-Apps/commit/c49104c868c845bf6b434feba6c660c52fed8575

    Also the release note: https://superpwa.com/superpwa-1-9-chrome-mini-infobar-ready/

    Please let me know if you still see the error.

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Chrome works fine but Firefox JS Error’ is closed to new replies.