WooCommerce.NET icon indicating copy to clipboard operation
WooCommerce.NET copied to clipboard

Error Getting orders

Open Mick-V8 opened this issue 5 years ago • 2 comments

Hi, our customers use our application to get order from their websites. It uses WC.NET to get all orders that are in a processing state in the past 5 days. It works fine in all situations except one, where we are getting the following error: Exception in WC API Wrapper GetAllOrdersParams: Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''.
at ReadArrayOfOrderFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )

This happens each time its run from the customers site, but works fine if I run it from my PC and it extracts orders .

My first thought was that the response was being corrupted or blocked by a firewall, AV software or similar IT policy issues, but we whitelisted IPs, opened ports, disabled AV etc., all without any success.

If Postman is used to get orders in a processing state in the past 5 days it works fine from both locations.

The message doesn't give any indication of what the issue might be, so anything you can point me to would be helpful.

  • Wordpress version is 5.5.1 , WooCommerce version is 4.4.1 and WooCommerce.NET version is 0.7.8

Many thanks

Mick

Mick-V8 avatar Sep 03 '20 10:09 Mick-V8

Hi Mick, set RestAPI.Debug to true, the json string will be included in the error message, then you can check what was wrong with the json string.

XiaoFaye avatar Sep 04 '20 02:09 XiaoFaye

I now get Invalid URI: The Authority/Host could not be parsed.' Any ideas?

BenParr64 avatar Sep 23 '21 21:09 BenParr64