Skip to content
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

Expected literal value at character 114688 #164

Closed
niqo01 opened this issue Dec 12, 2023 · 2 comments
Closed

Expected literal value at character 114688 #164

niqo01 opened this issue Dec 12, 2023 · 2 comments

Comments

@niqo01
Copy link

niqo01 commented Dec 12, 2023

Expected Behavior

No error reported in Amplitude logger.

Current Behavior

Non-fatal Exception: com.couchsurfing.mobile.data.api.AmplitudeException: Error when upload event: Expected literal value at character 114688 of [{"event_type":"session_end","user_id":"2016192872","device_id":"_redacted_","time":1702370396478,"event_properties":{},"user_properties":{},"groups":{},"group_properties":{},"platform":"Android","os_name":"android","os_version":"13","device_brand":"samsung","device_manufacturer":"samsung","device_model":"SM-A525F","carrier":"Airtel","language":"ru","ip":"$remote","version_name":"5.7.3","adid":"00000000-0000-0000-0000-000000000000","event_id":20641,"session_id":1702366959216,"insert_id":"4b305aec-d775-416c-aadf-1ff07612aa50","library":"amplitude-analytics-android\/1.12.2"},{"event_type":"session_start","user_id":"_redacted_","device_id":"_redacted_","time":1702370803893,"event_properties":{},"user_properties":{},"groups":{},"group_properties":{},"platform":"Android","os_name":"android","os_version":"13","device_brand":"samsung","device_manufacturer":"samsung","device_model":"SM-A525F","carrier":"Airtel","language":"ru","ip":"$remote","version_name":"5.7.3","adid":"00000000-0000-0000-0000-000000000000","event_id":20642,"session_id":1702370803893,"insert_id":"83c04bd6-1372-4ff2-8c2d-29c578d8a9d9","library":"amplitude-analytics-android\/1.12.2"},{"event_type":"$identify","user_id":"2016192872","device_id":"_redacted_","time":1702370803893,"event_properties":{},"user_properties":{"$set":{"AreNotificationsEnabled":"true"}},"groups":{},"group_properties":{},"platform":"Android","os_name":"android","os_version":"13","device_brand":"samsung","device_manufacturer":"samsung","device_model":"SM-A525F","carrier":"Airtel","language":"ru","ip":"$remote","adid":"00000000-0000-0000-0000-000000000000","event_id":20643,"session_id":1702370803893,"insert_id":"673c9dfc-1969-4f22-8fe7-3015c97026dc","library":"amplitude-analytics-android\/1.12.2"},{"event_type":"$identify","user_id":"2016192872","device_id":"_redacted_","time":1702370811568,"event_properties"<truncated: 196652 chars>
       at com.couchsurfing.mobile.data.api.AmplitudeException.<init>(AmplitudeException.java:3)
       at com.couchsurfing.mobile.data.api.AmplitudeLoggerProvider$getLogger$1.error(KotlinProvider.kt:47)
       at com.amplitude.core.platform.EventPipeline$upload$1.invokeSuspend(EventPipeline.kt:144)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

Possible Solution

Unknown

Steps to Reproduce

Unknown

Environment

  • Amplitude SDK Version: 1.12.2
  • Device: Samsung Galaxy A52
  • Device OS and Version: Android 13
@qingzhuozhen
Copy link
Contributor

Hi @niqo01 , the exception seems a JSON exception, are there any special characters in event properties?

@izaaz
Copy link
Collaborator

izaaz commented Aug 8, 2024

We've added validations to make sure the payload being sent to AMplitude is valid. So this should no longer be a problem for our newer SDK versions > 1.6.0

@izaaz izaaz closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants