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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useWebNotification not working on chrome mobile device #3979

Closed
7 tasks done
ibnusyawall opened this issue May 17, 2024 · 2 comments · Fixed by #3980
Closed
7 tasks done

useWebNotification not working on chrome mobile device #3979

ibnusyawall opened this issue May 17, 2024 · 2 comments · Fixed by #3980

Comments

@ibnusyawall
Copy link

Describe the bug

I have grant permission of the notification request but notification not showing on chrome browser mobile device, works perfect on chrome dekstop device only, how to solve the problem?

The error like this when im using mobile device:

TypeError: Failed to construct 'Notification': Illegal constructor. Use ServiceWorkerRegistration.showNotification() instead.

Reproduction

https://vueuse.org/core/useWebNotification/

System Info

System:
    OS: Android 11; CPH2269 Build/RP1A.200720.011

Browsers:
    Chrome: 125.0.6422.52

Used Package Manager

npm

Validations

@vladyslav-mikhieiev
Copy link

@antfu As a result, this PR spams empty push notifications on the desktop. Just go to the demo and without pressing the button we will see 2 push notifications

@KarolMilewski
Copy link

@antfu As a result, this PR spams empty push notifications on the desktop. Just go to the demo and without pressing the button we will see 2 push notifications

I confirm. We have the same problem ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants