Chrome 69 doesn't support Firebase SDK
Asked Answered
B

5

10

Yesterday everything worked perfectly, this morning I noticed chrome is introducing a new interface, afterwards I checked the chrome version, it is now updated to v69. So far so good. I then ran my server which is linked to firebase. But I started getting this:

09:46:30.598 index.esm.js?76ac:2069 Uncaught FirebaseError {code: "messaging/unsupported-browser", message: "Messaging: This browser doesn't support the API's …he firebase SDK. (messaging/unsupported-browser).", stack: "FirebaseError: Messaging: This browser doesn't sup….0.0.0:8000/index.js?d00bc69e0c69f561d4af:2672:1)"}code: "messaging/unsupported-browser"message: "Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser)."stack: "FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).
at Object.factoryMethod [as messaging] (webpack-internal:///311:2077:32)
at FirebaseAppImpl._getService (webpack-internal:///30:134:66)
at FirebaseAppImpl.(anonymous function) [as messaging] (webpack-internal:///30:323:31)
at Object.serviceNamespace [as messaging] (webpack-internal:///30:308:32)
at eval (webpack-internal:///66:51:36)
at Object.<anonymous> (http://0.0.0.0:8000/index.js?d00bc69e0c69f561d4af:1240:1)
at __webpack_require__ (http://0.0.0.0:8000/index.js?d00bc69e0c69f561d4af:708:30)
at fn (http://0.0.0.0:8000/index.js?d00bc69e0c69f561d4af:113:20)
at eval (webpack-internal:///286:55:11)
at Object.<anonymous> (http://0.0.0.0:8000/index.js?d00bc69e0c69f561d4af:2672:1)"__proto__: Error

Long error made short: Messaging: This browser doesn't support the API's required to use the firebase SDK

Downgrading to chrome 68 is a solution, but does anyone have a better idea?

EDIT:

System information: Pop!_OS 18.04 LTS Linux (64-bit)

Chrome version: 69.0.3497.81 (Official Build) (64-bit)

Node version: v10.9.0

EDIT:

The server works just fine while deployed to production, and firefox.

Bertie answered 6/9, 2018 at 8:32 Comment(0)
S
24

This problem occurs when you are not using HTTPS or localhost. This is documented in the official documentations: source

The FCM SDK is supported only in pages served over HTTPS. This is due to its use of service workers, which are available only on HTTPS sites.

Of course, your problem was caused for using 0.0.0.0 instead of localhost.

Styria answered 22/6, 2019 at 6:17 Comment(0)
S
7

edit: https://github.com/firebase/firebase-js-sdk/issues/1220#issuecomment-421317994

Must be a problem with SSL

I was testing in Amazon S3 Bucket with no SSL..

For Now the only solution I see is checking the chrome version and disable firebase in 69.

It broke an entire app, Im working on. We using Firebase Cloud Messaging for Push Notifications , and all was well until Chrome 68.

In localhost is working, but at production not.

Updated the scripts :

https://www.gstatic.com/firebasejs/5.5.0/firebase-app.js https://www.gstatic.com/firebasejs/5.5.0/firebase-messaging.js

and no success.

funny thing: when i debug chrome

if ('Notification' in window) {
  console.log('supported'); } else {
 console.log(' not supported'); }

it says push API is supported.

Selfrenunciation answered 17/9, 2018 at 17:10 Comment(1)
according to this comment on Sep 27th: github.com/firebase/firebase-js-sdk/issues/… firebase.messaging implemented in Service Workers require HTTPS. If you need to test locally, I suggest running fire firebase serve in your project folder.Decca
B
5

SOLUTION

I was working on 0.0.0.0:8000, changed it to localhost:8000 and it worked, some would argue the huge difference, I would argue the opposite...

Bertie answered 9/9, 2018 at 9:14 Comment(0)
S
0

try the latest Firebase JS library Version 5.4.2 - August 30, 2018.

Fixed an issue where the navigator global was unavailable in some environments.

... while the NodeJS version is pretty irrelevant.

Sampling answered 6/9, 2018 at 16:21 Comment(0)
E
0

This looks like a bug/spec violation in Firefox. In the current version of Firefox Nightly (version 64), it will also throw this error.

Eucalyptol answered 7/9, 2018 at 19:40 Comment(1)
So it working on firefox is a bug in firefox? I don't think so, it worked perfectly on the previous chrome, such bug would've been caught instantly by a community of chrome and firebase combined size. Don't you agree?Bertie

© 2022 - 2024 — McMap. All rights reserved.