Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悶] Firefox: navigator.serviceWorker is undefined #6114

Closed
sotasan opened this issue Apr 11, 2024 · 3 comments 路 Fixed by #6236
Closed

[馃悶] Firefox: navigator.serviceWorker is undefined #6114

sotasan opened this issue Apr 11, 2024 · 3 comments 路 Fixed by #6236
Assignees
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@sotasan
Copy link
Contributor

sotasan commented Apr 11, 2024

Which component is affected?

Qwik Runtime

Describe the bug

Hey,

when I visit the page in Firefox private browsing mode, it throws the error:
navigator.serviceWorker is undefined

Apparently service workers are not supported in Firefox's private browsing mode. The counter works like expected, but the error gets printed to the console regardless.

Reproduction

https://github.com/sotasan/unbiased-cherry

Steps to reproduce

  1. pnpm install
  2. pnpm build
  3. pnpm preview
  4. Open http://localhost:4173 in incognito Firefox

System Info

System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 777.31 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.2 - /opt/homebrew/bin/node
    npm: 10.5.0 - /opt/homebrew/bin/npm
    pnpm: 8.15.6 - /opt/homebrew/bin/pnpm
    bun: 1.1.3 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 123.0.6312.123
    Safari: 17.3
  npmPackages:
    @builder.io/qwik: ^1.5.2 => 1.5.2 
    @builder.io/qwik-city: ^1.5.2 => 1.5.2 
    undici: * => 6.12.0 
    vite: ^5.1.6 => 5.2.8

Additional Information

No response

@sotasan sotasan added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Apr 11, 2024
@sotasan sotasan changed the title [馃悶] navigator.serviceWorker is undefined [馃悶] Firefox: navigator.serviceWorker is undefined Apr 11, 2024
@wmertens
Copy link
Member

There's not anything we can do about this, is there? Not really a bug?

@sotasan
Copy link
Contributor Author

sotasan commented Apr 11, 2024

Well, since it appears that the Counter is working fine, a check could be implemented, to see if the serviceWorker is defined, to supress the error. But I don't know if this would bring technical incompatibilities.

@PatrickJS
Copy link
Member

I have a fix for this

@PatrickJS PatrickJS self-assigned this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants