Fetch event respondwith received an error returned response is null ошибка

I can download the website using the service Worker on Android Chrome, macOS Chrome as well as Safari and on Windows Chrome for offline use. When I try to download the website to iOS 12.1 Safari it works first. But when I close Safari, go offline and reopen Safari, I get the following error message:

Safari can’t open the Site.

Error: «FetchEvent.respondWith received an error: TypeError: There
seems to be no connection to the Internet.»

==== AND in the console ====

FetchEvent.respondWith received an error: Returned response is null

Below you can see the scripts in text form. Unfortunately, I can hardly report anything about the problem, because I don’t understand it and hope for some knowledgeable people :)

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>Offline App</h1>
</body>
<script>
    if('serviceWorker' in navigator) {
        navigator.serviceWorker.register('sw.js').then(function (registration) {
            console.log('Service Worker Registered');
        });
    }
</script>
</html>

sw.js

/*
 Copyright 2014 Google Inc. All Rights Reserved.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/

importScripts('cache-polyfill.js');

var CACHE_VERSION = 1;
var CURRENT_CACHES = {
    prefetch: 'prefetch-cache-v' + CACHE_VERSION
};

self.addEventListener('install', function(event) {
    var now = Date.now();

    var urlsToPrefetch = [
        '/pwa/index.html'
    ];

    console.log('Handling install event. Resources to prefetch:', urlsToPrefetch);

    event.waitUntil(
        caches.open(CURRENT_CACHES.prefetch).then(function(cache) {
            var cachePromises = urlsToPrefetch.map(function(urlToPrefetch) {
                var url = new URL(urlToPrefetch, location.href);
                url.search += (url.search ? '&' : '?') + 'cache-bust=' + now;

                var request = new Request(url, {mode: 'no-cors'});
                return fetch(request).then(function(response) {
                    if (response.status >= 400) {
                        throw new Error('request for ' + urlToPrefetch +
                            ' failed with status ' + response.statusText);
                    }

                    return cache.put(urlToPrefetch, response);
                }).catch(function(error) {
                    console.error('Not caching ' + urlToPrefetch + ' due to ' + error);
                });
            });

            return Promise.all(cachePromises).then(function() {
                console.log('Pre-fetching complete.');
            });
        }).catch(function(error) {
            console.error('Pre-fetching failed:', error);
        })
    );
});

self.addEventListener('activate', function(event) {
    var expectedCacheNames = Object.keys(CURRENT_CACHES).map(function(key) {
        return CURRENT_CACHES[key];
    });

    event.waitUntil(
        caches.keys().then(function(cacheNames) {
            return Promise.all(
                cacheNames.map(function(cacheName) {
                    if (expectedCacheNames.indexOf(cacheName) === -1) {
                        console.log('Deleting out of date cache:', cacheName);
                        return caches.delete(cacheName);
                    }
                })
            );
        })
    );
});

self.addEventListener('fetch', function(event) {
    if (!navigator.onLine) {

        event.respondWith(
            caches.match(event.request).then(function (response) {
                if (response) {

                    return response;
                }

                console.log('No response found in cache. About to fetch from network...');

                return fetch(event.request).then(function (response) {
                    console.log('Response from network is:', response);

                    return response;
                }).catch(function (error) {
                    console.error('Fetching failed:', error);
                    throw error;
                });
            })
        );
    }
});

Environment

Name Version
msw 0.25.0
browser Safari 14.0.2
OS MacOS Catalina

Request handlers

// Example of declaration. Provide your code here.
import { setupWorker } from 'msw'

const handlers = [
  graphql.query('MeQuery', (_req, res, ctx) => {
    return res(
      ctx.data({
        ...
      }),
    );
  }),
  ...
];

const worker = setupWorker(...handlers)

worker.start()

Actual request

// Example of making a request. Provide your code here.
export const getMe = async () => {
  try {
    const response = await fetch(MOCK_URL, {
      headers: {
        'Content-Type': 'application/json',
      },
      method: 'POST',
      body: meQuery(),
    });
    ...
  } catch {
    ...
  }
};

Current behavior

On Chrome & Firefox, everything is fine. In Safari, it seems like the request gets intercepted, as I see the mock response in the console, but then the service worker throws an error, causing the fetch call to catch with error
[Error] FetchEvent.respondWith received an error: Returned response is null. (see screenshot). Not sure why it’s trying to connect to localhost:8642. That’s the local server I run when not using mocks.

Expected behavior

The fetch should return the mock response and not throw an error.

Screenshots

image

Looks like no one’s replied in a while. To start the conversation again, simply

ask a new question.

I have a Macbook Air (2017) running macos Big Sur V11.4.

On Safari, when trying to go to outlook.com, the following error is shown and the page cannot be refreshed:

Safari can’t open the page “https://outlook.office.com/mail/“. The error is: “FetchEvent.respondWith received an error: Returned response is null.”

(WebKitServiceWorker:0)

The error does not persist in Incognito mode, Chrome or any other browser. The internet connection is all good — it’s not that.

Ive trawled the internet to no avail. Please let me know of any possible fixes.

MacBook Air

Posted on Jul 1, 2021 1:52 PM

On this Mac, site opens without any issue.

Go step by step and test.

1. Quit Safari, launch Safari holding the Shift key down.

    https://support.apple.com/en-us/HT203987

2. Startup in Safe Mode. https://support.apple.com/guide/mac-help/start-up-your-mac-in-safe-mode-mh21245/mac.  

    Quote:

    It also does a basic check of your startup disk, similar to using First Aid in Disk Utility. 

    And it deletes some system caches, including font caches and 

    the kernel cache, which are automatically created again as needed.

3. Clear History

    https://support.apple.com/guide/safari/clear-your-browsing-history-sfri47acf5d6/mac

    Please read the article before clearing history, 

    this is like a low level resetting of Safari without affecting passwords and bookmarks.

4. If Safari doesn’t open a webpage or isn’t working as expected

    https://support.apple.com/en-us/HT204098

Posted on Jul 2, 2021 4:57 AM

Similar questions

  • Safari NOT Working after MAC OS update to Big Sur
    Hi,

    I had updated MacBook Air OS sometime back and after that I am facing 2 issues:

    Safari stopped working. The page never loads and it stays in loading state forever.
    Mail app behaves in a weird way. It goes in offline mode and does not come back to normal state. I have to quit the Mail app and restart it and then it loads new mails.

    Details:
    MacBook Air (13-inch, Early 2014)
    Mac OS Big Sur 11.5.2
    Safari Version: 14.1.2 (16611.3.10.1.6)
    Mail Version: 14.0 (3654.120.0.1.13)

    261
    5

  • Safari 12.1.2 not working on iMac (nor is Mail)
    Greetings. When I shut down and then boot up again, Safari works for maybe 3 minutes then stops responding. Repeatedly. I have checked extensions, cleared History, emptied Caches, etc., to no avail.

    FYI — Firefox works with no problems, so it’s not a wifi issue.

    Curiously, at the same time, Mail stopped functioning as well…..shutting down or restarting has no effect.

    Using OS 10.13.6

    Thx
    Robert

    211
    6

  • My MacOS High Sierra has rendered Google and other sights useless I keep getting error messages from safari and mail.
    Error messages keep popping up such as the requested URL could not be retrieved, failed to establish a secure connection, sending me to enter the account password which never gets far enough. So what could be the cause for this and what are fixes?i have tried a few suggestions, but nothing has helped. Google worked fine on 12/16, but no mail since then,I can’t open google or anything related to it on my Mac.

    205
    1

Safari: FetchEvent.respondWith received an error

Environment

Name Version
msw 0.25.0
browser Safari 14.0.2
OS MacOS Catalina

Request handlers

// Example of declaration. Provide your code here.
import { setupWorker } from 'msw'

const handlers = [
  graphql.query('MeQuery', (_req, res, ctx) => {
    return res(
      ctx.data({
        ...
      }),
    );
  }),
  ...
];

const worker = setupWorker(...handlers)

worker.start()

Actual request

// Example of making a request. Provide your code here.
export const getMe = async () => {
  try {
    const response = await fetch(MOCK_URL, {
      headers: {
        'Content-Type': 'application/json',
      },
      method: 'POST',
      body: meQuery(),
    });
    ...
  } catch {
    ...
  }
};

Current behavior

On Chrome & Firefox, everything is fine. In Safari, it seems like the request gets intercepted, as I see the mock response in the console, but then the service worker throws an error, causing the fetch call to catch with error
[Error] FetchEvent.respondWith received an error: Returned response is null. (see screenshot). Not sure why it’s trying to connect to localhost:8642. That’s the local server I run when not using mocks.

Expected behavior

The fetch should return the mock response and not throw an error.

Screenshots

image

Содержание

  1. Question: Q: fetchevent
  2. Helpful answers
  3. Safari bug #1730
  4. Comments
  5. dijonkitchen commented Oct 23, 2018 •
  6. jeffposnick commented Oct 23, 2018
  7. dijonkitchen commented Oct 24, 2018
  8. dijonkitchen commented Oct 24, 2018
  9. jeffposnick commented Oct 24, 2018
  10. NekR commented Oct 24, 2018 •
  11. jeffposnick commented Oct 24, 2018
  12. NekR commented Oct 24, 2018
  13. dijonkitchen commented Oct 24, 2018
  14. oliviertassinari commented Oct 24, 2018
  15. oliviertassinari commented Nov 6, 2018 •
  16. dijs commented Nov 14, 2018
  17. jeffposnick commented Nov 19, 2018

Question: Q: fetchevent

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

MacBook Pro TouchBar and Touch ID, macOS Mojave (10.14.1)

Posted on Nov 30, 2018 8:57 AM

Helpful answers

I don’t see any software that normally causes problems. The Safe Mode boot may have fixed the problem since you posted the site is okay. The Safe Mode will reset some caches, forces a directory check, and is a general reset.

Dec 1, 2018 2:17 AM

There’s more to the conversation

Loading page content

Page content loaded

Try going to Safari/Preferences/Privacy/Website Data and delete the cookie(s) for the site. Quit/reopen Safari and test.

Go to Safari Preferences/Extensions and turn all extensions off. Quit/reopen Safari and test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.

Try another browser as a test.

Try setting up another admin user account to see if the same problem continues. Please post back on whether or not this worked. Also try the Safe Mode. Please post back on whether or not this worked.

If it works in the Safe Mode, try running this program when booted normally and then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor. Please use copy and paste as screen shots can be hard to read. Click “Share Report” button in the toolbar, select “Copy to Clipboard” and then paste into a reply. This will show what is running on your computer. No personal information is shown.

Nov 30, 2018 10:10 AM

In the safe mode the site works perfect. Then restart and then Etre Check, see below. (But now the site is perfect . )

EtreCheck version: 5.0.9 (5A020)

Report generated: 2018-11-30 21:00:51

Download EtreCheck from https://etrecheck.com

Runtime: 1:57

Performance: Excellent

Problem: Other problem

Description:

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

Major Issues: None

Minor Issues:

These issues do not need immediate attention but they may indicate future problems.

Apps with heavy CPU usage — There have been numerous cases of apps with heavy CPU usage.

Heavy I/O usage — Your system is under heavy I/O use. This will reduce your performance.

Abnormal shutdown — Your machine shut down abnormally.

Limited drive access — More information may be available with Full Drive Access.

Hardware Information:

MacBook Pro (15-inch, 2016)

MacBook Pro Model: MacBookPro13,3

1 2,7 GHz Intel Core i7 (i7-6820HQ) CPU: 4-core

16 GB RAM — Not upgradeable

BANK 0/DIMM0 — 8 GB LPDDR3 2133 ok

BANK 1/DIMM0 — 8 GB LPDDR3 2133 ok

Battery: Health = Normal — Cycle count = 38

Video Information:

Intel HD Graphics 530 — VRAM: 1536 MB

Color LCD 3360 x 2100

AMD Radeon Pro 455 — VRAM: 2048 MB

Drives:

disk0 — APPLE SSD SM0512L 500.28 GB (Solid State — TRIM: Yes)

Internal PCI-Express 8.0 GT/s x4 NVM Express

disk0s1 — EFI [EFI] 315 MB

disk0s2 [APFS Container] 499.96 GB

disk1 [APFS Virtual drive] 499.96 GB (Shared by 4 volumes)

disk1s1 — M*********** (APFS) (Shared — 140.40 GB used)

disk1s2 — Preboot (APFS) [APFS Preboot] (Shared — 47 MB used)

disk1s3 — Recovery (APFS) [Recovery] (Shared — 513 MB used)

disk1s4 — VM (APFS) [APFS VM] (Shared — 1.07 GB used)

Mounted Volumes:

disk1s1 — M*********** 499.96 GB (357.77 GB free)

disk1s4 — VM [APFS VM] (Shared — 1.07 GB used)

Mount point: /private/var/vm

Network:

Interface lpss-serial1: LPSS Serial Adapter (1)

Interface lpss-serial2: LPSS Serial Adapter (2)

Interface en0: Wi-Fi

Interface en5: Bluetooth PAN

Interface bridge0: Thunderbolt Bridge

iCloud Quota: 61.62 GB available

System Software:

macOS Mojave 10.14.1 (18B75)

Time since boot: Less than an hour

Security:

System Status
Gatekeeper Enabled
System Integrity Protection Enabled

System Launch Agents:

[Not Loaded] 15 Apple tasks
[Loaded] 185 Apple tasks
[Running] 99 Apple tasks

System Launch Daemons:

[Not Loaded] 36 Apple tasks
[Loaded] 187 Apple tasks
[Running] 112 Apple tasks

Launch Agents:

[Running] com.adobe.AdobeCreativeCloud.plist (Adobe Systems, Inc. — installed 2018-06-14)
[Loaded] com.microsoft.update.agent.plist (Microsoft Corporation — installed 2018-11-15)
[Running] com.adobe.GC.AGM.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Not Loaded] com.adobe.AAM.Updater-1.0.plist (? ffb65062 — installed 2018-06-14)
[Running] com.malwarebytes.mbam.frontend.agent.plist (Malwarebytes Corporation — installed 2018-09-14)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)

Launch Daemons:

[Running] com.malwarebytes.mbam.rtprotection.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.malwarebytes.mbam.settings.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.adobe.agsservice.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.microsoft.OneDriveUpdaterDaemon.plist (Microsoft Corporation — installed 2018-05-23)
[Loaded] com.microsoft.autoupdate.helper.plist (Microsoft Corporation — installed 2018-11-15)
[Loaded] com.apple.installer.osmessagetracing.plist (Apple — installed 2018-10-24)
[Loaded] com.microsoft.office.licensingV2.helper.plist (Microsoft Corporation — installed 2018-05-14)
[Running] com.adobe.adobeupdatedaemon.plist (Adobe Systems, Inc. — installed 2018-06-14)

User Launch Agents:

[Loaded] com.dropbox.DropboxMacUpdate.agent.plist (Dropbox, Inc. — installed 2018-10-24)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.google.keystone.agent.plist (Google, Inc. — installed 2018-07-18)
[Running] com.spotify.webhelper.plist (Spotify — installed 2018-11-30)

User Login Items:

Dropbox.app (Dropbox, Inc. — installed 2018-11-29)

StartUpHelper (Spotify — installed 2018-07-17)

iTunesHelper.app (Apple — installed 2018-10-30)

Internet Plug-ins:

Silverlight: 5.1.50901.0 (installed 2018-09-30)

AdobeAAMDetect: 3.0.0.0 (installed 2018-06-14)

QuickTime Plugin: 7.7.3 (installed 2018-10-30)

Time Machine:

Time Machine information not available without Full Drive Access.

Performance:

System Load: 1.55 (1 min ago) 2.27 (5 min ago) 1.22 (15 min ago)

Nominal I/O speed: 10.06 MB/s

File system: 18.71 seconds

Write speed: 1959 MB/s

Read speed: 2677 MB/s

CPU Usage:

Type Overall Individual cores
System 1 % 4 % 0 % 2 % 0 % 2 % 0 % 1 % 0 %
User 2 % 5 % 0 % 3 % 0 % 3 % 0 % 1 % 0 %
Idle 97 % 90 % 100 % 94 % 100 % 96 % 100 % 98 % 100 %

Top Processes by CPU:

Process (count) Source CPU Location
genatsdb Apple 31.00 %
appstoreagent Apple 16.20 %
WindowServer Apple 7.92 %
EtreCheckPro Etresoft, Inc. 5.58 %
cloudphotosd Apple 4.58 %

Top Processes by Memory:

Process (count) Source RAM usage Location
com.apple.WebKit.WebContent (9) Apple 1.05 GB
EtreCheckPro Etresoft, Inc. 593 MB
mdworker_shared (18) Apple 509 MB
kernel_task Apple 400 MB
Spotify Helper (3) Spotify 301 MB

Top Processes by Network Use:

Process Source Input Output Location
Spotify Spotify 11 MB 321 KB
biometrickitd Apple 20 KB 167 KB
Dropbox Dropbox, Inc. 93 KB 91 KB
com.apple.iCloudHelper Apple 39 KB 8 KB
mDNSResponder Apple 25 KB 20 KB

Virtual Memory Information:

Available RAM 10.01 GB
Free RAM 6.50 GB
Used RAM 5.99 GB
Cached files 3.51 GB
Swap Used 0 B

Software Installs (past 30 days):

Name Version Install Date
Microsoft Outlook for Mac 16.16.18111001 2018-11-14
Microsoft PowerPoint for Mac 16.16.18111001 2018-11-14
Microsoft OneNote for Mac 16.16.18111001 2018-11-14
Microsoft Excel for Mac 16.16.18111001 2018-11-14
Microsoft Word for Mac 16.16.18111001 2018-11-14
Microsoft AutoUpdate 4.5.18110402 2018-11-15
HueMenu 1.9.1 2018-11-17

Diagnostics Information (past 7 days):

2018-11-30 20:54:48 Last Shutdown Cause: 3 — Hard shutdown

Источник

Safari bug #1730

Library Affected:
workbox-sw, workbox-build, etc.?

Browser & Platform:
Safari 12
macOS High Sierra 10.13.6

Issue or Feature Request Description:
Refreshing workbox PWAs (like https://material-ui.com) leads to this sometimes.

Confirmed that they work fine on Firefox, Chrome and private mode Safari.

I figured if I cleared the cache, it would help, but it doesn’t seem to kill the service workers.
Workaround is to disable service workers in Developer mode and I can load the websites properly.

The text was updated successfully, but these errors were encountered:

I just testing things out on Safari 12 on the desktop, and was not able to reproduce after navigating around to a few pages controlled by the service worker on https://material-ui.com. So, if there are any concrete reproduction steps that you’ve been able to narrow down, I’d love to dig in deeper.

In the meantime, though, I’ve noticed that you’re using a v3.0.0 pre-release version of Workbox. Workbox is up to v3.6.3 now (and we’ve got v4 alphas out), so as a first step, could you try upgrading your copy of Workbox? There were a number of improvements made throughout the v3 releases, and I’d like to at least make sure that we’re starting from the latest codebase.

Thanks @jeffposnick, I don’t control the site, so I’ll cross-post there.

@jeffposnick did you also trying refreshing pages? This should be when the Service workers do their work using the cache instead of routing through the single-page app.

Yes, I’ve tried a few times now to go through full navigations as well as page reloads and trigger any failures in Safari 12. I’ve not had any luck.

(That’s not to say that there isn’t an issue; it’s just that odd bugs can crop up in browsers’ implementations of service workers that are hard to trigger.)

This is iOS 12 Safari bug.

(It isn’t fixed in 12.0.1)

As per the initial issue report, I was working under the assumption that this was being seen on the desktop (Safari 12 / macOS High Sierra 10.13.6).

@jeffposnick hmm.. yeah, indeed. Then it must be the same bug on macOS as well because the error line is the same as on iOS when this happens.

Yes, my error was on macOS Safari. For what it’s worth, I tried it out on another laptop that recently upgraded to macOS Mojave and Safari there was fine.

We gonna start by upgrading the version of workbox on material-ui side.

We have been upgrading the version of workbox from the beta to the latest version. It hasn’t gone smoothly, a lot of people were facing cache invalidation issues. This is something that happens quite often every time we release a new version. It takes time to propagate. The cache invalidation is an important limitation of the service workers.

I’m suspecting it’s because of the next service worker waiting for its activation. Maybe there is a way to force it? At the expense of an unexpected full page reload when the user tries to refresh the page or to navigate to a different page. I will explore this path: https://developers.google.com/web/tools/workbox/guides/advanced-recipes.

Our team recently found this issue as well. Is the solution to upgrade workbox?

Our team recently found this issue as well. Is the solution to upgrade workbox?

The material-ui site was using a very outdated Workbox v3 beta, so updating was a good idea in general.

More recent versions of Workbox have had better «cache miss» fallback logic to take into account the fact that items that should be precached aren’t necessarily going to be there (due to browser bugs, or other failure scenarios), so they are more robust about at least showing something from the network when this crops up, instead of just failing to load the cached response.

But in general, my understanding is that this underlying issue a bug in Safari and is outside of Workbox’s control, and which is being tracked by the Webkit bugs linked to above.

Источник

fetchevent

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

MacBook Pro TouchBar and Touch ID, macOS Mojave (10.14.1)

Posted on Nov 30, 2018 8:57 AM

Similar questions

I don’t see any software that normally causes problems. The Safe Mode boot may have fixed the problem since you posted the site is okay. The Safe Mode will reset some caches, forces a directory check, and is a general reset.

Loading page content

Page content loaded

Try going to Safari/Preferences/Privacy/Website Data and delete the cookie(s) for the site. Quit/reopen Safari and test.

Go to Safari Preferences/Extensions and turn all extensions off. Quit/reopen Safari and test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.

Try another browser as a test.

Try setting up another admin user account to see if the same problem continues. Please post back on whether or not this worked. Also try the Safe Mode. Please post back on whether or not this worked.

If it works in the Safe Mode, try running this program when booted normally and then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor. Please use copy and paste as screen shots can be hard to read. Click “Share Report” button in the toolbar, select “Copy to Clipboard” and then paste into a reply. This will show what is running on your computer. No personal information is shown.

In the safe mode the site works perfect. Then restart and then Etre Check, see below. (But now the site is perfect . )

EtreCheck version: 5.0.9 (5A020)

Report generated: 2018-11-30 21:00:51

Download EtreCheck from https://etrecheck.com

Runtime: 1:57

Performance: Excellent

Problem: Other problem

Description:

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

Major Issues: None

Minor Issues:

These issues do not need immediate attention but they may indicate future problems.

Apps with heavy CPU usage — There have been numerous cases of apps with heavy CPU usage.

Heavy I/O usage — Your system is under heavy I/O use. This will reduce your performance.

Abnormal shutdown — Your machine shut down abnormally.

Limited drive access — More information may be available with Full Drive Access.

Hardware Information:

MacBook Pro (15-inch, 2016)

MacBook Pro Model: MacBookPro13,3

1 2,7 GHz Intel Core i7 (i7-6820HQ) CPU: 4-core

16 GB RAM — Not upgradeable

BANK 0/DIMM0 — 8 GB LPDDR3 2133 ok

BANK 1/DIMM0 — 8 GB LPDDR3 2133 ok

Battery: Health = Normal — Cycle count = 38

Video Information:

Intel HD Graphics 530 — VRAM: 1536 MB

Color LCD 3360 x 2100

AMD Radeon Pro 455 — VRAM: 2048 MB

Drives:

disk0 — APPLE SSD SM0512L 500.28 GB (Solid State — TRIM: Yes)

Internal PCI-Express 8.0 GT/s x4 NVM Express

disk0s1 — EFI [EFI] 315 MB

disk0s2 [APFS Container] 499.96 GB

disk1 [APFS Virtual drive] 499.96 GB (Shared by 4 volumes)

disk1s1 — M*********** (APFS) (Shared — 140.40 GB used)

disk1s2 — Preboot (APFS) [APFS Preboot] (Shared — 47 MB used)

disk1s3 — Recovery (APFS) [Recovery] (Shared — 513 MB used)

disk1s4 — VM (APFS) [APFS VM] (Shared — 1.07 GB used)

Mounted Volumes:

disk1s1 — M*********** 499.96 GB (357.77 GB free)

disk1s4 — VM [APFS VM] (Shared — 1.07 GB used)

Mount point: /private/var/vm

Network:

Interface lpss-serial1: LPSS Serial Adapter (1)

Interface lpss-serial2: LPSS Serial Adapter (2)

Interface en0: Wi-Fi

Interface en5: Bluetooth PAN

Interface bridge0: Thunderbolt Bridge

iCloud Quota: 61.62 GB available

System Software:

macOS Mojave 10.14.1 (18B75)

Time since boot: Less than an hour

Security:

System Status
Gatekeeper Enabled
System Integrity Protection Enabled

System Launch Agents:

[Not Loaded] 15 Apple tasks
[Loaded] 185 Apple tasks
[Running] 99 Apple tasks

System Launch Daemons:

[Not Loaded] 36 Apple tasks
[Loaded] 187 Apple tasks
[Running] 112 Apple tasks

Launch Agents:

[Running] com.adobe.AdobeCreativeCloud.plist (Adobe Systems, Inc. — installed 2018-06-14)
[Loaded] com.microsoft.update.agent.plist (Microsoft Corporation — installed 2018-11-15)
[Running] com.adobe.GC.AGM.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Not Loaded] com.adobe.AAM.Updater-1.0.plist (? ffb65062 — installed 2018-06-14)
[Running] com.malwarebytes.mbam.frontend.agent.plist (Malwarebytes Corporation — installed 2018-09-14)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)

Launch Daemons:

[Running] com.malwarebytes.mbam.rtprotection.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.malwarebytes.mbam.settings.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.adobe.agsservice.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.microsoft.OneDriveUpdaterDaemon.plist (Microsoft Corporation — installed 2018-05-23)
[Loaded] com.microsoft.autoupdate.helper.plist (Microsoft Corporation — installed 2018-11-15)
[Loaded] com.apple.installer.osmessagetracing.plist (Apple — installed 2018-10-24)
[Loaded] com.microsoft.office.licensingV2.helper.plist (Microsoft Corporation — installed 2018-05-14)
[Running] com.adobe.adobeupdatedaemon.plist (Adobe Systems, Inc. — installed 2018-06-14)

User Launch Agents:

[Loaded] com.dropbox.DropboxMacUpdate.agent.plist (Dropbox, Inc. — installed 2018-10-24)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.google.keystone.agent.plist (Google, Inc. — installed 2018-07-18)
[Running] com.spotify.webhelper.plist (Spotify — installed 2018-11-30)

User Login Items:

Dropbox.app (Dropbox, Inc. — installed 2018-11-29)

StartUpHelper (Spotify — installed 2018-07-17)

iTunesHelper.app (Apple — installed 2018-10-30)

Internet Plug-ins:

Silverlight: 5.1.50901.0 (installed 2018-09-30)

AdobeAAMDetect: 3.0.0.0 (installed 2018-06-14)

QuickTime Plugin: 7.7.3 (installed 2018-10-30)

Time Machine:

Time Machine information not available without Full Drive Access.

Performance:

System Load: 1.55 (1 min ago) 2.27 (5 min ago) 1.22 (15 min ago)

Nominal I/O speed: 10.06 MB/s

File system: 18.71 seconds

Write speed: 1959 MB/s

Read speed: 2677 MB/s

CPU Usage:

Type Overall Individual cores
System 1 % 4 % 0 % 2 % 0 % 2 % 0 % 1 % 0 %
User 2 % 5 % 0 % 3 % 0 % 3 % 0 % 1 % 0 %
Idle 97 % 90 % 100 % 94 % 100 % 96 % 100 % 98 % 100 %

Top Processes by CPU:

Process (count) Source CPU Location
genatsdb Apple 31.00 %
appstoreagent Apple 16.20 %
WindowServer Apple 7.92 %
EtreCheckPro Etresoft, Inc. 5.58 %
cloudphotosd Apple 4.58 %

Top Processes by Memory:

Process (count) Source RAM usage Location
com.apple.WebKit.WebContent (9) Apple 1.05 GB
EtreCheckPro Etresoft, Inc. 593 MB
mdworker_shared (18) Apple 509 MB
kernel_task Apple 400 MB
Spotify Helper (3) Spotify 301 MB

Top Processes by Network Use:

Process Source Input Output Location
Spotify Spotify 11 MB 321 KB
biometrickitd Apple 20 KB 167 KB
Dropbox Dropbox, Inc. 93 KB 91 KB
com.apple.iCloudHelper Apple 39 KB 8 KB
mDNSResponder Apple 25 KB 20 KB

Virtual Memory Information:

Available RAM 10.01 GB
Free RAM 6.50 GB
Used RAM 5.99 GB
Cached files 3.51 GB
Swap Used 0 B

Software Installs (past 30 days):

Name Version Install Date
Microsoft Outlook for Mac 16.16.18111001 2018-11-14
Microsoft PowerPoint for Mac 16.16.18111001 2018-11-14
Microsoft OneNote for Mac 16.16.18111001 2018-11-14
Microsoft Excel for Mac 16.16.18111001 2018-11-14
Microsoft Word for Mac 16.16.18111001 2018-11-14
Microsoft AutoUpdate 4.5.18110402 2018-11-15
HueMenu 1.9.1 2018-11-17

Diagnostics Information (past 7 days):

2018-11-30 20:54:48 Last Shutdown Cause: 3 — Hard shutdown

Источник

Service Worker FechtEvent.respondWith response имеет значение null в Safari iOS 12.1

Я могу загрузить веб-сайт с помощью службы Worker в Android Chrome, macOS Chrome, а также в Safari и в Windows Chrome для автономного использования. Когда я пытаюсь загрузить сайт на iOS 12.1 Safari, он сначала работает. Но когда я закрываю Safari, перехожу в автономный режим и снова открываю Safari, я получаю следующий сообщение об ошибке:

Error: «FetchEvent.respondWith received an error: TypeError: There seems to be no connection to the Internet.»

==== AND in the console ====

FetchEvent.respondWith received an error: Returned response is null

Ниже вы можете увидеть скрипты в текстовом виде. К сожалению, почти ничего не могу сообщить о проблеме, потому что не понимаю и надеюсь на кого-нибудь знающих 🙂

Я протестировал сценарий на нескольких iPhone (12.0, 12.0.1 (16A404), а также 12.1 (16B92)), и на всех из них я мог загрузить веб-приложение и снова открыть его в автономном режиме. В настоящее время я подозреваю, что на iPhone, у которых включены следующие настройки, у PWA есть проблемы с повторным поиском кеша: 1. Не разрешать кеш и 2. Ограниченный iphone (родительский контроль). После того, как я разрешил кешу работать, он все еще не работал. Работа. Я не мог отключить ограниченный режим, потому что владелец больше не знает код.

Я понял, что, разместив сайт через xampp и посетив его со своего телефона (iOS 12.1.1), я могу посещать его в автономном режиме. При обслуживании на моем сервере с nginx я также получаю ту же ошибку, о которой вы говорили. У меня пока нет решения, но, возможно, эта информация может вам помочь.

Вы когда-нибудь находили решение этой проблемы или в чем была проблема? Я несколько дней застревал с этой ошибкой и не нашел решения, с чего начать поиск.

Извините, до сих пор решение этой проблемы не найдено. Это случилось только на одном устройстве, поэтому я решил продолжить. Если хотите, можете попробовать перезагрузить iphone. До сих пор я предполагаю, что это сбой в конфигурации конфиденциальности в телефоне.

Источник

Ответ Service Worker FechtEvent.respondWith является нулевым на iOS 12.1 Safari

Я могу загрузить веб-сайт с помощью службы Worker на Android Chrome, macOS Chrome, а также Safari и на Windows Chrome для автономного использования. Когда я пытаюсь загрузить веб-сайт в iOS 12.1 Safari, он сначала работает. Но когда я закрываю Safari, выхожу в автономный режим и снова открываю Safari, я получаю следующее сообщение об ошибке:

Safari can’t open the Site.

Ошибка: «FetchEvent.respondWith получил ошибку: TypeError: There похоже, нет соединения с Интернетом.»

FetchEvent.respondWith получил ошибку: Returned response is null

Ниже вы можете увидеть скрипты в текстовом виде. К сожалению, я вряд ли смогу что-то сообщить о проблеме, потому что я ее не понимаю и надеюсь на знающих людей 🙂

Извините, что у меня пока нет ответа, но у меня точно такая же проблема с моим веб-приложением, и я потратил на нее несколько часов. Поэтому я хотел бы опубликовать здесь все свои выводы.

Шаги для проверки возможности работы веб-приложения в автономном режиме в iOS 12

  1. зайдите на веб-сайт в Safari (iOS 12 или 12.1)
  2. закройте вкладку веб-сайта в Safari
  3. нажмите кнопку «Домой» на iPhone, чтобы перевести Safari в фоновый режим
  4. нажмите кнопку питания iPhone, чтобы выключить экран
  5. нажмите кнопку питания iPhone еще раз, чтобы разбудить телефон
  6. отключите все сетевые подключения в центре управления iPhone (как wifi, так и сотовую связь)
  7. откройте Safari, снова зайдите на сайт -> он должен работать в автономном режиме.

iOS 12 против iOS 11.3

Похоже, что эта проблема появилась с iOS 12. Мое веб-приложение (https://viewsbyme.com) прекрасно работало в автономном режиме на iOS 11.3, в версии которой мобильный Safari впервые представил Service Worker, но получало отклики от iOS 12 и iOS 12.1 в автономном режиме:

Safari не может открыть страницу. Ошибка гласила: «FetchEvent.respondWith получил ошибку: TypeError: Интернет-соединение, похоже, находится в автономном режиме.».

Не уверен, что это связано с этим сообщением об ошибке (в нем говорится «RESOLVED FIXED», но на самом деле еще нет, если вы прокрутите страницу до самого низа):

Примеры работающих и неработающих веб-приложений

В качестве примеров эти 2 PWA могут работать в автономном режиме в iOS 12:

И эти 2 PWA не могут работать в автономном режиме в iOS 12 (но они прекрасно работают в Chrome на других платформах):

Это кажется простым делом — сравнить скрипты Service Worker между этими PWA и выяснить, что заставляет их работать, а что нет. Но я все еще не выяснил дельту.

Источник

Can’t Open the Page because Safari Received an Error Issue

When I tried go to www.panzoid.com, Because it’s said

The error was: FetchEvent.respondWith received an error: TypeError: Failed writing data to the file system.” Because I won’t able to view creations that People created on Panzoid.

So Here is the code error issues:

FetchEvent.respondWith received an error: 
TypeError: Failed writing data to the file system.

So I was knowing those Errors and then I when works on this, But I did not.

So what should I do now?

Posted on Aug 6, 2021 7:02 PM

Hello Cloneable,

Thanks for reaching out to the Apple Support Communities. We understand you are experiencing some issues with loading a webpage in Safari. We are happy to help provide some guidance.

If you are receiving an error message in Safari when trying to load a webpage, take a look at what to do in the following helpful article:

If Safari displays a blank page or quits on your iPhone, iPad, or iPod touch

We hope this information helps.

Cheers.

Posted on Aug 7, 2021 1:06 PM

Recently I have been working on a PWA for a client. I chose to use Gatsby to build out the front end and luckily it comes with some great plugins to help with building PWAs. Mainly the offline and manifest plugins. After configuring those and building out the proof of concept, I deploy the site to Netlify and started testing on different devices.

It all goes off without a hitch until I get to iPad Safari… Where after adding the app to the Home Screen and playing around with it, I turn off my wifi to test the offline mode. And I am met with this lovely error:

Error: "FetchEvent.respondWith received an error: TypeError: There seems to be no connection to the Internet."

Enter fullscreen mode

Exit fullscreen mode

You are correct error, there is no internet connection, that is the point.

After spending a while Googling, as you do, I found two things.

  1. Apple doesn’t like the term PWA, kinda irrelevant but worth noting.
  2. A LOT of other people were having the same issue.

I tried several StackOverflow and Github solutions, with no luck. Eventually, I decided to go back to basics and create the most bare-bones PWA I could find. Which lead me to this tutorial on Medium by James Johnson. It was the Hello World of PWAs. Literally. Anyway, I followed the tutorial, deployed on Netlify and proceeded to test on iPad, with no issues! So something was wrong with the Gatsby build and not the iPad.

I made two changes to my project, which were all pushed at the same time and ended up fixing my issue. In all honesty, I am not 100% sure which one was the actual fix and at this point, I am too scared to test.

1. I added apple specific metadata

These tags were mentioned in the tutorial I followed above. After looking at the built version of the site, I noticed these apple specific meta tags weren’t being generated.

If you’re not using Gatsby, I’d recommend adding these meta tags in the <head> of your pages, and seeing if it fixes your issue.

import { Helmet } from 'react-helmet'

const PageWrapper = ({ ... }) => {
  return (
    <Helmet>
      <meta name="apple-mobile-web-app-capable" content="yes" />
      <meta name="apple-mobile-web-app-status-bar-style" content="black" /> 
      <meta name="apple-mobile-web-app-title" content="App Title" />
    </Helmet>
  )
}

Enter fullscreen mode

Exit fullscreen mode

I used the react-helmet package to add additional metadata to all my pages. The meta tag that seems the most important would be apple-mobile-web-app-capable.

2. Updated the Workbox globPatterns

In my gatsby-config.js file, I updated the manifest plugin options to include cache_busting_mode: 'none', which is required when you specify a new globPattern. Then under the offline plugin I updated the workboxConfig to be:

workboxConfig: {
  globPatterns: ['**/*.{js,jpg,png,html,css}']
}

Enter fullscreen mode

Exit fullscreen mode

I found this pattern while diving into the StackOverflow rabbit hole (I can’t find the link again…).


That is it, after making those changes and pushing the code. The PWA started working on iPad devices. I’d say to test the first change before trying the second one (if you’re using Gatsby), it seems to be the more relevant change.

Hopefully, this has helped you in some way. I spent a few hours looking at this issue so I was pretty happy when it started working. Plus, why not share my solution so other people don’t have to spend hours pulling their hair out.

Peace! ✌️

I can download the website using the service Worker on Android Chrome, macOS Chrome as well as Safari and on Windows Chrome for offline use. When I try to download the website to iOS 12.1 Safari it works first. But when I close Safari, go offline and reopen Safari, I get the following error message:

Safari can’t open the Site.

Error: «FetchEvent.respondWith received an error: TypeError: There
seems to be no connection to the Internet.»

==== AND in the console ====

FetchEvent.respondWith received an error: Returned response is null

Below you can see the scripts in text form. Unfortunately, I can hardly report anything about the problem, because I don’t understand it and hope for some knowledgeable people :)

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>Offline App</h1>
</body>
<script>
    if('serviceWorker' in navigator) {
        navigator.serviceWorker.register('sw.js').then(function (registration) {
            console.log('Service Worker Registered');
        });
    }
</script>
</html>

sw.js

/*
 Copyright 2014 Google Inc. All Rights Reserved.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/

importScripts('cache-polyfill.js');

var CACHE_VERSION = 1;
var CURRENT_CACHES = {
    prefetch: 'prefetch-cache-v' + CACHE_VERSION
};

self.addEventListener('install', function(event) {
    var now = Date.now();

    var urlsToPrefetch = [
        '/pwa/index.html'
    ];

    console.log('Handling install event. Resources to prefetch:', urlsToPrefetch);

    event.waitUntil(
        caches.open(CURRENT_CACHES.prefetch).then(function(cache) {
            var cachePromises = urlsToPrefetch.map(function(urlToPrefetch) {
                var url = new URL(urlToPrefetch, location.href);
                url.search += (url.search ? '&' : '?') + 'cache-bust=' + now;

                var request = new Request(url, {mode: 'no-cors'});
                return fetch(request).then(function(response) {
                    if (response.status >= 400) {
                        throw new Error('request for ' + urlToPrefetch +
                            ' failed with status ' + response.statusText);
                    }

                    return cache.put(urlToPrefetch, response);
                }).catch(function(error) {
                    console.error('Not caching ' + urlToPrefetch + ' due to ' + error);
                });
            });

            return Promise.all(cachePromises).then(function() {
                console.log('Pre-fetching complete.');
            });
        }).catch(function(error) {
            console.error('Pre-fetching failed:', error);
        })
    );
});

self.addEventListener('activate', function(event) {
    var expectedCacheNames = Object.keys(CURRENT_CACHES).map(function(key) {
        return CURRENT_CACHES[key];
    });

    event.waitUntil(
        caches.keys().then(function(cacheNames) {
            return Promise.all(
                cacheNames.map(function(cacheName) {
                    if (expectedCacheNames.indexOf(cacheName) === -1) {
                        console.log('Deleting out of date cache:', cacheName);
                        return caches.delete(cacheName);
                    }
                })
            );
        })
    );
});

self.addEventListener('fetch', function(event) {
    if (!navigator.onLine) {

        event.respondWith(
            caches.match(event.request).then(function (response) {
                if (response) {

                    return response;
                }

                console.log('No response found in cache. About to fetch from network...');

                return fetch(event.request).then(function (response) {
                    console.log('Response from network is:', response);

                    return response;
                }).catch(function (error) {
                    console.error('Fetching failed:', error);
                    throw error;
                });
            })
        );
    }
});

Home

Support Forums

Содержание

  1. fetchevent
  2. Similar questions
  3. Service Worker FechtEvent.respondWith response имеет значение null в Safari iOS 12.1
  4. Ответ Service Worker FechtEvent.respondWith является нулевым на iOS 12.1 Safari

fetchevent

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

MacBook Pro TouchBar and Touch ID, macOS Mojave (10.14.1)

Posted on Nov 30, 2018 8:57 AM

Similar questions

I don’t see any software that normally causes problems. The Safe Mode boot may have fixed the problem since you posted the site is okay. The Safe Mode will reset some caches, forces a directory check, and is a general reset.

Loading page content

Page content loaded

Try going to Safari/Preferences/Privacy/Website Data and delete the cookie(s) for the site. Quit/reopen Safari and test.

Go to Safari Preferences/Extensions and turn all extensions off. Quit/reopen Safari and test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.

Try another browser as a test.

Try setting up another admin user account to see if the same problem continues. Please post back on whether or not this worked. Also try the Safe Mode. Please post back on whether or not this worked.

If it works in the Safe Mode, try running this program when booted normally and then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor. Please use copy and paste as screen shots can be hard to read. Click “Share Report” button in the toolbar, select “Copy to Clipboard” and then paste into a reply. This will show what is running on your computer. No personal information is shown.

In the safe mode the site works perfect. Then restart and then Etre Check, see below. (But now the site is perfect . )

EtreCheck version: 5.0.9 (5A020)

Report generated: 2018-11-30 21:00:51

Download EtreCheck from https://etrecheck.com

Runtime: 1:57

Performance: Excellent

Problem: Other problem

Description:

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

Major Issues: None

Minor Issues:

These issues do not need immediate attention but they may indicate future problems.

Apps with heavy CPU usage — There have been numerous cases of apps with heavy CPU usage.

Heavy I/O usage — Your system is under heavy I/O use. This will reduce your performance.

Abnormal shutdown — Your machine shut down abnormally.

Limited drive access — More information may be available with Full Drive Access.

Hardware Information:

MacBook Pro (15-inch, 2016)

MacBook Pro Model: MacBookPro13,3

1 2,7 GHz Intel Core i7 (i7-6820HQ) CPU: 4-core

16 GB RAM — Not upgradeable

BANK 0/DIMM0 — 8 GB LPDDR3 2133 ok

BANK 1/DIMM0 — 8 GB LPDDR3 2133 ok

Battery: Health = Normal — Cycle count = 38

Video Information:

Intel HD Graphics 530 — VRAM: 1536 MB

Color LCD 3360 x 2100

AMD Radeon Pro 455 — VRAM: 2048 MB

Drives:

disk0 — APPLE SSD SM0512L 500.28 GB (Solid State — TRIM: Yes)

Internal PCI-Express 8.0 GT/s x4 NVM Express

disk0s1 — EFI [EFI] 315 MB

disk0s2 [APFS Container] 499.96 GB

disk1 [APFS Virtual drive] 499.96 GB (Shared by 4 volumes)

disk1s1 — M*********** (APFS) (Shared — 140.40 GB used)

disk1s2 — Preboot (APFS) [APFS Preboot] (Shared — 47 MB used)

disk1s3 — Recovery (APFS) [Recovery] (Shared — 513 MB used)

disk1s4 — VM (APFS) [APFS VM] (Shared — 1.07 GB used)

Mounted Volumes:

disk1s1 — M*********** 499.96 GB (357.77 GB free)

disk1s4 — VM [APFS VM] (Shared — 1.07 GB used)

Mount point: /private/var/vm

Network:

Interface lpss-serial1: LPSS Serial Adapter (1)

Interface lpss-serial2: LPSS Serial Adapter (2)

Interface en0: Wi-Fi

Interface en5: Bluetooth PAN

Interface bridge0: Thunderbolt Bridge

iCloud Quota: 61.62 GB available

System Software:

macOS Mojave 10.14.1 (18B75)

Time since boot: Less than an hour

Security:

System Status
Gatekeeper Enabled
System Integrity Protection Enabled

System Launch Agents:

[Not Loaded] 15 Apple tasks
[Loaded] 185 Apple tasks
[Running] 99 Apple tasks

System Launch Daemons:

[Not Loaded] 36 Apple tasks
[Loaded] 187 Apple tasks
[Running] 112 Apple tasks

Launch Agents:

[Running] com.adobe.AdobeCreativeCloud.plist (Adobe Systems, Inc. — installed 2018-06-14)
[Loaded] com.microsoft.update.agent.plist (Microsoft Corporation — installed 2018-11-15)
[Running] com.adobe.GC.AGM.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Not Loaded] com.adobe.AAM.Updater-1.0.plist (? ffb65062 — installed 2018-06-14)
[Running] com.malwarebytes.mbam.frontend.agent.plist (Malwarebytes Corporation — installed 2018-09-14)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)

Launch Daemons:

[Running] com.malwarebytes.mbam.rtprotection.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.malwarebytes.mbam.settings.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.adobe.agsservice.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.microsoft.OneDriveUpdaterDaemon.plist (Microsoft Corporation — installed 2018-05-23)
[Loaded] com.microsoft.autoupdate.helper.plist (Microsoft Corporation — installed 2018-11-15)
[Loaded] com.apple.installer.osmessagetracing.plist (Apple — installed 2018-10-24)
[Loaded] com.microsoft.office.licensingV2.helper.plist (Microsoft Corporation — installed 2018-05-14)
[Running] com.adobe.adobeupdatedaemon.plist (Adobe Systems, Inc. — installed 2018-06-14)

User Launch Agents:

[Loaded] com.dropbox.DropboxMacUpdate.agent.plist (Dropbox, Inc. — installed 2018-10-24)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.google.keystone.agent.plist (Google, Inc. — installed 2018-07-18)
[Running] com.spotify.webhelper.plist (Spotify — installed 2018-11-30)

User Login Items:

Dropbox.app (Dropbox, Inc. — installed 2018-11-29)

StartUpHelper (Spotify — installed 2018-07-17)

iTunesHelper.app (Apple — installed 2018-10-30)

Internet Plug-ins:

Silverlight: 5.1.50901.0 (installed 2018-09-30)

AdobeAAMDetect: 3.0.0.0 (installed 2018-06-14)

QuickTime Plugin: 7.7.3 (installed 2018-10-30)

Time Machine:

Time Machine information not available without Full Drive Access.

Performance:

System Load: 1.55 (1 min ago) 2.27 (5 min ago) 1.22 (15 min ago)

Nominal I/O speed: 10.06 MB/s

File system: 18.71 seconds

Write speed: 1959 MB/s

Read speed: 2677 MB/s

CPU Usage:

Type Overall Individual cores
System 1 % 4 % 0 % 2 % 0 % 2 % 0 % 1 % 0 %
User 2 % 5 % 0 % 3 % 0 % 3 % 0 % 1 % 0 %
Idle 97 % 90 % 100 % 94 % 100 % 96 % 100 % 98 % 100 %

Top Processes by CPU:

Process (count) Source CPU Location
genatsdb Apple 31.00 %
appstoreagent Apple 16.20 %
WindowServer Apple 7.92 %
EtreCheckPro Etresoft, Inc. 5.58 %
cloudphotosd Apple 4.58 %

Top Processes by Memory:

Process (count) Source RAM usage Location
com.apple.WebKit.WebContent (9) Apple 1.05 GB
EtreCheckPro Etresoft, Inc. 593 MB
mdworker_shared (18) Apple 509 MB
kernel_task Apple 400 MB
Spotify Helper (3) Spotify 301 MB

Top Processes by Network Use:

Process Source Input Output Location
Spotify Spotify 11 MB 321 KB
biometrickitd Apple 20 KB 167 KB
Dropbox Dropbox, Inc. 93 KB 91 KB
com.apple.iCloudHelper Apple 39 KB 8 KB
mDNSResponder Apple 25 KB 20 KB

Virtual Memory Information:

Available RAM 10.01 GB
Free RAM 6.50 GB
Used RAM 5.99 GB
Cached files 3.51 GB
Swap Used 0 B

Software Installs (past 30 days):

Name Version Install Date
Microsoft Outlook for Mac 16.16.18111001 2018-11-14
Microsoft PowerPoint for Mac 16.16.18111001 2018-11-14
Microsoft OneNote for Mac 16.16.18111001 2018-11-14
Microsoft Excel for Mac 16.16.18111001 2018-11-14
Microsoft Word for Mac 16.16.18111001 2018-11-14
Microsoft AutoUpdate 4.5.18110402 2018-11-15
HueMenu 1.9.1 2018-11-17

Diagnostics Information (past 7 days):

2018-11-30 20:54:48 Last Shutdown Cause: 3 — Hard shutdown

Источник

Service Worker FechtEvent.respondWith response имеет значение null в Safari iOS 12.1

Я могу загрузить веб-сайт с помощью службы Worker в Android Chrome, macOS Chrome, а также в Safari и в Windows Chrome для автономного использования. Когда я пытаюсь загрузить сайт на iOS 12.1 Safari, он сначала работает. Но когда я закрываю Safari, перехожу в автономный режим и снова открываю Safari, я получаю следующий сообщение об ошибке:

Error: «FetchEvent.respondWith received an error: TypeError: There seems to be no connection to the Internet.»

==== AND in the console ====

FetchEvent.respondWith received an error: Returned response is null

Ниже вы можете увидеть скрипты в текстовом виде. К сожалению, почти ничего не могу сообщить о проблеме, потому что не понимаю и надеюсь на кого-нибудь знающих 🙂

Я протестировал сценарий на нескольких iPhone (12.0, 12.0.1 (16A404), а также 12.1 (16B92)), и на всех из них я мог загрузить веб-приложение и снова открыть его в автономном режиме. В настоящее время я подозреваю, что на iPhone, у которых включены следующие настройки, у PWA есть проблемы с повторным поиском кеша: 1. Не разрешать кеш и 2. Ограниченный iphone (родительский контроль). После того, как я разрешил кешу работать, он все еще не работал. Работа. Я не мог отключить ограниченный режим, потому что владелец больше не знает код.

Я понял, что, разместив сайт через xampp и посетив его со своего телефона (iOS 12.1.1), я могу посещать его в автономном режиме. При обслуживании на моем сервере с nginx я также получаю ту же ошибку, о которой вы говорили. У меня пока нет решения, но, возможно, эта информация может вам помочь.

Вы когда-нибудь находили решение этой проблемы или в чем была проблема? Я несколько дней застревал с этой ошибкой и не нашел решения, с чего начать поиск.

Извините, до сих пор решение этой проблемы не найдено. Это случилось только на одном устройстве, поэтому я решил продолжить. Если хотите, можете попробовать перезагрузить iphone. До сих пор я предполагаю, что это сбой в конфигурации конфиденциальности в телефоне.

Источник

Ответ Service Worker FechtEvent.respondWith является нулевым на iOS 12.1 Safari

Я могу загрузить веб-сайт с помощью службы Worker на Android Chrome, macOS Chrome, а также Safari и на Windows Chrome для автономного использования. Когда я пытаюсь загрузить веб-сайт в iOS 12.1 Safari, он сначала работает. Но когда я закрываю Safari, выхожу в автономный режим и снова открываю Safari, я получаю следующее сообщение об ошибке:

Safari can’t open the Site.

Ошибка: «FetchEvent.respondWith получил ошибку: TypeError: There похоже, нет соединения с Интернетом.»

FetchEvent.respondWith получил ошибку: Returned response is null

Ниже вы можете увидеть скрипты в текстовом виде. К сожалению, я вряд ли смогу что-то сообщить о проблеме, потому что я ее не понимаю и надеюсь на знающих людей 🙂

Извините, что у меня пока нет ответа, но у меня точно такая же проблема с моим веб-приложением, и я потратил на нее несколько часов. Поэтому я хотел бы опубликовать здесь все свои выводы.

Шаги для проверки возможности работы веб-приложения в автономном режиме в iOS 12

  1. зайдите на веб-сайт в Safari (iOS 12 или 12.1)
  2. закройте вкладку веб-сайта в Safari
  3. нажмите кнопку «Домой» на iPhone, чтобы перевести Safari в фоновый режим
  4. нажмите кнопку питания iPhone, чтобы выключить экран
  5. нажмите кнопку питания iPhone еще раз, чтобы разбудить телефон
  6. отключите все сетевые подключения в центре управления iPhone (как wifi, так и сотовую связь)
  7. откройте Safari, снова зайдите на сайт -> он должен работать в автономном режиме.

iOS 12 против iOS 11.3

Похоже, что эта проблема появилась с iOS 12. Мое веб-приложение (https://viewsbyme.com) прекрасно работало в автономном режиме на iOS 11.3, в версии которой мобильный Safari впервые представил Service Worker, но получало отклики от iOS 12 и iOS 12.1 в автономном режиме:

Safari не может открыть страницу. Ошибка гласила: «FetchEvent.respondWith получил ошибку: TypeError: Интернет-соединение, похоже, находится в автономном режиме.».

Не уверен, что это связано с этим сообщением об ошибке (в нем говорится «RESOLVED FIXED», но на самом деле еще нет, если вы прокрутите страницу до самого низа):

Примеры работающих и неработающих веб-приложений

В качестве примеров эти 2 PWA могут работать в автономном режиме в iOS 12:

И эти 2 PWA не могут работать в автономном режиме в iOS 12 (но они прекрасно работают в Chrome на других платформах):

Это кажется простым делом — сравнить скрипты Service Worker между этими PWA и выяснить, что заставляет их работать, а что нет. Но я все еще не выяснил дельту.

Источник

Содержание

  1. Question: Q: fetchevent
  2. Helpful answers
  3. Safari bug #1730
  4. Comments
  5. dijonkitchen commented Oct 23, 2018 •
  6. jeffposnick commented Oct 23, 2018
  7. dijonkitchen commented Oct 24, 2018
  8. dijonkitchen commented Oct 24, 2018
  9. jeffposnick commented Oct 24, 2018
  10. NekR commented Oct 24, 2018 •
  11. jeffposnick commented Oct 24, 2018
  12. NekR commented Oct 24, 2018
  13. dijonkitchen commented Oct 24, 2018
  14. oliviertassinari commented Oct 24, 2018
  15. oliviertassinari commented Nov 6, 2018 •
  16. dijs commented Nov 14, 2018
  17. jeffposnick commented Nov 19, 2018

Question: Q: fetchevent

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

MacBook Pro TouchBar and Touch ID, macOS Mojave (10.14.1)

Posted on Nov 30, 2018 8:57 AM

Helpful answers

I don’t see any software that normally causes problems. The Safe Mode boot may have fixed the problem since you posted the site is okay. The Safe Mode will reset some caches, forces a directory check, and is a general reset.

Dec 1, 2018 2:17 AM

There’s more to the conversation

Loading page content

Page content loaded

Try going to Safari/Preferences/Privacy/Website Data and delete the cookie(s) for the site. Quit/reopen Safari and test.

Go to Safari Preferences/Extensions and turn all extensions off. Quit/reopen Safari and test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.

Try another browser as a test.

Try setting up another admin user account to see if the same problem continues. Please post back on whether or not this worked. Also try the Safe Mode. Please post back on whether or not this worked.

If it works in the Safe Mode, try running this program when booted normally and then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor. Please use copy and paste as screen shots can be hard to read. Click “Share Report” button in the toolbar, select “Copy to Clipboard” and then paste into a reply. This will show what is running on your computer. No personal information is shown.

Nov 30, 2018 10:10 AM

In the safe mode the site works perfect. Then restart and then Etre Check, see below. (But now the site is perfect . )

EtreCheck version: 5.0.9 (5A020)

Report generated: 2018-11-30 21:00:51

Download EtreCheck from https://etrecheck.com

Runtime: 1:57

Performance: Excellent

Problem: Other problem

Description:

FetchEvent.respondWith. received an error: Returned response is null. WebkitServiceWorker:0

Major Issues: None

Minor Issues:

These issues do not need immediate attention but they may indicate future problems.

Apps with heavy CPU usage — There have been numerous cases of apps with heavy CPU usage.

Heavy I/O usage — Your system is under heavy I/O use. This will reduce your performance.

Abnormal shutdown — Your machine shut down abnormally.

Limited drive access — More information may be available with Full Drive Access.

Hardware Information:

MacBook Pro (15-inch, 2016)

MacBook Pro Model: MacBookPro13,3

1 2,7 GHz Intel Core i7 (i7-6820HQ) CPU: 4-core

16 GB RAM — Not upgradeable

BANK 0/DIMM0 — 8 GB LPDDR3 2133 ok

BANK 1/DIMM0 — 8 GB LPDDR3 2133 ok

Battery: Health = Normal — Cycle count = 38

Video Information:

Intel HD Graphics 530 — VRAM: 1536 MB

Color LCD 3360 x 2100

AMD Radeon Pro 455 — VRAM: 2048 MB

Drives:

disk0 — APPLE SSD SM0512L 500.28 GB (Solid State — TRIM: Yes)

Internal PCI-Express 8.0 GT/s x4 NVM Express

disk0s1 — EFI [EFI] 315 MB

disk0s2 [APFS Container] 499.96 GB

disk1 [APFS Virtual drive] 499.96 GB (Shared by 4 volumes)

disk1s1 — M*********** (APFS) (Shared — 140.40 GB used)

disk1s2 — Preboot (APFS) [APFS Preboot] (Shared — 47 MB used)

disk1s3 — Recovery (APFS) [Recovery] (Shared — 513 MB used)

disk1s4 — VM (APFS) [APFS VM] (Shared — 1.07 GB used)

Mounted Volumes:

disk1s1 — M*********** 499.96 GB (357.77 GB free)

disk1s4 — VM [APFS VM] (Shared — 1.07 GB used)

Mount point: /private/var/vm

Network:

Interface lpss-serial1: LPSS Serial Adapter (1)

Interface lpss-serial2: LPSS Serial Adapter (2)

Interface en0: Wi-Fi

Interface en5: Bluetooth PAN

Interface bridge0: Thunderbolt Bridge

iCloud Quota: 61.62 GB available

System Software:

macOS Mojave 10.14.1 (18B75)

Time since boot: Less than an hour

Security:

System Status
Gatekeeper Enabled
System Integrity Protection Enabled

System Launch Agents:

[Not Loaded] 15 Apple tasks
[Loaded] 185 Apple tasks
[Running] 99 Apple tasks

System Launch Daemons:

[Not Loaded] 36 Apple tasks
[Loaded] 187 Apple tasks
[Running] 112 Apple tasks

Launch Agents:

[Running] com.adobe.AdobeCreativeCloud.plist (Adobe Systems, Inc. — installed 2018-06-14)
[Loaded] com.microsoft.update.agent.plist (Microsoft Corporation — installed 2018-11-15)
[Running] com.adobe.GC.AGM.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Not Loaded] com.adobe.AAM.Updater-1.0.plist (? ffb65062 — installed 2018-06-14)
[Running] com.malwarebytes.mbam.frontend.agent.plist (Malwarebytes Corporation — installed 2018-09-14)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)

Launch Daemons:

[Running] com.malwarebytes.mbam.rtprotection.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.malwarebytes.mbam.settings.daemon.plist (Malwarebytes Corporation — installed 2018-09-14)
[Running] com.adobe.agsservice.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.microsoft.OneDriveUpdaterDaemon.plist (Microsoft Corporation — installed 2018-05-23)
[Loaded] com.microsoft.autoupdate.helper.plist (Microsoft Corporation — installed 2018-11-15)
[Loaded] com.apple.installer.osmessagetracing.plist (Apple — installed 2018-10-24)
[Loaded] com.microsoft.office.licensingV2.helper.plist (Microsoft Corporation — installed 2018-05-14)
[Running] com.adobe.adobeupdatedaemon.plist (Adobe Systems, Inc. — installed 2018-06-14)

User Launch Agents:

[Loaded] com.dropbox.DropboxMacUpdate.agent.plist (Dropbox, Inc. — installed 2018-10-24)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. — installed 2018-11-02)
[Loaded] com.google.keystone.agent.plist (Google, Inc. — installed 2018-07-18)
[Running] com.spotify.webhelper.plist (Spotify — installed 2018-11-30)

User Login Items:

Dropbox.app (Dropbox, Inc. — installed 2018-11-29)

StartUpHelper (Spotify — installed 2018-07-17)

iTunesHelper.app (Apple — installed 2018-10-30)

Internet Plug-ins:

Silverlight: 5.1.50901.0 (installed 2018-09-30)

AdobeAAMDetect: 3.0.0.0 (installed 2018-06-14)

QuickTime Plugin: 7.7.3 (installed 2018-10-30)

Time Machine:

Time Machine information not available without Full Drive Access.

Performance:

System Load: 1.55 (1 min ago) 2.27 (5 min ago) 1.22 (15 min ago)

Nominal I/O speed: 10.06 MB/s

File system: 18.71 seconds

Write speed: 1959 MB/s

Read speed: 2677 MB/s

CPU Usage:

Type Overall Individual cores
System 1 % 4 % 0 % 2 % 0 % 2 % 0 % 1 % 0 %
User 2 % 5 % 0 % 3 % 0 % 3 % 0 % 1 % 0 %
Idle 97 % 90 % 100 % 94 % 100 % 96 % 100 % 98 % 100 %

Top Processes by CPU:

Process (count) Source CPU Location
genatsdb Apple 31.00 %
appstoreagent Apple 16.20 %
WindowServer Apple 7.92 %
EtreCheckPro Etresoft, Inc. 5.58 %
cloudphotosd Apple 4.58 %

Top Processes by Memory:

Process (count) Source RAM usage Location
com.apple.WebKit.WebContent (9) Apple 1.05 GB
EtreCheckPro Etresoft, Inc. 593 MB
mdworker_shared (18) Apple 509 MB
kernel_task Apple 400 MB
Spotify Helper (3) Spotify 301 MB

Top Processes by Network Use:

Process Source Input Output Location
Spotify Spotify 11 MB 321 KB
biometrickitd Apple 20 KB 167 KB
Dropbox Dropbox, Inc. 93 KB 91 KB
com.apple.iCloudHelper Apple 39 KB 8 KB
mDNSResponder Apple 25 KB 20 KB

Virtual Memory Information:

Available RAM 10.01 GB
Free RAM 6.50 GB
Used RAM 5.99 GB
Cached files 3.51 GB
Swap Used 0 B

Software Installs (past 30 days):

Name Version Install Date
Microsoft Outlook for Mac 16.16.18111001 2018-11-14
Microsoft PowerPoint for Mac 16.16.18111001 2018-11-14
Microsoft OneNote for Mac 16.16.18111001 2018-11-14
Microsoft Excel for Mac 16.16.18111001 2018-11-14
Microsoft Word for Mac 16.16.18111001 2018-11-14
Microsoft AutoUpdate 4.5.18110402 2018-11-15
HueMenu 1.9.1 2018-11-17

Diagnostics Information (past 7 days):

2018-11-30 20:54:48 Last Shutdown Cause: 3 — Hard shutdown

Источник

Safari bug #1730

Library Affected:
workbox-sw, workbox-build, etc.?

Browser & Platform:
Safari 12
macOS High Sierra 10.13.6

Issue or Feature Request Description:
Refreshing workbox PWAs (like https://material-ui.com) leads to this sometimes.

Confirmed that they work fine on Firefox, Chrome and private mode Safari.

I figured if I cleared the cache, it would help, but it doesn’t seem to kill the service workers.
Workaround is to disable service workers in Developer mode and I can load the websites properly.

The text was updated successfully, but these errors were encountered:

I just testing things out on Safari 12 on the desktop, and was not able to reproduce after navigating around to a few pages controlled by the service worker on https://material-ui.com. So, if there are any concrete reproduction steps that you’ve been able to narrow down, I’d love to dig in deeper.

In the meantime, though, I’ve noticed that you’re using a v3.0.0 pre-release version of Workbox. Workbox is up to v3.6.3 now (and we’ve got v4 alphas out), so as a first step, could you try upgrading your copy of Workbox? There were a number of improvements made throughout the v3 releases, and I’d like to at least make sure that we’re starting from the latest codebase.

Thanks @jeffposnick, I don’t control the site, so I’ll cross-post there.

@jeffposnick did you also trying refreshing pages? This should be when the Service workers do their work using the cache instead of routing through the single-page app.

Yes, I’ve tried a few times now to go through full navigations as well as page reloads and trigger any failures in Safari 12. I’ve not had any luck.

(That’s not to say that there isn’t an issue; it’s just that odd bugs can crop up in browsers’ implementations of service workers that are hard to trigger.)

This is iOS 12 Safari bug.

(It isn’t fixed in 12.0.1)

As per the initial issue report, I was working under the assumption that this was being seen on the desktop (Safari 12 / macOS High Sierra 10.13.6).

@jeffposnick hmm.. yeah, indeed. Then it must be the same bug on macOS as well because the error line is the same as on iOS when this happens.

Yes, my error was on macOS Safari. For what it’s worth, I tried it out on another laptop that recently upgraded to macOS Mojave and Safari there was fine.

We gonna start by upgrading the version of workbox on material-ui side.

We have been upgrading the version of workbox from the beta to the latest version. It hasn’t gone smoothly, a lot of people were facing cache invalidation issues. This is something that happens quite often every time we release a new version. It takes time to propagate. The cache invalidation is an important limitation of the service workers.

I’m suspecting it’s because of the next service worker waiting for its activation. Maybe there is a way to force it? At the expense of an unexpected full page reload when the user tries to refresh the page or to navigate to a different page. I will explore this path: https://developers.google.com/web/tools/workbox/guides/advanced-recipes.

Our team recently found this issue as well. Is the solution to upgrade workbox?

Our team recently found this issue as well. Is the solution to upgrade workbox?

The material-ui site was using a very outdated Workbox v3 beta, so updating was a good idea in general.

More recent versions of Workbox have had better «cache miss» fallback logic to take into account the fact that items that should be precached aren’t necessarily going to be there (due to browser bugs, or other failure scenarios), so they are more robust about at least showing something from the network when this crops up, instead of just failing to load the cached response.

But in general, my understanding is that this underlying issue a bug in Safari and is outside of Workbox’s control, and which is being tracked by the Webkit bugs linked to above.

Источник

Я могу загрузить веб-сайт с помощью службы Worker в Android Chrome, macOS Chrome, а также в Safari и в Windows Chrome для автономного использования. Когда я пытаюсь загрузить сайт на iOS 12.1 Safari, он сначала работает. Но когда я закрываю Safari, перехожу в автономный режим и снова открываю Safari, я получаю следующий сообщение об ошибке:

Safari can’t open the Site.

Error: «FetchEvent.respondWith received an error: TypeError: There
seems to be no connection to the Internet.»

==== AND in the console ====

FetchEvent.respondWith received an error: Returned response is null

Ниже вы можете увидеть скрипты в текстовом виде. К сожалению, почти ничего не могу сообщить о проблеме, потому что не понимаю и надеюсь на кого-нибудь знающих :)

index.html

<!DOCTYPE html>
<html lang = "en">
<head>
    <meta charset = "UTF-8">
    <title>Title</title>
</head>
<body>
<h1>Offline App</h1>
</body>
<script>
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('sw.js').then(function (registration) {
            console.info('Service Worker Registered');
        });
    }
</script>
</html>

sw.js

/*
 Copyright 2014 Google Inc. All Rights Reserved.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/

importScripts('cache-polyfill.js');

var CACHE_VERSION = 1;
var CURRENT_CACHES = {
    prefetch: 'prefetch-cache-v' + CACHE_VERSION
};

self.addEventListener('install', function(event) {
    var now = Date.now();

    var urlsToPrefetch = [
        '/pwa/index.html'
    ];

    console.info('Handling install event. Resources to prefetch:', urlsToPrefetch);

    event.waitUntil(
        caches.open(CURRENT_CACHES.prefetch).then(function(cache) {
            var cachePromises = urlsToPrefetch.map(function(urlToPrefetch) {
                var url = new URL(urlToPrefetch, location.href);
                url.search += (url.search ? '&' : '?') + 'cache-bust=' + now;

                var request = new Request(url, {mode: 'no-cors'});
                return fetch(request).then(function(response) {
                    if (response.status >= 400) {
                        throw new Error('request for ' + urlToPrefetch +
                            ' failed with status ' + response.statusText);
                    }

                    return cache.put(urlToPrefetch, response);
                }).catch(function(error) {
                    console.error('Not caching ' + urlToPrefetch + ' due to ' + error);
                });
            });

            return Promise.all(cachePromises).then(function() {
                console.info('Pre-fetching complete.');
            });
        }).catch(function(error) {
            console.error('Pre-fetching failed:', error);
        })
    );
});

self.addEventListener('activate', function(event) {
    var expectedCacheNames = Object.keys(CURRENT_CACHES).map(function(key) {
        return CURRENT_CACHES[key];
    });

    event.waitUntil(
        caches.keys().then(function(cacheNames) {
            return Promise.all(
                cacheNames.map(function(cacheName) {
                    if (expectedCacheNames.indexOf(cacheName) === -1) {
                        console.info('Deleting out of date cache:', cacheName);
                        return caches.delete(cacheName);
                    }
                })
            );
        })
    );
});

self.addEventListener('fetch', function(event) {
    if (!navigator.onLine) {

        event.respondWith(
            caches.match(event.request).then(function (response) {
                if (response) {

                    return response;
                }

                console.info('No response found in cache. About to fetch from network...');

                return fetch(event.request).then(function (response) {
                    console.info('Response from network is:', response);

                    return response;
                }).catch(function (error) {
                    console.error('Fetching failed:', error);
                    throw error;
                });
            })
        );
    }
});

  • Festool ka 65 ошибка 9
  • Ferrum tm 8420a ошибка е01
  • Ferroli ошибка а01 а 01 на газовом котле
  • Ferroli ошибка f35 как исправить
  • Ferroli котел ошибка а06