Closed mdmoore closed 3 years ago
Also having the same issue, when making any updates to the product sets to try and correct the sync log shows a 500 error (all other sync requests work fine, this is the only one that returns an error):
Example:
Request uri: https://graph.facebook.com/v9.0/163504019169758 body: Array ( [name] => All Items [filter] => {"or":[{"retailer_id":{"eq":"WM-DB-SCL-XXS-1-1_1153"}},{"retailer_id":{"eq":"WM-DB-SCL-XS-1-1_1154"}},{"retailer_id":{"eq":"WM-DB-SCL-S-1-1_1155"}},{"retailer_id":{"eq":"WM-DB-SCL-M-1-1_1156"}},{"retailer_id":{"eq":"WM-DB-SCL-L-1-1_1157"}},{"retailer_id":{"eq":"WM-DB-SCL-XL-1-1_1158"}},{"retailer_id":{"eq":"wc_post_id_1152"}},{"retailer_id":{"eq":"wc_post_id_1143"}},{"retailer_id":{"eq":"wc_post_id_1122"}},{"retailer_id":{"eq":"ladies-socks_1227"}},{"retailer_id":{"eq":"wc_post_id_1213"}},{"retailer_id":{"eq":"wc_post_id_1206"}},{"retailer_id":{"eq":"wc_post_id_1196"}},{"retailer_id":{"eq":"wc_post_id_1189"}},{"retailer_id":{"eq":"wc_post_id_1170"}},{"retailer_id":{"eq":"wc_post_id_1161"}},{"retailer_id":{"eq":"wc_post_id_486"}},{"retailer_id":{"eq":"wc_post_id_483"}},{"retailer_id":{"eq":"wc_post_id_469"}},{"retailer_id":{"eq":"wc_post_id_467"}},{"retailer_id":{"eq":"wc_post_id_440"}},{"retailer_id":{"eq":"wc_post_id_432"}},{"retailer_id":{"eq":"wc_post_id_424"}},{"retailer_id":{"eq":"wc_post_id_415"}}]} [metadata] => {"description":""} ) headers: Array ( [Authorization] => **** ) timeout: 500 method: POST
For all new product sets created, set is created on Facebook but only one product ever appears in the set.
This actually seems to work now with the latest 2.6.4 release.
I had to delete all my Product Sets in Facebook for Woocommerce. After creating them i see the plugin call product_sets
endpoint and the sets appear in my shop with (i think) all the correct products in them!
We received a comment on the forums, which seems to suggest that an incorrect endpoint may be called when "Product sets" are updated:
09-01-2021 @ 00:15:15 - Request
Request
method: POST
uri: https://graph.facebook.com/v11.0/179312622691973/items_batch
user-agent: Facebook-for-WooCommerce/2.6.4 (WooCommerce/5.6.0; WordPress/5.8)
headers: Array
(
[Authorization] => ************************************************************************************************************************************************************************************************
[content-type] => application/json
[accept] => application/json
)
body: {"allow_upsert":true,"requests":[...],"item_type":"PRODUCT_ITEM"}
@jaredkotoff From this comment, it looks like you created that forum thread! Thanks for sharing your findings.
I have tested with the latest version and my sets synchronize correctly. I am closing for now. please reopen if any other failing example is found.
I am having the same issue. My categories are set correctly, I have tried the solution mentioned but no luck. `timeout: 500 method: POST
10-30-2021 @ 15:32:04 - Response Response code: 400 message: Bad Request headers: Array ( [content-encoding] => gzip [vary] => Array ( [0] => Origin [1] => Accept-Encoding )
[x-business-use-case-usage] => {"284675096863693":[{"type":"catalog_management","call_count":1,"total_cputime":1,"total_time":1,"estimated_time_to_regain_access":0}]}
[x-fb-rlafr] => 0
[content-type] => application/json; charset=UTF-8
[www-authenticate] => OAuth "Facebook Platform" "invalid_request" "Product set with the same filters already exists"
[access-control-allow-origin] => *
[facebook-api-version] => v11.0
[strict-transport-security] => max-age=15552000; preload
[pragma] => no-cache
[cache-control] => no-store
[expires] => Sat, 01 Jan 2000 00:00:00 GMT
[x-fb-request-id] => Amov-3PcVSe1LtK9jpLiYbC
[x-fb-trace-id] => AQigyhNRfug
[x-fb-rev] => 1004649410
[x-fb-debug] => cS9gRt3NAtTQVtAOSth8zti7shUJbxML8/JqGkZCVcHbqbe5sx5fdlC9PSOP4tfO+5KZQb4qjIPbN2K6Yx4wKA==
[date] => Sat, 30 Oct 2021 10:02:04 GMT
[priority] => u=3,i
[alt-svc] => h3=":443"; ma=3600, h3-29=":443"; ma=3600,h3-27=":443"; ma=3600
[content-length] => 272
) body: {"error":{"message":"Product set with the same filters already exists","type":"OAuthException","code":10803,"error_data":{"product_set_id":"939644479980778"},"error_subcode":1798073,"is_transient":false,"error_user_title":"Duplicate product set already exists","error_user_msg":"Error when you try to create a product set when a product set with a duplicate filter already exists","fbtrace_id":"Amov-3PcVSe1LtK9jpLiYbC"}}`
Hi. I am the owner of the original site that reported the issue. I can confirm that the issue still persists. Today I went back to it to see if anything had changed with newer versions of the plugin coming out. The behavior is the same. Sets are not synced.
I deleted a set that I had in WooCommerce and recreated it. The response in the log was this.
11-07-2021 @ 10:48:29 - Request uri: https://graph.facebook.com/v11.0/?allow_live_product_set_deletion=true timeout: 500 method: DELETE
11-07-2021 @ 10:48:29 - Response code: 400 message: Bad Request body: {"error":{"message":"Unsupported delete request. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"AsquabkrTSBv5IbcqqUIcoq"}}
11-07-2021 @ 10:48:29 - 11-07-2021 @ 10:48:29 - {"headers":{},"body":"{\"error\":{\"message\":\"Unsupported delete request. Please read the Graph API documentation at https:\\/\\/developers.facebook.com\\/docs\\/graph-api\",\"type\":\"GraphMethodException\",\"code\":100,\"error_subcode\":33,\"fbtrace_id\":\"AsquabkrTSBv5IbcqqUIcoq\"}}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}}
@dagurdagsson did you delete it also on FB side? Start with no category on either and then let WooCommerce create the category on FB for you. That was the missing piece for me.
@jaredkotoff I just tried that now. DidnΒ΄t work.
The response when creating a new FB set in Woocommerce is this: 11-08-2021 @ 12:11:55 - Request uri: https://graph.facebook.com/v11.0/?allow_live_product_set_deletion=true timeout: 500 method: DELETE
11-08-2021 @ 12:11:55 - Response code: 400 message: Bad Request body: {"error":{"message":"Unsupported delete request. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"AxHRV99phloFOIz0pUXpVe3"}}
11-08-2021 @ 12:11:55 - 11-08-2021 @ 12:11:55 - {"headers":{},"body":"{\"error\":{\"message\":\"Unsupported delete request. Please read the Graph API documentation at https:\\/\\/developers.facebook.com\\/docs\\/graph-api\",\"type\":\"GraphMethodException\",\"code\":100,\"error_subcode\":33,\"fbtrace_id\":\"AxHRV99phloFOIz0pUXpVe3\"}}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}}
I also wanΒ΄t to point out one thing that there was some confusion. Talking with plugin support they insisted that WooCommerce categories were not transferred to FB-Commerce. Well. If I go into FB Business to create a set manually my WooCommerce categories are present as filter values.
Well, Off to creating the sets manually again :)
@dagurdagsson Hi!
I have a question. In the example request: have you edited ( deleted ) the set id manually before pasting it to the GH?
The request https://graph.facebook.com/v11.0/?allow_live_product_set_deletion=true
is not a valid request because it does not have set id. This would indicate a logic problem inside the plugin. I was not able to find a way that this type of request could happen so please confirm if this is what you see or it was edited to omit the id. If it was not edited then I need to look further.
@budzanowski No. It was pasted directly from the Woo FB log without any interference from me.
@dagurdagsson,
That is very strange. Could you please delete the log file ( to start afresh log ) and then first create and then delete a category. Make sure that the categories that are used for creating the product sets have valid and published products ( are those products simple or variation ? ). And then copy and paste the whole content of the log file.
Your case is very strange. I really want to debug and help but so far I don't see what is causing the error that you are experiencing.
One thing to mention is that if you have a set created already in FB and now you are trying to create exactly the same set using the plugin the procedure will fail. This is what @jaredkotoff has observed.
Best Regards
@budzanowski as it stands now there are no sets on the FB side. The creation of a FB set in Woo returns the error below. Deleting it in doesnΒ΄t return anything in the log.
11-09-2021 @ 12:14:06 - Request uri: https://graph.facebook.com/v11.0/?allow_live_product_set_deletion=true timeout: 500 method: DELETE
11-09-2021 @ 12:14:06 - Response code: 400 message: Bad Request body: {"error":{"message":"Unsupported delete request. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"APuNG56Vg7uiifbM0RyliCu"}}
11-09-2021 @ 12:14:06 - 11-09-2021 @ 12:14:06 - {"headers":{},"body":"{\"error\":{\"message\":\"Unsupported delete request. Please read the Graph API documentation at https:\\/\\/developers.facebook.com\\/docs\\/graph-api\",\"type\":\"GraphMethodException\",\"code\":100,\"error_subcode\":33,\"fbtrace_id\":\"APuNG56Vg7uiifbM0RyliCu\"}}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}}
@dagurdagsson,
The only way for the code to trigger API call with an empty set id is when one tries to create a FB Product set that has no products. I am putting in place a check that will detec this situation: https://github.com/woocommerce/facebook-for-woocommerce/pull/2119
This does not answer the question why in your case the new FB product set is empty. The exact question is why for the categories you are using to define the set there are no products? To reproduce the scenario I have created a new category that is not used by any product and I was using it to define the FB set.
π Isolate the bug
4038003-zen
βοΈ Describe the bug
Products are syncing to Facebook, but Product Sets are not. It's been confirmed that products in the Product Sets do not have variations.
πΆββοΈ Steps to reproduce
βοΈ Expected behavior
Product Sets should sync to Facebook
π Logs
WordPress Environment