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

2 Errors Reconnecting To Facebook: Permissions Error and Could Not Retrieve Facebook Business Extension System User

Open theabhig opened this issue 3 years ago β€’ 151 comments

πŸ”Ž Isolate the bug

  • [X] I have confirmed this occurs in the most recent version of WordPress, WooCommerce, and Facebook for WooCommerce.
  • [X] I have confirmed this occurs when only WooCommerce and Facebook for WooCommerce are active and when using a default WordPress or WooCommerce theme.

✍️ Describe the bug

There are 2 separate error messages, but I suspect they may be related so I have submitted these as a single issue.

My test site had an existing, working connection. These errors happened after I disconnected and tried to reconnect.

When I tested this on a site with a brand new connection, I wasn't able to replicate the issue and connected fine.

First error - Permissions error: access_denied, reason: user_denied

When I disconnected from Facebook and tried to reconnect from WP-Admin > Marketing > Facebook, I was first greeted by this screen:

Screenshot 2022-02-03 at 08 47 54

When I clicked on cancel, it gave me this error:

Annotation on 2022-02-03 at 08-49-45

And the connection wasn't established.

Second error - Could not retrieve Facebook Business Extension System User

After the first error, I went to siteurl/wp-admin/options.php and changed the wc_facebook_external_business_id field to a random string of 13 characters.

I then went back to Marketing > Facebook to try to connect again.

This time, I was able to go through the connection wizard on Facebook successfully.

Screenshot 2022-02-03 at 09 23 25

However when I clicked on Done, I was met with this error:

Annotation on 2022-02-03 at 08-50-09

From the Facebook Business System Users, I can see a new system user was created and it has been granted access to my page, catalog, and pixel:

Annotation on 2022-02-03 at 10-02-33

But it does not connect my site to Facebook Business Manager.

There isn't an option on my Business Manager to delete System Users but I also tried following the steps in the documentation to remove the app and extension completely and try again - https://woocommerce.com/document/facebook-for-woocommerce-uninstall-plugin-and-remove-woocommerce-facebook-app/ - but this also didn't work.

πŸšΆβ€β™€οΈ Steps to reproduce

First error - Permissions error: access_denied, reason: user_denied

  1. From a site with a working Facebook connection, disconnect the site.
  2. Try to reconnect

Second error - Could not retrieve Facebook Business Extension System User

  1. After following the steps for the first error, navigate to siteurl/wp-admin/options.php and change the wc_facebook_external_business_id field to a random 13 character string and press Save
  2. Navigate to Marketing > Facebook and try to reconnect
  3. Follow the prompts on the connection wizard and click Done.
  4. This should generate the error Could not retrieve Facebook Business Extension System User

βœ”οΈ Expected behavior

The expected behaviour is that the extension will successfully reconnect to Facebook

πŸ—ƒ Logs

The 42006 errors match the times I was getting the second error message.

02-03-2022 @ 08:50:59 - Failed to connect to Facebook. Reason: Permissions error: access_denied, reason: user_denied
02-03-2022 @ 08:51:39 - Failed to connect to Facebook. Reason: Permissions error: access_denied, reason: user_denied
02-03-2022 @ 08:57:20 - Failed to connect to Facebook. Reason: {
    "message": "(#42006) There was an error adding FBE\/EBC business assets to the system user.",
    "type": "OAuthException",
    "code": 42006,
    "fbtrace_id": "AqIjd-lztvJBS6HgpzR1aRe"
}
02-03-2022 @ 08:57:33 - Failed to connect to Facebook. Reason: Permissions error: access_denied, reason: user_denied
02-03-2022 @ 08:59:35 - Failed to connect to Facebook. Reason: {
    "message": "(#42006) There was an error adding FBE\/EBC business assets to the system user.",
    "type": "OAuthException",
    "code": 42006,
    "fbtrace_id": "AMml76WFHx0MpMy13mYvJWV"
}
02-03-2022 @ 09:07:55 - Failed to connect to Facebook. Reason: {
    "message": "(#42006) There was an error adding FBE\/EBC business assets to the system user.",
    "type": "OAuthException",
    "code": 42006,
    "fbtrace_id": "A_exBfrGgs_H0B3Hofy85iQ"
}
02-03-2022 @ 09:21:43 - Failed to connect to Facebook. Reason: Permissions error: access_denied, reason: user_denied
02-03-2022 @ 09:21:56 - Failed to connect to Facebook. Reason: Permissions error: access_denied, reason: user_denied
02-03-2022 @ 09:23:34 - Failed to connect to Facebook. Reason: {
    "message": "(#42006) There was an error adding FBE\/EBC business assets to the system user.",
    "type": "OAuthException",
    "code": 42006,
    "fbtrace_id": "ATQC5VpUg5MJwbw7ru9JTNz"
}
02-03-2022 @ 09:48:21 - Failed to connect to Facebook. Reason: Permissions error: access_denied, reason: user_denied
02-03-2022 @ 09:50:28 - Failed to connect to Facebook. Reason: {
    "message": "(#42006) There was an error adding FBE\/EBC business assets to the system user.",
    "type": "OAuthException",
    "code": 42006,
    "fbtrace_id": "ArNAt_OTePxJmZYcZoMuI6I"
}

`

WordPress Environment

WordPress address (URL): https://theabhigfbtest.mystagingwebsite.com Site address (URL): https://theabhigfbtest.mystagingwebsite.com WC Version: 6.1.1 REST API Version: βœ” 6.1.1 WC Blocks Version: βœ” 6.5.2 Action Scheduler Version: βœ” 3.4.0 WC Admin Version: βœ” 3.0.3 Log Directory Writable: βœ” WP Version: 5.9 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: βœ” Language: en_US External object cache: βœ”

Server Environment

Server Info: nginx PHP Version: 7.4.27 PHP Post Max Size: 2 GB PHP Time Limit: 1200 PHP Max Input Vars: 6144 cURL Version: 7.80.0 OpenSSL/1.1.1d

SUHOSIN Installed: – MySQL Version: 5.5.5-10.4.22-MariaDB-log Max Upload Size: 2 GB Default Timezone is UTC: βœ” fsockopen/cURL: βœ” SoapClient: βœ” DOMDocument: βœ” GZip: βœ” Multibyte String: βœ” Remote Post: βœ” Remote Get: βœ”

Database

WC Database Version: 6.1.1 WC Database Prefix: wp_ Total Database Size: 4.38MB Database Data Size: 2.38MB Database Index Size: 2.00MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.17MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.13MB + Index: 0.13MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.08MB + Index: 0.03MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_hfcm_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 1.06MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 0.14MB + Index: 0.11MB + Engine InnoDB wp_posts: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_exported_csv_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_pickup_locations_geodata: Data: 0.02MB + Index: 0.05MB + Engine InnoDB

Post Type Counts

afadv_qty: 1 attachment: 24 jp_pay_product: 1 page: 9 post: 1 product: 20 product_variation: 7 revision: 2 shop_order: 4 wc_order_status: 8 wc_pickup_location: 2

Security

Secure connection (HTTPS): βœ” Hide errors from visitors: βœ”

Active Plugins (4)

Facebook for WooCommerce: by Facebook – 2.6.9 WooCommerce Stripe Gateway: by WooCommerce – 6.1.0 WooCommerce Shipping & Tax: by WooCommerce – 1.25.22 WooCommerce: by Automattic – 6.1.1

Inactive Plugins (13)

Addify - Advanced Product Quantity: by Addify – 1.2.0 Akismet Anti-Spam: by Automattic – 4.2.2 Header Footer Code Manager: by 99robots – 1.1.16 Jetpack: by Automattic – 10.7-a.1 WooCommerce Blocks: by Automattic – 6.9.0 WooCommerce Checkout Field Editor: by WooCommerce – 1.6.1 WooCommerce Customer/Order/Coupon Export: by SkyVerge – 5.3.2 WooCommerce Distance Rate Shipping: by Automattic – 1.0.26 WooCommerce Local Pickup Plus: by SkyVerge – 2.9.4 WooCommerce One Page Checkout: by Automattic – 1.7.11 WooCommerce Order Status Manager: by SkyVerge – 1.13.2 WooCommerce PayPal Payments: by WooCommerce – 1.6.5 WooCommerce Points and Rewards: by WooCommerce – 1.6.43

Dropin Plugins (2)

advanced-cache.php: advanced-cache.php object-cache.php: Memcached

Settings

API Enabled: – Force SSL: – Currency: GBP (Β£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: –

WC Pages

Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Storefront Version: 3.9.1 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: βœ”

Templates

Overrides: –

Action Scheduler

Complete: 220 Oldest: 2022-01-04 20:40:53 +0000 Newest: 2022-02-03 09:49:08 +0000

Pending: 3 Oldest: 2022-02-04 08:20:28 +0000 Newest: 2022-02-04 08:20:28 +0000

Status report information

Generated at: 2022-02-03 09:50:48 +00:00 `

Other instances

Similar errors have also been reported:

4724760-zen 4724725-zen 4742974-zen 4741909-zen https://wordpress.org/support/topic/could-not-retrieve-facebook-business-extension-system-user/

theabhig avatar Feb 03 '22 10:02 theabhig

4724760-zen

amElnagdy avatar Feb 03 '22 13:02 amElnagdy

4704268-zen

raifd avatar Feb 03 '22 13:02 raifd

https://wordpress.org/support/topic/permissions-error-access_denied-reason-user_denied/

amElnagdy avatar Feb 03 '22 13:02 amElnagdy

I see that the latest release of Facebook is from 20 days ago - @theabhig @amElnagdy @raifd care to search Zendesk/forums back 20 days to see if this is connected to that release? (or is that the other instances/part)?

jobthomas avatar Feb 03 '22 14:02 jobthomas

@jobthomas Just searched Zendesk and the first tickets regarding this seem to have appeared yesterday. I do not think this is related to the update!

raifd avatar Feb 03 '22 14:02 raifd

Hmmm, is there another extension/core update that could cause this, or are we thinking this is on the Facebook side?

jobthomas avatar Feb 03 '22 14:02 jobthomas

Is there any way we can find out what updates were pushed yesterday? My initial thought on this was some kind of Facebook Service being down, not sure though.

raifd avatar Feb 03 '22 15:02 raifd

It seems to only happen when reconnecting an existing connection. If it was something on the Facebook end being down, I would have thought it wouldn't allow me to set up a connection with a new site, but I was able to do that with no issue.

The earliest ticket I found was from Monday, which references the first error message: 4705156-zen

It did strike me as odd that we suddenly started seeing an influx in the last day or so when the extension was last updated a few weeks ago, which suggests it might be something on Facebook's end in terms of how they handle reconnection.

theabhig avatar Feb 03 '22 15:02 theabhig

I suspect this might be due to some changes on FB side, since on 4685206-zen β€” I was able to connect my own FB account without issue but the customer's account is returning the same error reported here. I've asked them to try and check if creating a new catalog helps, they still have to reply on that though.

anant1811 avatar Feb 03 '22 15:02 anant1811

https://wordpress.org/support/topic/integration-with-facebook-3/

daniyalahmadk avatar Feb 03 '22 15:02 daniyalahmadk

https://wordpress.org/support/topic/something-went-wrong-when-connecting-to-facebook-56/

luanluta avatar Feb 03 '22 16:02 luanluta

https://wordpress.org/support/topic/algo-deu-errado-ao-conectar-ao-facebook-ou-something-went-wrong-when-connecting/

jrick1229 avatar Feb 03 '22 17:02 jrick1229

Not sure if this is related, but Graph API v5.0 expired on the same day when we started seeing these issues: https://developers.facebook.com/docs/graph-api/changelog/version5.0

jrick1229 avatar Feb 03 '22 17:02 jrick1229

Hola, estoy teniendo el mismo problema desde temprano

Hi Guys,

Today the system works! I was able to correctly reconnect!

Thank you have a nice day

Marina

mariluciani avatar Feb 04 '22 07:02 mariluciani

El error sigue persistiendo, a alguno mas le sigue pasando? Gracias de ante mano

Prueba de nuevo, a mi me ha funcionado.

teteraazul avatar Feb 04 '22 11:02 teteraazul

the errors continue for me.

FabricioCapelini avatar Feb 04 '22 11:02 FabricioCapelini

image

me sigue persistiendo este error

Hi Guys,

Today the system works! I was able to correctly reconnect!

Thank you have a nice day

Marina

the error continue for me, could you tell us what did you do ?

moh04213 avatar Feb 04 '22 12:02 moh04213

before I had a problem like this image Then I tried to reconnect but a problem happened like this. image

0xatok avatar Feb 04 '22 15:02 0xatok

Reported here too: https://wordpress.org/support/topic/facebook-for-woocommerce-doesnt-work/

NathalyaVides avatar Feb 04 '22 15:02 NathalyaVides

Bump, I have the same issue.

I had my facebook business manager/assets connected to an old shopify store, and I have since tried to migrate the connection to a new woocommerce/wordpress store. I think because my facebook busienss manager was already connected to shopify previously, it is causing errors when connecting to wordpress.

I am wondering if anyone else has these characteristics when facing the same issue?

tysonL1010 avatar Feb 04 '22 23:02 tysonL1010

I have found a workaround. I can connect my facebook business account to wordpress, by using the facebook for wordpress plugin.

tysonL1010 avatar Feb 06 '22 00:02 tysonL1010

Reported here as well: https://wordpress.org/support/topic/pixel-is-not-integrated-into-my-page/

rashedripon avatar Feb 06 '22 15:02 rashedripon

It seems to only happen when reconnecting an existing connection. If it was something on the Facebook end being down, I would have thought it wouldn't allow me to set up a connection with a new site, but I was able to do that with no issue.

The earliest ticket I found was from Monday, which references the first error message: 4705156-zen

It did strike me as odd that we suddenly started seeing an influx in the last day or so when the extension was last updated a few weeks ago, which suggests it might be something on Facebook's end in terms of how they handle reconnection.

Not really only for reconnects, This happens for me with a brand-new connection err

delegacz avatar Feb 07 '22 12:02 delegacz

Not sure if this is related, but Graph API v5.0 expired on the same day when we started seeing these issues: https://developers.facebook.com/docs/graph-api/changelog/version5.0

I did a little more digging and found this page.

https://developers.facebook.com/docs/graph-api/guides/versioning

_"The goal for having versioning is for developers building apps to be able to understand in advance when an API or SDK might change. They help with web development, but are critical with mobile development because a person using your app on their phone may take a long time to upgrade (or may never upgrade).

Each version will remain for at least 2 years from release giving you a solid timeline for how long your app will remain working, and how long you have to update it to newer versions."_

As mentioned by [jrick1229] earlier in this thread, graph api v5.0 was discontinued on the same day issues started to arise. Can someone on the development team comment on whether the issues from the woocommerce plugin is related to v5.0 becoming expired?

tysonL1010 avatar Feb 07 '22 18:02 tysonL1010

4715548-zen as well.

anant1811 avatar Feb 08 '22 07:02 anant1811

Similar issue in 4761087-zen

jacoswan avatar Feb 08 '22 13:02 jacoswan

We have reports here too:

  • https://wordpress.org/support/topic/could-not-retrieve-facebook-business-extension-system-user-2/
  • https://wordpress.org/support/topic/could-not-retrieve-facebook-business-extension-system-user-3/#post-15340723

pauljacobson avatar Feb 08 '22 13:02 pauljacobson