Algolia Search Network Error

倾然丶 夕夏残阳落幕 提交于 2019-12-19 06:41:37

问题


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);

from inside my Firebase Cloud Functions, I get

AlgoliaSearchNetworkError: getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet.com 5sffby8as8-1.algolianet.com:443

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?


回答1:


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.



来源:https://stackoverflow.com/questions/43416762/algolia-search-network-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!