nuxt-community / pwa-module

Zero config PWA solution for Nuxt.js
https://pwa.nuxtjs.org
MIT License
1.24k stars 171 forks source link

Network request for <URL> threw an error: Failed to fetch #447

Closed MSkred closed 3 years ago

MSkred commented 3 years ago

"@nuxtjs/pwa": "^3.3.5", "nuxt": "^2.15.3", Capture d’écran 2021-03-30 à 13 20 02

Project url : https://herve.staging.letsgocity.be

MSkred commented 3 years ago

This error block my notification request and then I can't received it.

WARN: The FetchEvent for "https://bertrix.staging.enpoche.be/bertrix" resulted in a network error response: the promise was rejected.
ERROR: workbox-strategies.prod.js:1 Uncaught (in promise) no-response: no-response :: [{"url":"https://bertrix.staging.enpoche.be/bertrix"}]
    at Object.handle (https://cdn.jsdelivr.net/npm/workbox-cdn@5.1.4/workbox/workbox-strategies.prod.js:1:1883)
WARN: Site cannot be installed: Page does not work offline. Starting in Chrome 93, the installability criteria is changing, and this site will not be installable. See https://goo.gle/improved-pwa-offline-detection for more information.

Package.json

  "name": "lgc-pwa",
  "version": "1.0.0",
  "description": "My sensational Nuxt.js project",
  "author": "Maxime Scibetta",
  "private": true,
  "scripts": {
    "prod": "NODE_ENV=production nuxt",
    "dev": "NODE_ENV=staging nuxt",
    "host": "HOST=0 nuxt",
    "build": "NODE_ENV=production nuxt build",
    "build-staging": "NODE_ENV=staging nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate",
    "test": "ava",
    "test:unit": "cross-env TEST=unit ava --config unit.config.js",
    "test:e2e": "cross-env TEST=e2e ava --config e2e.config.js"
  },
  "dependencies": {
    "@firebase/app": "^0.6.17",
    "@nuxtjs/axios": "^5.13.1",
    "@nuxtjs/device": "^2.0.1",
    "@nuxtjs/firebase": "^7.5.0",
    "@nuxtjs/pwa": "^3.3.5",
    "aos": "^3.0.0-beta.6",
    "cookie-universal-nuxt": "^2.1.4",
    "express": "^4.17.1",
    "firebase": "^8.3.1",
    "letsgoponents": "file:../letsgoponents",
    "mapbox-gl": "^2.1.1",
    "mapbox-gl-geocoder": "^2.0.1",
    "nuxt": "^2.15.3",
    "serverless-http": "^2.7.0",
    "uuid": "^8.3.2",
    "v-calendar": "^2.3.0",
    "vue-google-autocomplete": "^1.1.1",
    "vue-spinner": "^1.0.4",
    "vue2-touch-events": "^3.2.1"
  },
  "devDependencies": {
    "@babel/runtime-corejs2": "^7.13.10",
    "@vue/test-utils": "^1.1.3",
    "ava": "^3.15.0",
    "babel-plugin-module-resolver": "^4.1.0",
    "browser-env": "^3.3.0",
    "core-js": "3",
    "node-sass": "^5.0.0",
    "require-extension-hooks": "^0.3.3",
    "require-extension-hooks-babel": "^1.0.0",
    "require-extension-hooks-vue": "^3.0.0",
    "sass-loader": "^10.1.1",
    "sass-mq": "^5.0.1",
    "vue-template-compiler": "^2.6.12"
  }
}
MSkred commented 3 years ago

All works fine with this packages version

{
  "name": "lgc-pwa",
  "version": "1.0.0",
  "description": "My sensational Nuxt.js project",
  "author": "Maxime Scibetta",
  "private": true,
  "scripts": {
    "prod": "NODE_ENV=production nuxt",
    "dev": "NODE_ENV=staging nuxt",
    "host": "HOST=0 nuxt",
    "build": "NODE_ENV=production nuxt build",
    "build-staging": "NODE_ENV=staging nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate",
    "test": "ava",
    "test:unit": "cross-env TEST=unit ava --config unit.config.js",
    "test:e2e": "cross-env TEST=e2e ava --config e2e.config.js"
  },
  "dependencies": {
    "@firebase/app": "^0.6.4",
    "@nuxtjs/axios": "^5.10.3",
    "@nuxtjs/device": "^2.0.1",
    "@nuxtjs/firebase": "^6.0.1",
    "@nuxtjs/pwa": "^3.0.0-beta.20",
    "aos": "^3.0.0-beta.6",
    "cookie-universal-nuxt": "^2.1.4",
    "express": "^4.17.1",
    "firebase": "^7.14.5",
    "letsgoponents": "file:../letsgoponents",
    "mapbox-gl": "^1.11.0",
    "mapbox-gl-geocoder": "^2.0.1",
    "nuxt": "^2.13.1",
    "serverless-http": "^2.5.0",
    "uuid": "^8.3.0",
    "v-calendar": "^1.0.6",
    "vue-server-renderer": "^2.6.12",
    "vue-spinner": "^1.0.3",
    "vue-template-compiler": "^2.6.12",
    "vue2-touch-events": "^2.2.1",
    "webpack": "^4.44.1"
  },
  "devDependencies": {
    "@babel/runtime-corejs2": "^7.10.2",
    "@vue/test-utils": "^1.0.3",
    "ava": "^2.4.0",
    "babel-plugin-module-resolver": "^4.0.0",
    "browser-env": "^3.3.0",
    "core-js": "2",
    "node-sass": "^4.14.1",
    "require-extension-hooks": "^0.3.3",
    "require-extension-hooks-babel": "^1.0.0",
    "require-extension-hooks-vue": "^3.0.0",
    "sass-loader": "^8.0.2",
    "sass-mq": "^5.0.1"
  }
}
AndrewBogdanovTSS commented 3 years ago

@MSkred can you reopen this issue? I also get this problem. Your solution of downgrading @nuxtjs/pwa to v.3.0.0-beta.20 seems to be working but it's not a real solution since we need to understand what is really causing it. Have you tried something closer to the current 3.3.5?