我尝试使用角度和Firebase云消息传递,并且逐步遵循了此示例,然后在控制台上遇到了该错误。有人可以帮忙吗? https://medium.com/@a.adendrata/push-notifications-with-angular-6-firebase-cloud-massaging-dbfb5fbc0eeb
未处理的承诺拒绝:PERMISSION_DENIED:权限被拒绝;区域:任务:WebSocket.addEventListener:message;值:错误:PERMISSION_DENIED:权限被拒绝
at index.cjs.js:13076
at exceptionGuard (index.cjs.js:690)
at Repo.push../node_modules/@firebase/database/dist/index.cjs.js.Repo.callOnCompleteCallback (index.cjs.js:13067)
at index.cjs.js:12880
at index.cjs.js:12019
at PersistentConnection.push../node_modules/@firebase/database/dist/index.cjs.js.PersistentConnection.onDataMessage_ (index.cjs.js:12052)
答案 0 :(得分:0)
如果您可以显示更多代码,这将非常有帮助
此错误是针对Firebase中的权限的,您可以阅读这篇文章
您可以尝试在Firebase中对此进行更改
{ “规则”:{ “ .read”:是的, “ .write”:true } }