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

serviceWorkerRegistration.showNotification does not work #13041

Open
dregenor opened this issue May 22, 2018 · 15 comments
Open

serviceWorkerRegistration.showNotification does not work #13041

dregenor opened this issue May 22, 2018 · 15 comments

Comments

@dregenor
Copy link

  • Electron Version: 1.8.x - 2.x
  • Operating System (Platform and Version): Win, Linux, MacOSX
  • Last known working Electron version: no

Expected Behavior
notification should be shown

Actual behavior
notification not shown

To Reproduce
here example: https://github.com/dregenor/showNotification.git

  1. clone,
  2. npm install,
  3. npm start
    click "Show Notification"
$ git clone https://github.com/dregenor/showNotification.git -b master
$ npm install
$ npm start

in browser all works fine.
example:

  1. open src folder and start simpleHttp server
python -m SimpleHTTPServer 8080
  1. open in Google Chrome http://127.0.0.1:8080
  2. press "Show Notification" button

result:
image

@yuhongda0315
Copy link

遇到了,同样的问题, Electron 2.0.2 也是如此~

@mmaietta
Copy link

mmaietta commented Jun 7, 2018

+1. Experiencing this issue on 1.8

@felipemullen
Copy link

felipemullen commented Feb 5, 2019

I can confirm this is still a problem in electron 4.0.4 on MacOS 10.14 using the example repository above

@chenerzhang
Copy link

There are any updates?

@daltonmenezes
Copy link

Same behavior on Electron v.5.0.6, v6.0.0-beta12, v7.0.0-nightly.

self.registration.showNotification('test')

does nothing, but works in Chrome.

@sofianguy sofianguy added this to Unsorted Issues in 5.0.x Aug 9, 2019
@sofianguy sofianguy added this to Unsorted Issues in 6.1.x Aug 9, 2019
@zhenyakovalyov
Copy link

is there any update on this please?

@joaomlemos
Copy link

Same behavior with Electron v9.0.4.

Any update or a possible ETA ?

@nornagon
Copy link
Member

Electron doesn't currently support persistent notifications. We would consider PRs that added support, but have no plans to work on it in the immediate future.

See e.g.

// Electron doesn't support persistent notifications.

@joshua-redmond
Copy link

Still the same in Electron v11.1.1

I'd love it if this was implemented.

It'd mean I'd be able to create notifications with buttons which you can only do from a service worker.

@Raybao
Copy link

Raybao commented Feb 2, 2021

Please implement this! We have to drop election otherwise.

@Eugeny
Copy link

Eugeny commented Mar 17, 2021

@Raybao are you seriously threatening to not use Electron in a project that's so serious that you can afford to change its core framework?

@cvl
Copy link

cvl commented Mar 22, 2021

One of the most basic and most critical features. Not possible to create serious apps otherwise.

@Aarbel
Copy link

Aarbel commented Mar 29, 2021

👍 please electron team, add this api

@jpschw
Copy link

jpschw commented Jun 23, 2021

Is there a way we can add a shim that will override this and forward the notification to the regular Notification api?

@johannesjo
Copy link

Still would love to see this! I might give it a go, but I don't expect to get far, since I don't know any C++, nor have any experience with Chromium development. Since this is implemented in Chromium, I am hoping that some elaborate copy&pasta might be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
5.0.x
Unsorted Issues
6.1.x
Unsorted Issues
Development

No branches or pull requests