阿尔及利亚搜索网络错误 [英] Algolia Search Network Error

查看:107
本文介绍了阿尔及利亚搜索网络错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将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.com 5sffby8as8-1.algolianet.com:443

AlgoliaSearchNetworkError: getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet.com 5sffby8as8-1.algolianet.com: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.

这篇关于阿尔及利亚搜索网络错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆