我正在将Algolia与我拥有的Firebase项目联系起来。我使用Firebase Cloud Functions是为了使Algolia索引与Firebase数据库中发生的所有更改保持同步。但是每当我从Firebase Cloud Functions内部调用
I'm connecting Algolia with a Firebase project I have. I'm using the Firebase Cloud Functions in order to keep my Algolia index synced with all changes that occur in my Firebase database. But whenever I call
index.saveObject(firebaseObject);
index.saveObject(firebaseObject);
时,我都会得到
AlgoliaSearchNetworkError:getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet 5sffby8as8-1.algolianet:443
AlgoliaSearchNetworkError: getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet 5sffby8as8-1.algolianet:443
我可以在Firebase Functions外部(仅在我自己的计算机上)运行同步操作。这段代码是通过node.js在javascript文件中运行的。
I can run the syncing operation just fine outside of Firebase Functions (just on my own machine). This code is run in a javascript file through node.js.
我在我的任何搜索中都没有找到关于此的任何当前问题或答案。有任何想法或帮助吗?
I haven't found any current questions or answers about this in any of my searches. Any ideas or help?
推荐答案我发现Firebase(我正在使用的自由层)上的Spark计划没有不允许对第三方API的出站请求。我必须升级到其中一个付费计划(Flame或Blaze)才能从Firebase Cloud Functions中连接到Algolia网络。
I found out that the Spark plan on Firebase (the free-tier that I was using) doesn't allow outbound requests to 3rd-party APIs. I had to upgrade to one of the paid plans (Flame or Blaze) to be able to connect to the Algolia network from within the Firebase Cloud Functions.
其中包括一个警告在其入门指南中。
A caveat was included in their getting started guide.
更多推荐
阿尔及利亚搜索网络错误
发布评论