{"action":"created","issue":{"url":"https://api.github.com/repos/mixpanel/mixpanel-ruby/issues/73","labels_url":"https://api.github.com/repos/mixpanel/mixpanel-ruby/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/mixpanel/mixpanel-ruby/issues/73/comments","events_url":"https://api.github.com/repos/mixpanel/mixpanel-ruby/issues/73/events","html_url":"https://github.com/mixpanel/mixpanel-ruby/issues/73","id":66358048,"number":73,"title":"Randomly thows errors","user":{"login":"buger","id":14009,"avatar_url":"https://avatars.githubusercontent.com/u/14009?v=3","gravatar_id":"","url":"https://api.github.com/users/buger","html_url":"https://github.com/buger","followers_url":"https://api.github.com/users/buger/followers","following_url":"https://api.github.com/users/buger/following{/other_user}","gists_url":"https://api.github.com/users/buger/gists{/gist_id}","starred_url":"https://api.github.com/users/buger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buger/subscriptions","organizations_url":"https://api.github.com/users/buger/orgs","repos_url":"https://api.github.com/users/buger/repos","events_url":"https://api.github.com/users/buger/events{/privacy}","received_events_url":"https://api.github.com/users/buger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-04T19:42:50Z","updated_at":"2015-04-04T19:52:37Z","closed_at":null,"body":"It happen from time to time, probably because some API issues, but definitely this case not handled:\r\n\r\n```\r\nirb(main):006:0> tracker.track(2, \"Viewed people search\")\r\nNoMethodError: undefined method `[]' for nil:NilClass\r\n\tfrom /usr/local/bundle/gems/mixpanel-ruby-2.0.1/lib/mixpanel-ruby/consumer.rb:106:in `send!'\r\n\tfrom org/jruby/RubyMethod.java:124:in `call'\r\n\tfrom /usr/local/bundle/gems/mixpanel-ruby-2.0.1/lib/mixpanel-ruby/events.rb:70:in `track'\r\n\tfrom /usr/local/bundle/gems/mixpanel-ruby-2.0.1/lib/mixpanel-ruby/tracker.rb:72:in `track'\r\n\tfrom (irb):6:in `evaluate'\r\n\tfrom org/jruby/RubyKernel.java:1107:in `eval'\r\n\tfrom org/jruby/RubyKernel.java:1507:in `loop'\r\n\tfrom org/jruby/RubyKernel.java:1270:in `catch'\r\n\tfrom org/jruby/RubyKernel.java:1270:in `catch'\r\n\tfrom /opt/jruby/bin/irb:13:in `(root)'\r\n```"},"comment":{"url":"https://api.github.com/repos/mixpanel/mixpanel-ruby/issues/comments/89650270","html_url":"https://github.com/mixpanel/mixpanel-ruby/issues/73#issuecomment-89650270","issue_url":"https://api.github.com/repos/mixpanel/mixpanel-ruby/issues/73","id":89650270,"user":{"login":"buger","id":14009,"avatar_url":"https://avatars.githubusercontent.com/u/14009?v=3","gravatar_id":"","url":"https://api.github.com/users/buger","html_url":"https://github.com/buger","followers_url":"https://api.github.com/users/buger/followers","following_url":"https://api.github.com/users/buger/following{/other_user}","gists_url":"https://api.github.com/users/buger/gists{/gist_id}","starred_url":"https://api.github.com/users/buger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buger/subscriptions","organizations_url":"https://api.github.com/users/buger/orgs","repos_url":"https://api.github.com/users/buger/repos","events_url":"https://api.github.com/users/buger/events{/privacy}","received_events_url":"https://api.github.com/users/buger/received_events","type":"User","site_admin":false},"created_at":"2015-04-04T19:52:37Z","updated_at":"2015-04-04T19:52:37Z","body":"I made some debugging (simple monkey patch: https://gist.github.com/buger/7eb768b352785cc34b4d)\r\nAnd here what it gets from mixpanel server: \r\n\r\nirb(main):185:0> tracker.track(2, \"Viewed people search\")\r\n{:uri=>\"/track\", :endpoint=>\"https://api.mixpanel.com/track\", :form_data=>{\"data\"=>\"eyJldmVudCI6IlZpZXdlZCBwZW9wbGUgc2VhcmNoIiwicHJvcGVydGllcyI6eyJkaXN0aW5jdF9pZCI6MiwidG9rZW4iOiI0NjUzYzFkNzY1ZGUzMjIyNDQzMWY4ZDhlMTUxMTg4OSIsInRpbWUiOjE0MjgxNzcwOTAsIm1wX2xpYiI6InJ1YnkiLCIkbGliX3ZlcnNpb24iOiIyLjAuMSJ9fQ==\", \"verbose\"=>1}, :code=>\"200\", :body=>\"\"}\r\nNoMethodError: undefined method `[]' for nil:NilClass\r\n\tfrom /usr/local/bundle/gems/mixpanel-ruby-2.0.1/lib/mixpanel-ruby/consumer.rb:106:in `send!'"}}