-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Algolia::AlgoliaHttpError after upgrade to 2.0.0 #397
Comments
Okay, so I dug a little bit and it seems like something goes wrong when trying to view or change the settings. So I tried adding all the necessary ACLs to my API key, but that didn't work. Adding Calling NoMethodError: undefined method `map' for nil:NilClass
from /Users/marc/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/algoliasearch-rails-2.0.0/lib/algoliasearch-rails.rb:689:in `algolia_search' It turns out the code is trying to access |
Found this:
Adding |
Update: I still get the I thought setting |
AlgoliaSearch.client.instance_variable_get("@config").default_hosts.first.url
=> "MYAPPID-dsn.algolia.net" Looks like it's using a DSN host by default. Those are indeed read-only. Any idea why it would use that? |
I think I found a bug in the Ruby client. # algolia-2.0.4/lib/algolia/http/http_requester.rb
# Line 67
def connection(host)
@connection ||= Faraday.new(build_url(host)) do |f|
f.adapter @adapter.to_sym
end
end At some point in the code That host is then passed to this However, because this method memoizes Since this seems like a bug with the ruby client, I will cross-post an issue there. |
Description
I just upgraded to 2.0.0 of this gem and am now receiving the following exception when doing a search:
Steps To Reproduce
The
algolia
gem seems to work fine. For comparison:Credentials
I double checked the credentials and even tried creating new ones with the right privileges. That didn't help. But as you can see in the
algolia
code example the credentials do indeed seem valid.Versions
6.1.3.1
algoliasearch-rails (2.0.0)
algolia (2.0.4)
ruby 2.7.2p137
The text was updated successfully, but these errors were encountered: