Closed
Description
If I call trackEvent
in MixPanelAPI
with a JSONObject containing a null value the method throws an exception. This is caught internally but the result is that the event is not logged to MixPanel.
Line in question is here. properties.get(key)
will throw a JSONException
if the value is null. The caller to this method could validate input but it seems preferable to handle the nulls and track the event instead of swallowing the exception and not logging the event.
E/MixpanelAPI: Exception tracking event test-event
org.json.JSONException: No value for key_with_null_value
at org.json.JSONObject.get(JSONObject.java:354)
Oddly enough, I can only make it throw an exception on devices running Android 4.3 (I used a HTC One). Anything higher than that works, which is perplexing but maybe something changed in implementations somewhere along the way.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels