daroczig / fbRads

Analyze and manage Facebook ads from R using this client library to access their Marketing APIs
GNU Affero General Public License v3.0
151 stars 57 forks source link

threw a bug... #138

Closed debsbalme closed 3 years ago

debsbalme commented 3 years ago

just ran into the following running fb_insights

start20 <- '2020-10-01' #770 #start date end20 <- '2020-12-31' # 375 #end date

for(i in fbads_accountslist) {

i = "313436799357813" #Override account

fbad_init(accountid = i, token = fbads_token, version = '9.0') daydata_fb <- data.table( fb_insights( time_range = paste0("{'since':'",start20,"','until':'",end20,"'}"), level = 'adset', fields = "['account_name','account_id','adset_name','impressions','spend','clicks','reach','frequency']",

action_attribution_windows="1d_click",

  job_type = "async")

) }

TRACE [2021-02-26 23:28:01] Initializing connection to account 1902081270065656 via API v9.0 DEBUG [2021-02-26 23:28:02] 288941099283940 Async Job Not Started (0%). Waiting 2 seconds... ERROR [2021-02-26 23:28:08] Possible network error: Connection timed out after 3000 milliseconds INFO [2021-02-26 23:28:08] Retrying query for the 1 st/nd/rd time DEBUG [2021-02-26 23:28:11] 508992493422189 Async Job Started (0%). Waiting 2 seconds... DEBUG [2021-02-26 23:28:13] 508992493422189 Async Job Running (0%). Waiting 10 seconds... ERROR [2021-02-26 23:28:29] Possible network error: Connection timed out after 3000 milliseconds INFO [2021-02-26 23:28:29] Retrying query for the 1 st/nd/rd time ERROR [2021-02-26 23:28:34] Possible network error: Connection timed out after 3000 milliseconds INFO [2021-02-26 23:28:34] Retrying query for the 2 st/nd/rd time ERROR [2021-02-26 23:28:39] Possible network error: Connection timed out after 3000 milliseconds INFO [2021-02-26 23:28:39] Retrying query for the 3 st/nd/rd time ERROR [2021-02-26 23:28:44] Possible network error: Connection timed out after 3000 milliseconds INFO [2021-02-26 23:28:44] Retrying query for the 4 st/nd/rd time ERROR [2021-02-26 23:28:46] URL: https://graph.facebook.com/v9.0/508992493422189/insights ERROR [2021-02-26 23:28:46] Method: GET ERROR [2021-02-26 23:28:46] Params: List of 2 $ limit: chr "25" $ after: chr "OTkZD" Error in fbad_request(path = url$path, method = "GET", params = url$params, : This is a bug in the fbRads package. Please report on GitHub with a detailed output: Connection timed out after 3000 milliseconds

traceback() 14: stop(paste(ifelse(inherits(curlres, "error"), "This is a bug in the fbRads package. Please report on GitHub with a detailed output:", "FB query failed:"), res$message)) 13: fbad_request(path = url$path, method = "GET", params = url$params, version = url$version, retries = 3) 12: eval(mc, envir = parent.frame()) 11: eval(mc, envir = parent.frame()) 10: fbad_request(path = url$path, method = "GET", params = url$params, version = url$version, retries = 2) 9: eval(mc, envir = parent.frame()) 8: eval(mc, envir = parent.frame()) 7: fbad_request(path = url$path, method = "GET", params = url$params, version = url$version, retries = 1) 6: eval(mc, envir = parent.frame()) 5: eval(mc, envir = parent.frame()) 4: fbad_request(path = url$path, method = "GET", params = url$params, version = url$version) 3: fbad_request_next_page(res$paging$next) 2: fb_insights(time_range = paste0("{'since':'", start19, "','until':'", end19, "'}"), level = "adset", fields = "['account_name','account_id','adset_name','impressions','spend','clicks','reach','frequency']", job_type = "async") 1: data.table(fb_insights(time_range = paste0("{'since':'", start19, "','until':'", end19, "'}"), level = "adset", fields = "['account_name','account_id','adset_name','impressions','spend','clicks','reach','frequency']", job_type = "async"))

daroczig commented 3 years ago

Thanks for the report. Can you please share your sessionInfo() after loading the package?

daroczig commented 3 years ago

I'm closing this as have not heard back with more details and so thus cannot replicate or figure out what might be the problem. Please reopen with more info when you have a chance.