shopify-api-ruby: Product.find failing as of this morning
Has anyone seen this pattern of failure
ShopifyAPI::Product.find(:all) NoMethodError: undefined method `path’ for nil:NilClass
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:587:in `prefix'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:597:in `prefix_source'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:951:in `prefix_parameters'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:966:in `block in split_options'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:964:in `each'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:964:in `split_options'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1453:in `split_options'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1256:in `load'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1006:in `initialize'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1272:in `new'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1272:in `block (2 levels) in load'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1269:in `map'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1269:in `block in load'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1264:in `each'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1264:in `load'
from /app/vendor/bundle/ruby/2.2.0/gems/activeresource-3.2.22/lib/active_resource/base.rb:1006:in `initialize'
It seems to have started failing today.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (2 by maintainers)
Just tried with the pre-patched code and it appears to be working correctly again 😃
@jchen123 we’ve managed to figure out the issue. We are using an older version of the gem. Updating the code based on the following commit fixed it for us: https://github.com/Shopify/shopify_api/commit/bf30a216d0e95455dc62ca6f6ee5b909d8665110#diff-a10d97818183c1ece6a29c9702b22e62
No worries @woods. We actually spent half the day removing the Shopify API gem from our app and manually coding the API calls then figured it was just this line of code. Fun!
@woods same boat as you. i’m confused as to what exactly broke today though. they didn’t announce any API changes, but it must be something about the API response that breaks the older gems.
It looks like this breaks any apps that are still running on shopify_app 6.x, since that major version locks shopify_api to ~> 4.0.2:
https://github.com/Shopify/shopify_app/blob/91779932f3bbb1d755bbf1f23b31c3e3de3e6d5e/shopify_app.gemspec#L13
@sebastyuiop how did you work around this? It sounds like you were able to somehow incorporate that change without doing a major upgrade of your shopify app/api gems. Is that correct?