Skip to content

pushManager.subscribe() (Push Notifications) not working with GCM disabled. #4138

@arteves

Description

@arteves

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:

  1. Download latest CEF (146/147)
  2. Build cefclient
  3. Open cefclient and go to this url: chrome://gcm-internals/
  4. See that:
    GCM Client State | INITIALIZED
    Connection Client Created | false
  5. Go to the following url: https://simple-push-demo.vercel.app/
  6. Try to Enable the push notification. Accept Notification permissions.
  7. The subscription fails but there's no error.

To reproduce the expected behavior:

  1. Download CEF 143 (before the commit that disabled the GCM)
  2. Build cefclient
  3. Open cefclient and go to this url: chrome://gcm-internals/
  4. See that:
    GCM Client State | READY
    Connection Client Created | true
  5. Go to the following url: https://simple-push-demo.vercel.app/
  6. Enable push notifications. Accept Notification permissions.
  7. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions