ShelbyTV / shelby_gt

Rails API services for Shelby GT
2 stars 0 forks source link

roll w/ post to twitter not always working #186

Closed spinosa closed 11 years ago

spinosa commented 11 years ago

Front end is successfully sending POST http://api.shelby.tv/v1/frame/512e1ba6b415cc2aa804de01/share with body

{"destination":["twitter"],
"text":"well... don't build your house on the other side of a ramp! âž”@superdupersecret: Flying car crash-landed in roof of house : http://arbroath.blogspot.com/2013/02/flying-car-crash-landed-in-roof-of-house.html",
"addresses":""}

and getting response

{"status": 200, 
"result": {}
}

Hasn't worked for @spinosa since 20 Feb but I've seen it work for @reecepacheco as recently as 26 Feb.

Assigning myself and digging in to at least root it out...

spinosa commented 11 years ago

seeing this in the logs: [2013-02-21 08:18:05.357] ERROR [GT::SocialPosting] Error posting tweet to twitter via Grackle: post http://api.twitter.com/1/statuses/update.json => 403: {"request":"\/1\/statuses\/update.json","error":"The text of your tweet is too long."}

spinosa commented 11 years ago
gt@gt-api-a:~/api/current/log$ tail -n 1000000 production.log | grep "posting tweet" -B 50 -A 5
[2013-02-27 09:33:09.643]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (1.6ms)
[2013-02-27 09:33:09.644]  INFO  Completed 200 OK in 28ms (Views: 3.9ms)
[2013-02-27 09:33:09.653]  INFO  Started GET "/v1/video/4ff24946d104121e3d028a62/conversations" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.763]  INFO  Started GET "/v1/video/find_or_create?provider_name=youtube&provider_id=yEmQhtNR4BI" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.768]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:33:09.768]  INFO    Parameters: {"provider_name"=>"youtube", "provider_id"=>"yEmQhtNR4BI"}
[2013-02-27 09:33:09.781]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (5.1ms)
[2013-02-27 09:33:09.782]  INFO  Completed 200 OK in 14ms (Views: 7.4ms)
[2013-02-27 09:33:09.792]  INFO  Started GET "/v1/video/50253971d10412092b077489" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.796]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:09.796]  INFO    Parameters: {"id"=>"50253971d10412092b077489"}
[2013-02-27 09:33:09.802]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.3ms)
[2013-02-27 09:33:09.803]  INFO  Completed 200 OK in 7ms (Views: 2.6ms)
[2013-02-27 09:33:09.810]  INFO  Started GET "/v1/video/4ffbdf98d104126a70000b7c" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.814]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:09.814]  INFO    Parameters: {"id"=>"4ffbdf98d104126a70000b7c"}
[2013-02-27 09:33:09.823]  INFO    Rendered v1/video/show.json.rabl within layouts/application (3.0ms)
[2013-02-27 09:33:09.824]  INFO  Completed 200 OK in 10ms (Views: 4.5ms)
[2013-02-27 09:33:09.832]  INFO  Started GET "/v1/video/50064e651c1cf44314075575" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.835]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:09.836]  INFO    Parameters: {"id"=>"50064e651c1cf44314075575"}
[2013-02-27 09:33:09.844]  INFO    Rendered v1/video/show.json.rabl within layouts/application (3.6ms)
[2013-02-27 09:33:09.845]  INFO  Completed 200 OK in 9ms (Views: 5.0ms)
[2013-02-27 09:33:09.852]  INFO  Started GET "/v1/video/5034e6781c1cf413e6044862" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.855]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:09.855]  INFO    Parameters: {"id"=>"5034e6781c1cf413e6044862"}
[2013-02-27 09:33:09.862]  INFO    Rendered v1/video/show.json.rabl within layouts/application (2.0ms)
[2013-02-27 09:33:09.862]  INFO  Completed 200 OK in 7ms (Views: 3.4ms)
[2013-02-27 09:33:09.870]  INFO  Started GET "/v1/video/50278f301c1cf4259f021538/conversations" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.968]  INFO  Started GET "/v1/video/find_or_create?provider_name=youtube&provider_id=6Nlf1I1sOqo" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.972]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:33:09.972]  INFO    Parameters: {"provider_name"=>"youtube", "provider_id"=>"6Nlf1I1sOqo"}
[2013-02-27 09:33:09.985]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (4.8ms)
[2013-02-27 09:33:09.986]  INFO  Completed 200 OK in 13ms (Views: 6.9ms)
[2013-02-27 09:33:09.995]  INFO  Started GET "/v1/video/4fb22a19d104122801038c47" for 50.56.123.84 at 2013-02-27 09:33:09 -0500
[2013-02-27 09:33:09.998]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:09.999]  INFO    Parameters: {"id"=>"4fb22a19d104122801038c47"}
[2013-02-27 09:33:10.467]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.4ms)
[2013-02-27 09:33:10.473]  INFO  Completed 200 OK in 48ms (Views: 2.9ms)
[2013-02-27 09:33:10.639]  INFO  Started GET "/v1/video/4fa9bca588ba6b277700154a" for 50.56.123.84 at 2013-02-27 09:33:10 -0500
[2013-02-27 09:33:10.671]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:10.672]  INFO    Parameters: {"id"=>"4fa9bca588ba6b277700154a"}
[2013-02-27 09:33:10.734]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.2ms)
[2013-02-27 09:33:10.739]  INFO  Completed 200 OK in 7ms (Views: 2.5ms)
[2013-02-27 09:33:10.813]  INFO  Started GET "/v1/video/4fa8b7b588ba6b17c10003c2" for 50.56.123.84 at 2013-02-27 09:33:10 -0500
[2013-02-27 09:33:10.841]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:33:10.842]  INFO    Parameters: {"id"=>"4fa8b7b588ba6b17c10003c2"}
[2013-02-27 09:33:10.900]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.2ms)
[2013-02-27 09:33:10.907]  INFO  Completed 200 OK in 6ms (Views: 2.6ms)
[2013-02-27 09:33:10.971]  INFO  Started GET "/v1/video/4fa45d2088ba6b3f46000702" for 50.56.123.84 at 2013-02-27 09:33:10 -0500
[2013-02-27 09:33:10.108] ERROR  [GT::SocialPosting] Error posting tweet to twitter via Grackle: post http://api.twitter.com/1/statuses/update.json => 403: {"request":"\/1\/statuses\/update.json","error":"The text of your tweet is too long."}
[2013-02-27 09:33:10.168]  INFO  Started GET "/v1/video/find_or_create?provider_name=youtube&provider_id=-FWnGYNlj84" for 50.56.123.84 at 2013-02-27 09:33:10 -0500
[2013-02-27 09:33:10.174]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:33:10.174]  INFO    Parameters: {"provider_name"=>"youtube", "provider_id"=>"-FWnGYNlj84"}
[2013-02-27 09:33:10.194]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (2.1ms)
[2013-02-27 09:33:10.195]  INFO  Completed 200 OK in 21ms (Views: 4.4ms)
--
[2013-02-27 09:43:50.942]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.2ms)
[2013-02-27 09:43:50.942]  INFO  Completed 200 OK in 7ms (Views: 2.7ms)
[2013-02-27 09:43:50.954]  INFO  Started GET "/v1/video/4f9565e29a725b7619004c38/conversations" for 50.56.123.84 at 2013-02-27 09:43:50 -0500
[2013-02-27 09:43:51.504]  INFO    Rendered notification_mailer/reroll_notification.html.erb (3.4ms)
[2013-02-27 09:43:51.253]  INFO  Started GET "/v1/video/find_or_create?provider_name=vimeo&provider_id=45895051" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.259]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:43:51.259]  INFO    Parameters: {"provider_name"=>"vimeo", "provider_id"=>"45895051"}
[2013-02-27 09:43:51.290]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (1.6ms)
[2013-02-27 09:43:51.291]  INFO  Completed 200 OK in 32ms (Views: 3.8ms)
[2013-02-27 09:43:51.302]  INFO  Started GET "/v1/video/505edd769a725b7f7d0028fa/conversations" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.334]  INFO  Started OPTIONS "/v1/frame/512e1ba6b415cc2aa804de01/share" for 24.39.129.89 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.456]  INFO  Started POST "/v1/frame/512e1ba6b415cc2aa804de01/share" for 24.39.129.89 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.463]  INFO  Processing by V1::FrameController#share as JSON
[2013-02-27 09:43:51.463]  INFO    Parameters: {"destination"=>["twitter"], "text"=>"well... don't build your house on the other side of a ramp! ➔@superdupersecret: Flying car crash-landed in roof of house : http://arbroath.blogspot.com/2013/02/flying-car-crash-landed-in-roof-of-house.html", "addresses"=>"", "frame_id"=>"512e1ba6b415cc2aa804de01", "frame"=>{"destination"=>["twitter"], "text"=>"well... don't build your house on the other side of a ramp! ➔@superdupersecret: Flying car crash-landed in roof of house : http://arbroath.blogspot.com/2013/02/flying-car-crash-landed-in-roof-of-house.html", "addresses"=>""}}
[2013-02-27 09:43:51.498]  INFO    Rendered v1/frame/share.json.rabl within layouts/application (1.2ms)
[2013-02-27 09:43:51.499]  INFO  Completed 200 OK in 35ms (Views: 4.2ms)
[2013-02-27 09:43:51.660]  INFO  Started GET "/v1/video/find_or_create?provider_name=youtube&provider_id=LX3v4uV0kQQ" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.665]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:43:51.665]  INFO    Parameters: {"provider_name"=>"youtube", "provider_id"=>"LX3v4uV0kQQ"}
[2013-02-27 09:43:51.685]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (1.7ms)
[2013-02-27 09:43:51.686]  INFO  Completed 200 OK in 22ms (Views: 4.2ms)
[2013-02-27 09:43:51.697]  INFO  Started GET "/v1/video/4f99e02d9a725b2130016055/conversations" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.714]  INFO  
Sent mail to henry+secret@shelby.tv (643ms)
[2013-02-27 09:43:51.771]  INFO  Started GET "/v1/video/find_or_create?provider_name=youtube&provider_id=vpt5xIRm1Rs" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.776]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:43:51.776]  INFO    Parameters: {"provider_name"=>"youtube", "provider_id"=>"vpt5xIRm1Rs"}
[2013-02-27 09:43:51.791]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (4.8ms)
[2013-02-27 09:43:51.792]  INFO  Completed 200 OK in 16ms (Views: 6.3ms)
[2013-02-27 09:43:51.800]  INFO  Started GET "/v1/video/4fa344499a725b6a12001008" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.804]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:43:51.804]  INFO    Parameters: {"id"=>"4fa344499a725b6a12001008"}
[2013-02-27 09:43:51.810]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.3ms)
[2013-02-27 09:43:51.811]  INFO  Completed 200 OK in 7ms (Views: 2.4ms)
[2013-02-27 09:43:51.818]  INFO  Started GET "/v1/video/4fa59eec88ba6b751f0007f7" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.821]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:43:51.821]  INFO    Parameters: {"id"=>"4fa59eec88ba6b751f0007f7"}
[2013-02-27 09:43:51.850]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.2ms)
[2013-02-27 09:43:51.850]  INFO  Completed 200 OK in 29ms (Views: 2.5ms)
[2013-02-27 09:43:51.858]  INFO  Started GET "/v1/video/4fa37c2f9a725b5ad6001021" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.861]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:43:51.861]  INFO    Parameters: {"id"=>"4fa37c2f9a725b5ad6001021"}
[2013-02-27 09:43:51.866]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.1ms)
[2013-02-27 09:43:51.867]  INFO  Completed 200 OK in 6ms (Views: 2.2ms)
[2013-02-27 09:43:51.874]  INFO  Started GET "/v1/video/4f96e8279a725b35850138b1" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:51.877]  INFO  Processing by V1::VideoController#show as JSON
[2013-02-27 09:43:51.877]  INFO    Parameters: {"id"=>"4f96e8279a725b35850138b1"}
[2013-02-27 09:43:51.884]  INFO    Rendered v1/video/show.json.rabl within layouts/application (1.5ms)
[2013-02-27 09:43:51.885]  INFO  Completed 200 OK in 8ms (Views: 4.1ms)
[2013-02-27 09:43:51.893]  INFO  Started GET "/v1/video/4f95e5589a725b577200609f/conversations" for 50.56.123.84 at 2013-02-27 09:43:51 -0500
[2013-02-27 09:43:52.177] ERROR  [GT::SocialPosting] Error posting tweet to twitter via Grackle: post http://api.twitter.com/1/statuses/update.json => 403: {"request":"\/1\/statuses\/update.json","error":"The text of your tweet is too long."}
[2013-02-27 09:43:52.297]  INFO  Started GET "/v1/video/find_or_create?provider_name=youtube&provider_id=45Bl7kk1yPg" for 50.56.123.84 at 2013-02-27 09:43:52 -0500
[2013-02-27 09:43:52.301]  INFO  Processing by V1::VideoController#find_or_create as JSON
[2013-02-27 09:43:52.301]  INFO    Parameters: {"provider_name"=>"youtube", "provider_id"=>"45Bl7kk1yPg"}
[2013-02-27 09:43:52.315]  INFO    Rendered v1/video/find_or_create.json.rabl within layouts/application (5.3ms)
[2013-02-27 09:43:52.316]  INFO  Completed 200 OK in 14ms (Views: 7.5ms)