Giter VIP home page Giter VIP logo

Comments (11)

tberk avatar tberk commented on July 18, 2024 1

I'm beginning to suspect this might be some sort of peculiar UI bug or something similar. Aside from that check, I don't encounter any issues with PWA.

In addition to incognito mode, PWA testing tools also appear to be successful.

I've used the "Clear Site Data" function along with other methods to try and clear site data, but the start_url still isn't visible on either my Edge or Chrome browsers. However, I am ready to overlook this issue for now as it doesn't cause anything that I noticed.

Thank you for your responses, @userquin.

from nuxt.

userquin avatar userquin commented on July 18, 2024

Check if sw.js and manifest webmanifest are there, latter should be served with custom content type (https://github.com/vite-pwa/nuxt/blob/main/src/module.ts#L159), try enabling https://github.com/vite-pwa/nuxt/blob/main/src/types.ts#L47 in nuxt pwa options

from nuxt.

tberk avatar tberk commented on July 18, 2024

I am also having this issue with the lighthouse, I always get the "Does not register a service worker that controls page and start_url" error. I have deployed on Plesk and Vercel both same.

Application tab looks normal:
ss

from nuxt.

userquin avatar userquin commented on July 18, 2024

@crunchwrap89 @tberk can you test adding client.registerWebManifestInRouteRules = true in pwa options?

Check the local build using "NITRO_PRESET=vercel in the build script: https://github.com/vite-pwa/nuxt/blob/main/package.json#L41

from nuxt.

tberk avatar tberk commented on July 18, 2024
  • Build logs on vercel says: "Running "vercel build""
  • Tried adding registerWebManifestInRouteRules: true to pwa config.

Still getting the same error. I also tested on dev, it detects start_url fine there, no problem.

pwa: {
    registerType: 'autoUpdate',
    registerWebManifestInRouteRules: true,
    manifest: {
      name: 'appname',
      short_name: 'appname',
      description: 'Some description.',
      theme_color: '#fff',
      icons: [
        {
          src: 'pwa/pwa-64x64.png',
          sizes: '64x64',
          type: 'image/png',
        },
        {
          src: 'pwa/pwa-192x192.png',
          sizes: '192x192',
          type: 'image/png',
        },
        {
          src: 'pwa/pwa-512x512.png',
          sizes: '512x512',
          type: 'image/png',
          purpose: 'any',
        },
        {
          src: 'pwa/maskable-icon-512x512.png',
          sizes: '512x512',
          type: 'image/png',
          purpose: 'maskable',
        },
      ],
    },
    workbox: {
      navigateFallback: null,
      globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
    },
    client: {
      installPrompt: true,
    },
    devOptions: {
      enabled: true,
      suppressWarnings: true,
      navigateFallbackAllowlist: [/^\/$/],
      type: 'module',
    },
  },

from nuxt.

userquin avatar userquin commented on July 18, 2024

@tberk can you share the url?

from nuxt.

tberk avatar tberk commented on July 18, 2024

Sure, I sent an email to you with the link.

btw, I noticed something, If I test in Incognito mode all checks seem fine, it shows start_url.

from nuxt.

userquin avatar userquin commented on July 18, 2024

Are you using nuxi generate or nuxi build? On my local when running nuxi build, it is generating config.json, but missing when using nuxi generate (with repo playground, I've sent a DM to Daniel Roe):

imagen

from nuxt.

userquin avatar userquin commented on July 18, 2024

btw, I noticed something, If I test in Incognito mode all checks seem fine, it shows start_url.

This is weird, tested you app in private browsing and it is working, I'll check it in normal browsing and review the headers...

In the mean time, check out https://vite-pwa-org.netlify.app/deployment/, the sw is quite sensible...

from nuxt.

userquin avatar userquin commented on July 18, 2024

@tberk seems working, http headers properly configured by Nuxt, can you remove storage including (check Unregister service worker) service worker from Dev Tools > Application > Storage > Clear site data button?

imagen

imagen

from nuxt.

userquin avatar userquin commented on July 18, 2024

it is working properly also with lighthouse in normal browsing:

imagen

from nuxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.