Brave-browser: Disable FCM (Firebase Cloud Messaging)

Created on 14 Nov 2018  路  12Comments  路  Source: brave/brave-browser

FCM (Firebase Cloud Messaging) is the successor to GCM (Google Cloud Messaging), which was disabled in https://github.com/brave/brave-browser/issues/1716

Public-facing documentation: https://firebase.google.com/docs/cloud-messaging/

As far as Chromium code is concerned, all messages are routed through Google servers, as per https://firebase.google.com/docs/cloud-messaging/server

FCM is used internally in Chromium for syncing bookmarks and other things, but it is also general purpose push messaging system which is available to untrusted JavaScript web applications, as per https://firebase.google.com/docs/cloud-messaging/js/client

We should disable all FCM support.

QNo audit-non-blocking privacconnect release-noteexclude

Most helpful comment

I want to point out that we use FCM to push real time alerts to our customers (not adds). We choose to use google infrastructure to host all our content, so FCM is a natural choice to distribute messages without much development overhead. Even with the shields down the FCM is not available, which will leave users wondering why feature does not work with brave.

In general, I see the trend here is "disable X - it's used to track" including important browser features like sendBeacon(). Please consider implications of disabling/blocking things and also make it transparent to users to what exactly is blocked. Until then I can only stop using brave as my default browser.

All 12 comments

I'm kinda confused. I've recently implemented FCM on a website of mine and the push notifications are working in Chrome, Firefox & Edge but not in Brave.
Do these changes prevent Brave from receiving push messages from FCM or even from using the Push API in general?

Or is there just a different configuration required?
I'm using the firebase client library and found that the following promise does not complete:

return swRegistration.pushManager.subscribe({
    userVisibleOnly: true,
    applicationServerKey: publicVapidKey
});

The promise is always stuck in status pending. In the other mentioned browsers it works.

UPDATE: Just tested this on Brave for Android and it's working over there.

Brave on desktop does not support FCM. Brave on Android will stop supporting it in the future.

What about the Push API?

@pilgrim-brave since we're getting a bunch of complaints about notifications apparently not working in brave, how hard is it to re-enable FCM but without direct connections to G? (either via a Brave proxy like we do with safebrowsing/etc. or just running our own FCM server)

for reference, mozilla runs their own push service for firefox https://support.mozilla.org/en-US/kb/push-notifications-firefox

I don't know offhand. FCM server is not open source. I'm not sure what Mozilla is using on the server side.

I want to point out that we use FCM to push real time alerts to our customers (not adds). We choose to use google infrastructure to host all our content, so FCM is a natural choice to distribute messages without much development overhead. Even with the shields down the FCM is not available, which will leave users wondering why feature does not work with brave.

In general, I see the trend here is "disable X - it's used to track" including important browser features like sendBeacon(). Please consider implications of disabling/blocking things and also make it transparent to users to what exactly is blocked. Until then I can only stop using brave as my default browser.

After a few hours of frustration... at least I have an explanation.

It's one thing that this feature is disabled, it's another thing that it so hard to find information on this. As developer you're basically left to your own devices when the console presents you with 'Push Service not registered'.

Ok, so there's a switch in settings to re-enable Google Messaging on Brave-dev. Ok, you really don't want us to use this in production. So, what alternative do you propose us to use?
Angular, Background Workers, what would we be able use? Enlighten us, please.

MQTT, AMQP, I dont care. Something.

cc: @rebron

There's a potential for this and similar features (ex: Remote Debugging) to present an infobar or other mechanism to point out that something was blocked (and that there is a corresponding setting in brave://settings to enable)

also see https://github.com/brave/brave-browser/issues/2408 - this is a case where it would be great to have a visual indicator that functionality is being impaired

I'm not sure why, but blocking FCM has also broken Firebase Callable Functions in Angular. Here's a comment I made for it:

https://github.com/angular/angularfire/issues/2475#issuecomment-711099922

I don't think there is much the Angular team can do to fix it since it seems the issue is on Brave itself. Now my whole app is broken in Brave since I rely on callable functions.

Was this page helpful?
0 / 5 - 0 ratings