通过 FCM 发送消息时,Firebase 管理员点击的 IP 或网址是多少?



我在尝试发送 FCM 通知时遇到问题。 我认为这是由于服务器限制对外部的访问。 我需要知道的是,Firebase管理员为身份验证或发送fcm而命中的URL或IP是什么? 因为错误消息中的 IP 似乎总是在更改。

Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Error while making request: connect EHOSTUNREACH 172.217.194.84:443. Error code: EHOSTUNREACH"."}
(node:18224) UnhandledPromiseRejectionWarning: Error: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Error while making request: connect EHOSTUNREACH 172.217.194.84:443. Error code: EHOSTUNREACH".
at FirebaseAppError.FirebaseError [as constructor] (/home/administrator/node/FCMService/node_modules/firebase-admin/lib/utils/error.js:42:28)
at FirebaseAppError.PrefixedFirebaseError [as constructor] (/home/administrator/node/FCMService/node_modules/firebase-admin/lib/utils/error.js:88:28)
at new FirebaseAppError (/home/administrator/node/FCMService/node_modules/firebase-admin/lib/utils/error.js:122:28)
at /home/administrator/node/FCMService/node_modules/firebase-admin/lib/firebase-app.js:121:23
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:18224) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:18224) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

用于发送消息的主机名以fcm.googleapis.com开头,通常通过 HTTPS 访问。对于此类情况,了解Firebase Admin SDK是开源的确实很有帮助,并且Node.js SDK的相关代码在这里。

相关内容

  • 没有找到相关文章

最新更新