Angular2中的Firebase云消息传递
发布时间:2020-12-17 17:00:47 所属栏目:安全 来源:网络整理
导读:在angular2应用程序中允许权限时发生以下错误.我正在使用最新版本的角度cli. The script has an unsupported MIME type ('text/html').https://epush.in/firebase-messaging-sw.js Failed to load resource: net::ERR_INSECURE_RESPONSEmain.b757377….bundl
在angular2应用程序中允许权限时发生以下错误.我正在使用最新版本的角度cli.
The script has an unsupported MIME type ('text/html'). https://epush.in/firebase-messaging-sw.js Failed to load resource: net::ERR_INSECURE_RESPONSE main.b757377….bundle.js:30496 permission An error occurred while retrieving token. V {code: "messaging/failed-serviceworker-registration",message: "Messaging: We are unable to register the default s…). (messaging/failed-serviceworker-registration).",browserErrorMessage: "Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html').",stack: "FirebaseError: Messaging: We are unable to registe…in/main.b7573773d12a16423658.bundle.js:1572:3907)"} 解决方法
如果您在浏览器中加载“/firebase-messaging-sw.js”,您是否看到了JavaScript文件或其他内容?听起来这个URL可能会返回一个HTML页面(可能是404错误)?
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |