{"action":"opened","issue":{"url":"https://api.github.com/repos/snowplow/snowplow-android-tracker/issues/107","labels_url":"https://api.github.com/repos/snowplow/snowplow-android-tracker/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/snowplow/snowplow-android-tracker/issues/107/comments","events_url":"https://api.github.com/repos/snowplow/snowplow-android-tracker/issues/107/events","html_url":"https://github.com/snowplow/snowplow-android-tracker/issues/107","id":63788908,"number":107,"title":"NPE when subject is null","user":{"login":"n-belokopytov","id":6979232,"avatar_url":"https://avatars.githubusercontent.com/u/6979232?v=3","gravatar_id":"","url":"https://api.github.com/users/n-belokopytov","html_url":"https://github.com/n-belokopytov","followers_url":"https://api.github.com/users/n-belokopytov/followers","following_url":"https://api.github.com/users/n-belokopytov/following{/other_user}","gists_url":"https://api.github.com/users/n-belokopytov/gists{/gist_id}","starred_url":"https://api.github.com/users/n-belokopytov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-belokopytov/subscriptions","organizations_url":"https://api.github.com/users/n-belokopytov/orgs","repos_url":"https://api.github.com/users/n-belokopytov/repos","events_url":"https://api.github.com/users/n-belokopytov/events{/privacy}","received_events_url":"https://api.github.com/users/n-belokopytov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-23T17:50:09Z","updated_at":"2015-03-23T17:50:09Z","closed_at":null,"body":"Crash\r\n\r\n     Caused by: java.lang.NullPointerException\r\n            at com.snowplowanalytics.snowplow.tracker.Tracker.addDefaultContextData(Tracker.java:180)\r\n            at com.snowplowanalytics.snowplow.tracker.Tracker.completePayload(Tracker.java:149)\r\n            at com.snowplowanalytics.snowplow.tracker.Tracker.trackUnstructuredEvent(Tracker.java:371)\r\n            at com.snowplowanalytics.snowplow.tracker.Tracker.trackScreenView(Tracker.java:585)\r\n            at com.snowplowanalytics.snowplow.tracker.Tracker.trackScreenView(Tracker.java:547)\r\n            at com.chefsfeed.Analytics.activityStart(Analytics.java:191)\r\n\r\nThis is the code of tracker creation\r\n\r\n            RequestCallback callback = new RequestCallback() {\r\n                @Override\r\n                public void onSuccess(int successCount) {\r\n                    Log.d(TAG, \"Buffer length for POST/GET:\" + successCount);\r\n                }\r\n                @Override\r\n                public void onFailure(int successCount, int failureCount) {\r\n                    Log.d(TAG, \"Failures: \" + failureCount + \"; Successes: \" + successCount);\r\n                }\r\n            };\r\n\r\n            Emitter e2 = new Emitter\r\n                    .EmitterBuilder(\"com.chefsfeed\", context)\r\n                    .callback(callback)\r\n                    .build();\r\n\r\n            // Create a Tracker with all options\r\n            mTracker = new Tracker\r\n                    .TrackerBuilder(e2, context.getPackageName(), context.getApplicationInfo().name)\r\n                    .base64(true) // Optional - defines if we use base64 encoding\r\n                    .platform(DevicePlatforms.Mobile) // Optional - defines what platform the event will report to be on\r\n                    .build();\r\n\r\nNotice the absence of an optional subject setter.\r\n\r\nNPE is raised during trackScreenView in\r\n            String idScreen = cfActivity.getClass().getCanonicalName();\r\n            tracker.trackScreenView(cfActivity.getActivityName(), idScreen);\r\n"}}