Facing Faraday Parsing error when configuring flying sphinx

swati's Avatar

swati

Aug 06, 2013 @ 08:13 AM

I had flying sphinx configured on my Rails app and it worked it. Yesterday I removed the flying sphinx add on and again added it. After then whenever I try to configure or index flying sphinx using the command heroku run bundle exec flying-sphinx configure and heroku run bundle exec flying-sphinx index it gives me the Faraday parsing error:

Executing Action: index
/app/vendor/bundle/ruby/1.9.1/gems/json-1.7.7/lib/json/common.rb:155:in `parse': 757:    unexpected token at '403 Forbidden' (Faraday::Error::ParsingError)
from /app/vendor/bundle/ruby/1.9.1/gems/json-1.7.7/lib/json/common.rb:155:in `parse'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response/parse_json.rb:11:in `block in <class:ParseJson>'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:48:in `call'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:48:in `parse'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:39:in `process_response'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:32:in `block in call'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:63:in `on_complete'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:30:in `call'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday-0.8.7/lib/faraday/request/url_encoded.rb:14:in `call'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in `run_request'
from /app/vendor/bundle/ruby/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in `post'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:31:in `block in post'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:75:in `call'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:75:in `log'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:30:in `post'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/controller.rb:41:in `block in index'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:65:in `call'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:65:in `response'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:79:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:21:in `block in perform'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:15:in `perform'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:5:in `perform'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/controller.rb:40:in `index'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:59:in `index'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:28:in `block in run'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:26:in `each'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:26:in `all?'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:26:in `run'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-1.0.0/bin/flying-sphinx:5:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/bin/flying-sphinx:23:in `load'
from /app/vendor/bundle/ruby/1.9.1/bin/flying-sphinx:23:in `<main>'

The same error I get on configuring the flying sphinx. The gem versions Iam using are as follows:
gem 'thinking-sphinx', '3.0.3' gem 'flying-sphinx', '1.0.0'

In config/sphinx.yml
production: version: '2.0.6'

Please clear the previous logs of my heroku application in case they are creating any issue. Please help me figuring out the issue.

  1. Support Staff 1 Posted by Pat Allan on Aug 06, 2013 @ 08:22 AM

    Pat Allan's Avatar

    Hi Swati

    It seems for some reason Flying Sphinx doesn't have your app's credentials listed anymore. What's your app's name? Once I know that I can look at the database and try to figure out what's gone wrong.

    Kind regards,

    Pat

  2. 2 Posted by swati on Aug 06, 2013 @ 08:28 AM

    swati's Avatar

    Hi Pat,

    My app name is Kwaab. Please give it a look.

  3. 3 Posted by swati on Aug 06, 2013 @ 09:44 AM

    swati's Avatar

    Hi Pat,

    Any updates?? Please let me know if any other information is required to fix the issue..

  4. Support Staff 4 Posted by Pat Allan on Aug 06, 2013 @ 10:40 AM

    Pat Allan's Avatar

    Sorry for not getting back to you sooner - things are a little hectic at the moment.

    As far as I can see Flying Sphinx isn't registered for your app. Can you run `heroku config` for your app and confirm whether there's any FLYING_SPHINX_* variables? And if so, what their values are? If there's none, then you should double-check whether Heroku thinks you have the add-on enabled (`heroku addons`).

  5. Support Staff 5 Posted by Pat Allan on Aug 06, 2013 @ 11:15 AM

    Pat Allan's Avatar

    Unfortunately those details aren't in my system at all. Can you try removing the add-on and re-adding it?

  6. 6 Posted by swati on Aug 06, 2013 @ 11:40 AM

    swati's Avatar

    Hi Pat,

    Finally flying sphinx has configured and indexed without raising any
    errors. Thanks for such a quick response and helping me fix it..

    Your support rocks!! :)

    Thanks and Regards,
    Swati Aggarwal
    Ruby on Rails Developer || (www.kwaab.com) <http://www.kwaab.com/>
    Virtual Boards Technologies Pvt Ltd
    Unit-5 GF, JMD Building, Pacific Square
    Sector-15, Gurgaon-122002
    Mobile:+91-99589-66109

  7. Support Staff 7 Posted by Pat Allan on Aug 06, 2013 @ 12:13 PM

    Pat Allan's Avatar

    Great to hear it's working again :)

    Any further issues, do let me know.

Reply to this discussion

Internal reply

        No formatting (switch to Markdown)

          You can attach files up to 10MB

            If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

              Keyboard shortcuts

              Generic

              ? Show this help
              ESC Blurs the current field

              Comment Form

              r Focus the comment reply box
              ^ + ↩ Submit the comment

              You can use Command ⌘ instead of Control ^ on Mac