Chrome 69 doesn't support Firebase SDK

落花浮王杯 提交于 2019-12-03 00:40:50

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 which was correctly pointed out by Noureldean Swearky.

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...

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.

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!