facebook / facebook-java-business-sdk

Java SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
402 stars 332 forks source link

Getting com.facebook.ads.sdk.APIException$MalformedResponseException while fetching ad insights #346

Open tariq-hevo opened 3 years ago

tariq-hevo commented 3 years ago

Which SDK version are you using?

10.0.0

What's the issue?

While trying to fetch ad insights application fails with following exception : com.facebook.ads.sdk.APIException$MalformedResponseException: Invalid response string:

Steps/Sample code to reproduce the issue

APIRequestGetInsightsAsync getInsightsAsync = adAccount.getInsightsAsync()
                    .setLevel(adLevel) // Ad level by default
                    .setFields(fields) // selected fields or all
                    .setActionReportTime(actionReportTime) // selected in source
                    .setBreakdowns(breakdownsList) // Empty when not required
                    .setTimeIncrement("1") // to fetch the records on a granular level of per-day
                    .setTimeRange(FacebookAdsUtils.getTimeRange(startDate, endDate));

            AdReportRun adReportRun = getInsightsAsync.execute();

Observed Results:

Expected Results:

galacticgumshoe commented 3 years ago

This is also happening in v9.0.0. It appears to be a breaking change made to the API and is in the code for v11.0.0 but that jar is not published to Maven yet due to #347

tariq-hevo commented 3 years ago

I see. Thanks for the update @galacticgumshoe. I hope this doesn't get a lot of time to get resolved as we already have the code ready for v11.0.0.

stale[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.