Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Exporting magento customers using customer.rb gives a raise_invalid_response_error #41

Closed
chrismarkpd opened this issue Sep 20, 2018 · 6 comments
Labels
bug Something isn't working

Comments

@chrismarkpd
Copy link

chrismarkpd commented Sep 20, 2018

when trying to export magento customers using the customers.rb script, I get the following error:

response.rb:90:in raise_invalid_response_error!': Unable to parse response body: (Savon::InvalidResponseError)

It seems like the response is coming in as an entire string. I see all the customer information but it is not parsed correctly. Here's a screenshot:

soap_error

It continues to print through every customer until it hits a timeout error:

from /Users/chrismark/.rvm/gems/ruby-2.4.0/gems/savon-2.12.0/lib/savon/response.rb:72:in `find'
	from /Users/chrismark/.rvm/gems/ruby-2.4.0/gems/savon-2.12.0/lib/savon/response.rb:37:in `body'
	from customers.rb:82:in `customer_list'
	from customers.rb:67:in `block in customers_starting_with'
	from /Users/chrismark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
	from /Users/chrismark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/timeout.rb:103:in `timeout'
	from customers.rb:65:in `customers_starting_with'
	from customers.rb:59:in `base_customers'
	from customers.rb:24:in `print_customers'
	from customers.rb:12:in `run'
	from customers.rb:97:in `<main>'

orders.rb worked fine and authentication seems to work.

@fahia
Copy link
Contributor

fahia commented Sep 21, 2018

@chrismarkpd Thanks for posting this issue. I'd like to get some more information on this.
Firstly, the stack trace does not indicate a timeout error, it looks like it was an unprocessable customer returned from the response. What happens if you set the LAST_KEY_ID from the last successful customer and continue from there? Does this happen on every run? On the same customer?

Thanks

@chrismarkpd
Copy link
Author

chrismarkpd commented Sep 27, 2018

@fahia I ran it from the start and there was never a successful customer. It runs for a bit and is just a huge string with customer data. It happens on every run. I don't know if my savon gem is messed up, but it seems to work fine with orders. When I try to export it to a json file, it is blank. I've also tried the export command on customers and it gives me the same result.

@surajreddy
Copy link
Contributor

@chrismarkpd what version of Magento are you using? And do you have any extensions installed that might affect the soap output for customers?

@surajreddy surajreddy added the bug Something isn't working label Oct 3, 2018
@chrismarkpd
Copy link
Author

We're using 1.9.1.1 . We do have an extension for customers where we extended the customer attributes. I can't remember the name of the extension though.

@surajreddy
Copy link
Contributor

surajreddy commented Oct 4, 2018

Thanks @chrismarkpd!

Would it be possible for you to create a test customer and share the entire error output you see when trying to extract that customer?

With the new gem version you can extract a single customer with this command (where first_id and last_id are the id of the customer you are trying to extract):

shopify_transporter extract --object=customer --first_id=43012 --last_id=43012

I'm trying to verify whether the xml returned by your Magento instance is valid - if so, we might need to look into the gem we're using to make soap calls and investigate why it is not able to read the xml returned by Magento.

@surajreddy
Copy link
Contributor

Closing this as it's a bit old. @chrismarkpd feel free to re-open or create a new issue if you're still running into this with the current gem version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants