- Notifications
You must be signed in to change notification settings - Fork 590
Description
After the following issue with GCM: #4078
And the subsequent fix/commit in order to disable GCM: 5615eb9
The puhshManager is not working anymore. As it depends on the GCM connection to subscribe the browser to the webpage and the GCM connection is not working, it's not possible to use the web push notifications anymore.
It doesn't even return anything, because the GCM client stays in an "INITIALIZED" state forever, so the "pushManager.subscribe()", being an async method, returns an empty promise, that wont resolve nor throw an error.
Steps to reproduce the bug behavior:
- Download latest CEF (146/147)
- Build cefclient
- Open cefclient and go to this url: chrome://gcm-internals/
- See that:
GCM Client State | INITIALIZED
Connection Client Created | false - Go to the following url: https://simple-push-demo.vercel.app/
- Try to Enable the push notification. Accept Notification permissions.
- The subscription fails but there's no error.
To reproduce the expected behavior:
- Download CEF 143 (before the commit that disabled the GCM)
- Build cefclient
- Open cefclient and go to this url: chrome://gcm-internals/
- See that:
GCM Client State | READY
Connection Client Created | true - Go to the following url: https://simple-push-demo.vercel.app/
- Enable push notifications. Accept Notification permissions.
- Send push notifications correctly to cefclient.exe.
Versions
- OS: Windows 10
- CEF Version with bug: 144, 145, 146, 147
Additional context
The problem is present in both, cefclient and cefsimple, since version 144 (to 147). Also, in version 143, both clients works fine and just as expected. Chromium/Chrome 143, 144, 145 and 146 also works just as expected.
Clearly, the fix to avoid the start of the GCM client is broking the whole pushManager.subscribe functionality, because there's no client nor a server to subscribe to.
The main issue is that this fix is a build patch, so it's something that can't be undone in runtime.
Maybe modify the fix to do it only when a --disable-GCM switch is passed?