amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

Malformed Event(s) JSON using 1.12.0 SDK #159

Closed ricardobranco closed 8 months ago

ricardobranco commented 8 months ago

Expected Behavior

Generated events JSON should be valid

Current Behavior

Generated events JSON is invalid. The value of field client_upload_time should be a string

{
"api_key": "API_KEY",
"client_upload_time": 2023-11-13T12
07: 48.509Z,
"events": [
{
....
}]

Possible Solution

In file core/src/main/java/com/amplitude/core/utilities/HttpClient.kt#getBodyStr the else statement (when minId != null doesn't add "" around the field)

Steps to Reproduce

Log an event to amplitude

Environment

justin-fiedler commented 8 months ago

Hi @ricardobranco, thanks for bringing this to our attention. We will work to get a fix out soon.

github-actions[bot] commented 8 months ago

:tada: This issue has been resolved in version 1.12.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: