Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prodcuts Not Sync To Meta #100

Open
CalzaFino opened this issue Feb 13, 2025 · 2 comments
Open

Prodcuts Not Sync To Meta #100

CalzaFino opened this issue Feb 13, 2025 · 2 comments

Comments

@CalzaFino
Copy link

Preconditions (*)

  1. Magento 2.4.7-p3
  2. Meta 1.4.1
  3. Previous Meta Versons had the same issue

Steps to reproduce (*)

  1. Connect your shop to Facebook and Instagram In Magento Admin
  2. Select Shop and ads or Ads Only
  3. Connection screen looks fine without errors

Expected result (*)

  1. Facebook_Products File is generated in /export folder
  2. Products start showing in Meta

Actual result (*)

  1. facebook_prodcuts.csv.gz is generated but keeps growing out of control until connection is deleted in Magento Admin.
  2. No products are sent to Meta

I "Run" the generated error log in ChatGPT andI got this results:

1.- Type Mismatch Error (saveIsOnsiteEligible)
Error:
Meta\BusinessExtension\Model\MBEInstalls::saveIsOnsiteEligible(): Argument #2 ($storeId) must be of type int, string given
Cause:
It looks like the function saveIsOnsiteEligible() expects an integer (int) for the $storeId, but it's receiving a string ('3' instead of 3).
This suggests a data type inconsistency in the Meta Business Extension module.
Possible Fix:
Modify the code in the extension (if you have access):
Check the file:
/srv/public_html/vendor/meta/module-business-extension/Model/MBEInstalls.php
Locate line 154 where saveIsOnsiteEligible(false, '3') is being called.
Convert the store ID to an integer:
saveIsOnsiteEligible(false, (int)$storeId);

If this is a default Magento extension from Meta, they need to fix the type issue in their extension.
You can check for an updated version of the module (meta/module-business-extension).
2.
3. Facebook Product Feed Sync FailureError:
Client error: GET https://graph.facebook.com/product_feeds?access_token=...
resulted in a 400 Bad Request response:
{"error":{"message":"Unsupported get request. Object with ID 'product_feeds' does not exist...
Cause:
The request to fetch product_feeds from Facebook's API failed.
This usually happens when:
The Catalog ID is missing or invalid.
The Access Token used in the request is expired or incorrect.
The Facebook Business Extension configuration is broken.
Possible Fix:
Check Your Facebook Catalog in Meta Commerce Manager
Go to Facebook Commerce Manager: https://business.facebook.com/commerce.
Ensure that your catalog exists and that your store (store_id: 3) is properly linked.
Refresh the Facebook Token
In Magento Admin Panel:
Navigate to Stores > Configuration > Facebook Business Extension.
Try reconnecting your Facebook account.
Generate a new access token.
Manually Assign a Valid Catalog ID

In Magento database (core_config_data table):

SELECT * FROM core_config_data WHERE path LIKE '%facebook%';
If the catalog_id is missing or incorrect, update it.
Check Module Version and Update

Your current Meta Business Extension version is 1.4.1.
If there's a newer version, update it using:

Final Steps
First, fix the type mismatch issue in the extension code.
Then, refresh your Facebook access token and verify that your catalog is correctly linked.
If issues persist, contact Meta Support and report the missing product_feeds object.

@rpanush
Copy link

rpanush commented Feb 13, 2025

Hi @CalzaFino We acknowledge your issue and will look into it! Thanks for submitting.

@pradeepkanaka
Copy link
Contributor

@CalzaFino We will be addressing the issue Meta\BusinessExtension\Model\MBEInstalls::saveIsOnsiteEligible(): Argument https://github.com/magento/meta-for-magento2/issues/2 ($storeId) must be of type int, string given and will provide the fix in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants