useWebNotification not working on chrome mobile device
ibnusyawall opened this issue · comments
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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
@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
@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 ^