WooCommerceConnector icon indicating copy to clipboard operation
WooCommerceConnector copied to clipboard

Error: WooCommerce get error 401 && sync has terminated

Open asharamseervi opened this issue 3 years ago • 5 comments

Hello there,

I would like to thanks Libracore team for making this connector. I've faced some challenges as follows:

Testing on Version: Frappe & ERPNext: v13 Beta4 but the error is same on v12,11.2

wc-connector-error-401

&

wc-connector-terminated-error

I want to assure you, that this was working as expected on v13 with staging woo-commerce site, but when I tried same with production self-hosted ERPNext instance, and production site, this was producing these errors. Also, adding to note, earlier I've used native woocommerce integration that was working with same site, also tried with fresh/blank erpnext as well as having some items in erpnext.

And, aboe all, I am able to access data with get method: https://www.woocommerce-site.com/wp-json/wc/v3/orders?consumer_key=ck_0b40XXXXXXXXXXXXXXX0bXX8b&consumer_secret=cs_75f75f0a29eXXXXXXXXXX35b5fb17ac04

Can you point, what could be wrong?

asharamseervi avatar Aug 30 '20 19:08 asharamseervi

Thanks for your kind words!

401 is an access issue/permission error. Is the API accessible and are headers forwarded? We use the headers for the access details, as this is safer than uri encoding, but if the server does not forward headers, it gives you an issue.

The below error could come from a connected shop that has no products. Does it have products?

lasalesi avatar Oct 03 '20 18:10 lasalesi

@lasalesi i am also facing same issue

in get request getting error as below {"code":"woocommerce_rest_cannot_view","message":"Sorry, you cannot list resources.","data":{"status":401}}

abrarpv97 avatar Dec 01 '20 05:12 abrarpv97

same issue @lasalesi @joelios

xoojulian avatar Dec 13 '20 17:12 xoojulian

Can you please check you access permissions in WooCommerce and the key & secret? The 401 error from WooCommerce states "cannot list resources" on access permission issue - no valid access...

lasalesi avatar Jan 06 '21 07:01 lasalesi

I had this error, when I try to clone production Woocommerce and sync with ERPNext. SSL/TLS-certificates will solve this problem.

popenko-ikrok avatar Mar 14 '24 16:03 popenko-ikrok