Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Update Shopify Gem from v9 to v10+ - Error when retreiving an order - Expected type is HTTParty:

Solved

Update Shopify Gem from v9 to v10+ - Error when retreiving an order - Expected type is HTTParty::

Bseido
Shopify Partner
11 1 3

I have a private app and I am trying to update my ruby gem from 9.x to 11.x
I can do the ShopifyAPI::Context.setup (no error), however, when I am trying to get and Order with ShopifyAPI::Order.find(id:order_id), I have the following error : 

Traceback (most recent call last):
        1: from (irb):3
TypeError (T.cast: Expected type HTTParty::Response, got type HTTParty::Response with value #<HTTParty::Response:0xb101..., h3-29=\":443\"; ma=86400"]}>)

The expected type and received object type have the same name but refer to different constants.
Expected type is HTTParty::Response with object id 75104120, but received type is HTTParty::Response with object id 75104120.

There might be a constant reloading problem in your application.
Caller: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/shopify_api-11.1.0/lib/shopify_api/clients/http_client.rb:43

The object id changes, depending on the call, but they are always the same in the message 
 "Expected type is HTTParty::Response with object id XXXX, but received type is HTTParty::Response with object id XXXX."

 

Also I am trying it with the rails console (if that matters)

 

Does anyone know why there is this error and how can I correct it ?

 

Thanks

Accepted Solution (1)
nando65
Visitor
2 1 2

This is an accepted solution.

I fixed it by downgrading httparty to version 0.18.1 

View solution in original post

Replies 3 (3)

nando65
Visitor
2 1 2

I have the same issue

nando65
Visitor
2 1 2

This is an accepted solution.

I fixed it by downgrading httparty to version 0.18.1 

Bseido
Shopify Partner
11 1 3

That did the trick

 

Thanks