nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Push notifications not working in webview

Open Virius opened this issue 7 years ago • 3 comments

Hi.

I have problems with push notifications for some sites which using it if open them (sites) in webview. If sites opened in nw.js without webview all working fine.

NWJS Version : 0.26.6 Operating System : Windows 10, MacOS 10.12

Expected behavior

push notification is shown

Actual behavior

push notification is not shown

How to reproduce

package.json

{
  "name": "test",
  "main": "index.html",
  "version": "1.0.1",
  "chromium-args": "--enable-gcm"
}

index.html

<body>
  <webview id="webview" partition="persist:test" src="https://facebook.com"></webview>
</body>

It is assumed that notifications are switch on inside facebook (here).

If open facebook.com without webview, all work fine, i.e. package.json:

{
  "name": "test",
  "main": "https://facebook.com",
  "version": "1.0.1",
  "chromium-args": "--enable-gcm"
}

Why?

P.S. I check this problem on v0.27.5 but get error in dev console of webview:

ErrorUtils caught an error: "Failed to register a ServiceWorker: IPC connection was closed or IPC error ha...". Subsequent errors won't be logged; see https://fburl.com/debugjs. H @ s7-5se_RG_J.js:51

and serviceWorker of website in that case was not created

Virius avatar Jan 23 '18 12:01 Virius

I can reproduce this issue on Linux/Windows with nwjs-sdk-v0.28.0.

Christywl avatar Jan 25 '18 05:01 Christywl

any updates on this issue?

Virius avatar Feb 05 '18 07:02 Virius

still not working, only iframe with nwfaketop

DanteZZ avatar Sep 14 '25 18:09 DanteZZ