-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malformed Event(s) JSON using 1.10.2 SDK #134
Comments
Thank you for choosing Amplitude. We are actively addressing this issue and will keep you updated on any progress. |
Hi @mariusgherman, did you have this issue with earlier versions or it starts happening after 1.10.2? I set up a local example and send several events. All events were sent successfully. Not sure how you observe stored events JSON string and sent HTTP payloads. Could you elaborate on it? |
@Mercy811 unfortunately i have only used the 1.10.2 (i will try with earlier versions to confirm and post my findings). |
@Mercy811 i've just tried with SDK version 1.10.1. I'm not seeing anymore malformed events in the server logs. |
Hi @mariusgherman, thanks for your clarification and confirmation. I will investigate more. |
Hi @mariusgherman, would like to keep you updated. v1.20.2 starts migrating legacy data. So it’s likely that something wrong in this PR.
Thanks for the info you provided. They really help me narrow the bug down. I will continue working on this. |
@mariusgherman Did you use the legacy SDK on the same device? |
Hi @mariusgherman is it possible you are creating/using multiple instances of the |
we are in the process of upgrading our amplitude legacy SDK to the kotlin SDK, so yes, this will be the production use case indeed |
Not the case. We are ensuring that we have a single instance of Amplitude though usage of Dagger injection scoping.Could it be the case that we are logging multiple events at the same time from different threads ? |
Thanks @mariusgherman.
I don't think this is the case the provided output. A single instance should maintain a single "latestEvenId" that is used to increate the We noticed each pair has the same event_type, event_properties, timestamp (+/- 1 millisecond), new library, etc - except insert_id. I think, it is highly unlikely that events 37, 38, 40 were migrated from old SDK - in this case they would have legacy library and old timestamps. Can you please share the Dagger configuration you are using to enforce the single instance of Amplitude? We also notice a difference in casing (Screen Name/ Screen name) in event_properties for events 72/40, maybe that can help locate where each is being tracked. |
@justin-fiedler
|
Thanks @mariusgherman, could you add some logging to confirm that only a single instance is created?
|
@justin-fiedler sorry for the late reply
|
Hey @justin-fiedler @yuhao900914 @Mercy811 Are there any updates regarding this. I'm facing this issue on 1.10.4 as well and it is impacting our customers. |
Alternatively it would be great if we could have an option in the SDK to ignore very old events or even clear the old events from the system. If there already is, could you please let me know, it would be greatly appreciated |
@ajay-nagarajan this issue is fixed in our newer SDK versions. We validate the data to make sure its a valid json before we send it over to Amplitude. So this should no longer be happening. |
Expected Behavior
Generated events JSON should be valid
Current Behavior
Generated events JSON is invalid
Malformed JSON string #1
Malformed JSON string example #2
Possible Solution
com.amplitude.android.utilities.AndroidStorage
implementationSteps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: