facebook-for-woocommerce icon indicating copy to clipboard operation
facebook-for-woocommerce copied to clipboard

Enabling Messenger chat trigger errors

Open sukafia opened this issue 10 months ago • 18 comments

✍️ Describe the bug

Enabling the messenger chat button triggers several errors in the console:

kTARsa.png

Access to XMLHttpRequest at 'https://web.facebook.com/plugins/customer_chat/SDK/?app_id=&attribution=fbe_woocommerce&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df2d1f3cb6736c4%26domain%3Ditsanothertestsite.mystagingwebsite.com%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fitsanothertestsite.mystagingwebsite.com%252Ff20bca75db2a22c%26relation%3Dparent.parent&current_url=https%3A%2F%2Fitsanothertestsite.mystagingwebsite.com%2F&event_name=chat_plugin_sdk_facade_create&is_loaded_by_facade=true&loading_time=0&locale=en_US&log_id=478eec60-bcae-46f2-a069-2bf63aa38c60&page_id=102798312634091&request_time=1692687350867&sdk=joey&should_use_new_domain=false&suppress_http_code=1' from origin 'https://itsanothertestsite.mystagingwebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. xfbml.customerchat.js:117 GET https://web.facebook.com/plugins/customer_chat/SDK/?app_id=&attribution=fbe_woocommerce&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df2d1f3cb6736c4%26domain%3Ditsanothertestsite.mystagingwebsite.com%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fitsanothertestsite.mystagingwebsite.com%252Ff20bca75db2a22c%26relation%3Dparent.parent&current_url=https%3A%2F%2Fitsanothertestsite.mystagingwebsite.com%2F&event_name=chat_plugin_sdk_facade_create&is_loaded_by_facade=true&loading_time=0&locale=en_US&log_id=478eec60-bcae-46f2-a069-2bf63aa38c60&page_id=102798312634091&request_time=1692687350867&sdk=joey&should_use_new_domain=false&suppress_http_code=1 net::ERR_FAILED 400

🚶‍♀️ Steps to reproduce

  1. Go to Marketing > Facebook > Messenger and Enable Messenger
  2. Check the browser console and notice several errors
  3. Disable messenger chat and notice all errors disappear

✔️ Expected behavior

Enabling messenger chat shouldn't trigger these errors.

Affected users

https://wordpress.org/support/topic/errors-307/ (led to this review)

sukafia avatar Aug 22 '23 07:08 sukafia

Thanks @sukafia, I'll review this ASAP and see if we can find a solution.

layoutd avatar Aug 22 '23 07:08 layoutd

Some reports on the FB Developer Community forum as well: https://developers.facebook.com/community/threads/1005499880601235/

I've confirmed that the errors appear with the latest (3.0.32) as well as previous releases (3.0.20). This seems to be a recent change on the Facebook end.

Editing to add: Even though the console errors appear, the Messenger chat box continues to function correctly.

layoutd avatar Aug 22 '23 12:08 layoutd

Meta's own FB chat plugin has the same issues - the chat box loads and works correctly, but the console shows the blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. message.

layoutd avatar Aug 22 '23 12:08 layoutd

@MatthiasReinholz could you please contact Facebook to look into this? Thank you.

sukafia avatar Aug 25 '23 06:08 sukafia

Just adding that I confirmed that the domains are present in the domain whitelist (https://www.facebook.com/settings?tab=advanced_messaging) as indicated by this developer documentation: https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/domain-whitelisting.

layoutd avatar Aug 25 '23 10:08 layoutd

zd-6784337

shameemreza avatar Sep 10 '23 04:09 shameemreza

Editing to add: Even though the console errors appear, the Messenger chat box continues to function correctly.

My site is plain HTML. I added my domain to whitelist and plugin code to my HTML. Got same error and the chat box doesn't show at all!

MarvinXu avatar Sep 15 '23 01:09 MarvinXu

Our understanding is that Meta has recognized the issue and is filing an internal bug report. Hopefully it will be resolved on their end in the future (exact timeline unknown).

layoutd avatar Sep 15 '23 09:09 layoutd

Has there been any update from Meta as to the resolution or estimate to resolution? I wasn't able to find any response from Meta to any of the bug reports. Just crickets!

ron1cne avatar Sep 18 '23 20:09 ron1cne

@ron1cne AFAIK there has been no official public response, and the information we have is not very detailed unfortunately.

layoutd avatar Sep 18 '23 20:09 layoutd

The problem is still not solved

imeda9 avatar Oct 11 '23 13:10 imeda9

Is there any ways to contact facebook officials? I have send an email to [email protected] but no feedback.

BTW, there should be a way that I don't know of to fix this, because in my old website I use a third-party plugin to connect to facebook chat and it still works like a charm.

MarvinXu avatar Oct 18 '23 03:10 MarvinXu

Hi Marvin, beyond the above message board, we don't have much more information. What plugin are you using on your old site? Does it work on a new site, too? Maybe we can confirm that it works and try to figure out why.

layoutd avatar Oct 18 '23 07:10 layoutd

@layoutd Sadly I can't use it on my new site. The old site is built on a paid platform which I don't have the source code. You can check it on: https://www.breepoolcover.com/

MarvinXu avatar Oct 18 '23 07:10 MarvinXu

Hey @MarvinXu, I actually see the same errors on that site: image

However, the Messenger chat still works. From testing, it looks like we're having the same issue with this extension, so it would appear to be something that has to be resolved on Meta's server side. Un/fortunately, it's not an issue that breaks functionality, so it probably won't be particularly high priority :/

layoutd avatar Oct 19 '23 07:10 layoutd

For those that matter, it does pull down your web "score" on Google. So, these could in theory impact your ability to rank for search traffic.

wflanagan avatar Nov 28 '23 21:11 wflanagan

Meta has clarified that this feature will be disabled in May, 2024: image

On May 9, 2024, you will no longer be able to access any of the functionality of the Chat Plugin. Effective immediately, Chat Plugin in guest mode is no longer available. Other features like m.me links will still be available for you to use.

  • https://developers.facebook.com/docs/messenger-platform/discovery/facebook-chat-plugin/

layoutd avatar Mar 18 '24 17:03 layoutd

ok. good to know.

wflanagan avatar Mar 18 '24 17:03 wflanagan