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

[source-facebook-marketing] Data Mismatch and Error 400 #38154

Closed
1 task
MoralesPablo opened this issue May 13, 2024 · 13 comments
Closed
1 task

[source-facebook-marketing] Data Mismatch and Error 400 #38154

MoralesPablo opened this issue May 13, 2024 · 13 comments

Comments

@MoralesPablo
Copy link

Connector Name

Facebook Marketing

Connector Version

v2.1.8

What step the error happened?

During the sync

Relevant information

We have been suffering mismatch errors throughout the weekend. It started as a mismatch on day 2024-05-05 and now affects days 2024-05-06 and 2024-05-07. Today, probably, day 2024-05-08, will begin having mismatches.

It coincides with the appearance of these 400 errors in the logs:

image

Is anyone else experiencing these errors?

Relevant log output

No response

Contribute

  • Yes, I want to contribute
@marcosmarxm
Copy link
Member

Can you share the complete sync log?
Are you using a custom report?
What version of Facebook Marketing App are you using v18...19?

@MoralesPablo
Copy link
Author

Can you share the complete sync log? Are you using a custom report? What version of Facebook Marketing App are you using v18...19?

@charlesandre
Copy link

Hello both,
We are facing a similar issue, the fields impacted are spend and impressions (At least) from the ads_insights table.
This issue appears from the 5th of May to the 8th included.

The issue has been encountered with both connector version 1.3.2 (API version 17) and 2.1.8 (V19 in Facebook).

We reset the streams and ran it again with still the same mismatch.

@Zapponi
Copy link

Zapponi commented May 14, 2024

Hello everyone. Same issue here as described by @charlesandre

@marcosmarxm marcosmarxm changed the title Facebook Marketing - Data Mismatch and Error 400 [source-facebook-marketing] Data Mismatch and Error 400 May 16, 2024
@marcosmarxm
Copy link
Member

Hello everyone, I asked to the connector team to take a look in this issue. @Zapponi @charlesandre @MoralesPablo if you can provide as much information about what streams (tables) you're using it can be really helpful to solve the issue as quick as possible.

@marcosmarxm
Copy link
Member

Our team is working to resolve this issue. mismatch between Ads Manager UI and the API is unclear. Please share any additional information you have that could assist us.

@MoralesPablo
Copy link
Author

Hello everyone, I asked to the connector team to take a look in this issue. @Zapponi @charlesandre @MoralesPablo if you can provide as much information about what streams (tables) you're using it can be really helpful to solve the issue as quick as possible.

Hi @marcosmarxm,

We are using:

  • Ads
  • Ads Insights
  • Campaigns

@sofiane-lmem
Copy link

Hello everyone.
We are facing the same issue as described above.
The mismatch is also occurring between 2024-05-05 and 2024-05-08.
After the 8th of may, everything is working as expected.

@kschutt
Copy link

kschutt commented May 16, 2024

@marcosmarxm is this only affecting AirByte Cloud?

@maxi297
Copy link
Contributor

maxi297 commented May 16, 2024

Hey everyone! We have scoped the issue. TDLR: It seems like requesting for the field wish_bid in the insights API is causing some columns to have the wrong values. We will have a fix to exclude this field for now and evaluate when we can re-introduce it and how. This fix will probably be approved after a internal validation which ETA would be tomorrow.

Summary

Our source is using the async API. When creating the report with the field wish_bid, the generated report would have missing data.

Interesting note is that async jobs would be way more flaky when requesting for the wish_bid and it would often trigger our resiliency mechanism that will chunk the job in smaller chunks, starting from AdAccount to Campaign to AdSet to Ad. Eventually, we did end up with async jobs that succeeded but the information was invalid (the case I have on our end is spend would be equal to 0.02 instead of 29.4). It is interesting to note that querying the same data through the sync API would just straight up fail:

~% curl -G \
-d "limit=100" \
-d "level=ad" \
-d "action_report_time=mixed" \
-d "action_breakdowns=['action_type','action_target_id','action_destination']" \
-d "action_attribution_windows=['1d_click','7d_click','28d_click','1d_view','7d_view','28d_view']" \
-d 'time_range={"since":"2024-05-05","until":"2024-05-05"}' \
-d "fields=date_start,spend,wish_bid" \
-d "access_token=<obfuscated>" \
"https://graph.facebook.com/v19.0/act_<obfuscated>/insights" | jq

{
  "error": {
    "message": "Invalid parameter",
    "type": "OAuthException",
    "code": 100,
    "error_subcode": 3191001,
    "is_transient": false,
    "error_user_title": "Unknown error",
    "error_user_msg": "ads insights api permission denied",
    "fbtrace_id": <...>
  }
}

... while if we just remove the wish_bid from the previous request, we get a valid response like this:

{
  "data": [
    {
      "date_start": "2024-05-05",
      "spend": "29.4",
      "date_stop": "2024-05-05"
    }
],
  "paging": {
    "cursors": {
      "before": "MAZDZD",
      "after": "MAZDZD"
    }
  }
}

Note

This error is not linked to the 400 HTTP status referred in the issue description which is an independent issue we are currently trying to resolve. Our source is resilient to this meaning that it'll query for smaller jobs. In some very rare cases, it can break the stream hence why we are trying to tackle this.

@maxi297
Copy link
Contributor

maxi297 commented May 17, 2024

Version 2.1.9 has been release. In this version, wish_bid will not be populated but the syncs shouldn't have data inaccuracies anymore. Let us know if there are still some issues related to that and thanks for creating the GitHub issue!

EDIT: adding more information for the release ; if you have the default value for Insights Lookback Window (which is 28 days), you should not need to modify or reset anything for this change to take effect

@maxi297
Copy link
Contributor

maxi297 commented May 21, 2024

@MoralesPablo, can you confirm that this as fixed the issue? If this is the case, I would close this issues. Else, we will plan our next action item on this issue

@MoralesPablo
Copy link
Author

@MoralesPablo, can you confirm that this as fixed the issue? If this is the case, I would close this issues. Else, we will plan our next action item on this issue

Confirmed!

@maxi297 maxi297 closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants