Closed MicahSteinbrecher closed 7 years ago
Sometimes i also get this error. Can't figure out the reason though.
I can successfully make requests directly to the facebook graph api, so it's not a permissions issue. Requests only fail when using this module. The module works with my application locally, so all parameters should be properly set. Full error message is below. It looks like it makes it through the 'places' query and fails on the 'events' query.
{"message":{"name":"StatusCodeError","statusCode":500,"message":"500 - \"{\\\"error\\\":{\\\"message\\\":\\\"An unknown error has occurred.\\\",\\\"type\\\":\\\"OAuthException\\\",\\\"code\\\":1,\\\"fbtrace_id\\\":\\\"AXx3ZR6n7KW\\\"}}\"","error":"{\"error\":{\"message\":\"An unknown error has occurred.\",\"type\":\"OAuthException\",\"code\":1,\"fbtrace_id\":\"AXx3ZR6n7KW\"}}","options":{"uri":"https://graph.facebook.com/v2.7/?ids=355163861354144,119645874756701,916575808430793,107585723765,123914180958430,301258016568123,115381975141023,70685414568,210592372331148,267772833417502,157977087548868,304974419555077,139421239488394,173198599397470,997576347032198,147730745248847,149688338393762,263546353664722,883129645102907,184683714908605,121216281268244,156361444407885,145386905492326,449085008615426,132157603486032,260710380949735,1640896176127195,565631546797333,236143549840294,313970708795768,473602129497090,448132605271340,608957389242967,543079909111586,103590316645,201805243328889,162195063827587,1634403540178094,760284190786231,122921627756921,112936458755585,165377470549250,541491992550423,1402453950056772,265208473503168,1620742944810513,168457223167396,120192898172413,122154704500235,202452910093858&access_token=1831922003763473|kthfcgnHXzLP743hPvwQ7HKjyKk&fields=id,name,about,emails,cover.fields(id,source),picture.type(large),location,events.fields(id,type,name,cover.fields(id,source),picture.type(large),description,start_time,end_time,category,attending_count,declined_count,maybe_count,noreply_count).since(1492287319).until(Sat Apr 22 2017 20:15:18 GMT+0000 (UTC))","method":"GET","simple":true,"resolveWithFullResponse":false,"transform2xxOnly":false},"response":{"statusCode":500,"body":"{\"error\":{\"message\":\"An unknown error has occurred.\",\"type\":\"OAuthException\",\"code\":1,\"fbtrace_id\":\"AXx3ZR6n7KW\"}}","headers":{"www-authenticate":"OAuth \"Facebook Platform\" \"unknown_error\" \"An unknown error has occurred.\"","access-control-allow-origin":"*","pragma":"no-cache","cache-control":"no-store","x-fb-rev":"2961016","content-type":"text/javascript; charset=UTF-8","x-fb-trace-id":"AXx3ZR6n7KW","facebook-api-version":"v2.8","expires":"Sat, 01 Jan 2000 00:00:00 GMT","x-fb-debug":"I9eYIaT+8pF5qXxIMVXkF4HP+odXB1ITpX5WVYNinW3CCfOMgrlIPqD849PccNhahX7dCyttxxegbYuac+GLCw==","date":"Sat, 15 Apr 2017 20:15:19 GMT","connection":"close","content-length":"114"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"graph.facebook.com","port":443,"hostname":"graph.facebook.com","hash":null,"search":"?ids=355163861354144,119645874756701,916575808430793,107585723765,123914180958430,301258016568123,115381975141023,70685414568,210592372331148,267772833417502,157977087548868,304974419555077,139421239488394,173198599397470,997576347032198,147730745248847,149688338393762,263546353664722,883129645102907,184683714908605,121216281268244,156361444407885,145386905492326,449085008615426,132157603486032,260710380949735,1640896176127195,565631546797333,236143549840294,313970708795768,473602129497090,448132605271340,608957389242967,543079909111586,103590316645,201805243328889,162195063827587,1634403540178094,760284190786231,122921627756921,112936458755585,165377470549250,541491992550423,1402453950056772,265208473503168,1620742944810513,168457223167396,120192898172413,122154704500235,202452910093858&access_token=1831922003763473%7CkthfcgnHXzLP743hPvwQ7HKjyKk&fields=id,name,about,emails,cover.fields(id,source),picture.type(large),location,events.fields(id,type,name,cover.fields(id,source),picture.type(large),description,start_time,end_time,category,attending_count,declined_count,maybe_count,noreply_count).since(1492287319).until(Sat%20Apr%2022%202017%2020:15:18%20GMT+0000%20(UTC))","query":"ids=355163861354144,119645874756701,916575808430793,107585723765,123914180958430,301258016568123,115381975141023,70685414568,210592372331148,267772833417502,157977087548868,304974419555077,139421239488394,173198599397470,997576347032198,147730745248847,149688338393762,263546353664722,883129645102907,184683714908605,121216281268244,156361444407885,145386905492326,449085008615426,132157603486032,260710380949735,1640896176127195,565631546797333,236143549840294,313970708795768,473602129497090,448132605271340,608957389242967,543079909111586,103590316645,201805243328889,162195063827587,1634403540178094,760284190786231,122921627756921,112936458755585,165377470549250,541491992550423,1402453950056772,265208473503168,1620742944810513,168457223167396,120192898172413,122154704500235,202452910093858&access_token=1831922003763473%7CkthfcgnHXzLP743hPvwQ7HKjyKk&fields=id,name,about,emails,cover.fields(id,source),picture.type(large),location,events.fields(id,type,name,cover.fields(id,source),picture.type(large),description,start_time,end_time,category,attending_count,declined_count,maybe_count,noreply_count).since(1492287319).until(Sat%20Apr%2022%202017%2020:15:18%20GMT+0000%20(UTC))","pathname":"/v2.7/","path":"/v2.7/?ids=355163861354144,119645874756701,916575808430793,107585723765,123914180958430,301258016568123,115381975141023,70685414568,210592372331148,267772833417502,157977087548868,304974419555077,139421239488394,173198599397470,997576347032198,147730745248847,149688338393762,263546353664722,883129645102907,184683714908605,121216281268244,156361444407885,145386905492326,449085008615426,132157603486032,260710380949735,1640896176127195,565631546797333,236143549840294,313970708795768,473602129497090,448132605271340,608957389242967,543079909111586,103590316645,201805243328889,162195063827587,1634403540178094,760284190786231,122921627756921,112936458755585,165377470549250,541491992550423,1402453950056772,265208473503168,1620742944810513,168457223167396,120192898172413,122154704500235,202452910093858&access_token=1831922003763473%7CkthfcgnHXzLP743hPvwQ7HKjyKk&fields=id,name,about,emails,cover.fields(id,source),picture.type(large),location,events.fields(id,type,name,cover.fields(id,source),picture.type(large),description,start_time,end_time,category,attending_count,declined_count,maybe_count,noreply_count).since(1492287319).until(Sat%20Apr%2022%202017%2020:15:18%20GMT+0000%20(UTC))","href":"https://graph.facebook.com/v2.7/?ids=355163861354144,119645874756701,916575808430793,107585723765,123914180958430,301258016568123,115381975141023,70685414568,210592372331148,267772833417502,157977087548868,304974419555077,139421239488394,173198599397470,997576347032198,147730745248847,149688338393762,263546353664722,883129645102907,184683714908605,121216281268244,156361444407885,145386905492326,449085008615426,132157603486032,260710380949735,1640896176127195,565631546797333,236143549840294,313970708795768,473602129497090,448132605271340,608957389242967,543079909111586,103590316645,201805243328889,162195063827587,1634403540178094,760284190786231,122921627756921,112936458755585,165377470549250,541491992550423,1402453950056772,265208473503168,1620742944810513,168457223167396,120192898172413,122154704500235,202452910093858&access_token=1831922003763473%7CkthfcgnHXzLP743hPvwQ7HKjyKk&fields=id,name,about,emails,cover.fields(id,source),picture.type(large),location,events.fields(id,type,name,cover.fields(id,source),picture.type(large),description,start_time,end_time,category,attending_count,declined_count,maybe_count,noreply_count).since(1492287319).until(Sat%20Apr%2022%202017%2020:15:18%20GMT+0000%20(UTC))"},"method":"GET","headers":{}}}},"code":-1}
Seems like you're using a wrongly formatted value for the "until" parameter
This fixed my issue, thanks!
This api works just fine for me when testing on my local machine, however it fails when I run it on a remote heroku server Error msg from logs:
{"message":{"name":"StatusCodeError","statusCode":500,"message":"500 - \"{\\\"error\\\":{\\\"message\\\":\\\"An unknown error has occurred.\\\",\\\"type\\\":\\\"OAuthException\\\",\\\"code\\\":1,\\\"fbtrace_id\\\":\\\"BHzu820eh4d\\\"}}
I checked my app access token here https://developers.facebook.com/tools/debug/accesstoken/ and it's valid. Appreciate any insight