midhunhk / message-counter

A native Android App which tracks the number of Text messages sent in a cycle written in Kotlin
https://midhunhk.com/message-counter/
Apache License 2.0
21 stars 10 forks source link

SQLError - unrecognized token #30

Closed midhunhk closed 7 years ago

midhunhk commented 7 years ago

New type of error from Google Play Console.

Caused By : SQL(query) error or missing database. (unrecognized token: "'250�" (code 1): , while compiling: SELECT contacts_view._id AS _id, data1 AS number FROM raw_contacts JOIN view_contacts as contacts_view ON (contacts_view._id = raw_contacts.contact_id) JOIN (SELECT data_id,normalized_number FROM phone_lookup WHERE (phone_lookup.min_match = '052')) AS lookup ON lookup.data_id=data._id JOIN data ON data.raw_contact_id=raw_contacts._id WHERE (PHONE_NUMBERS_EQUAL(data.data1, '250�Bonus', 1)) ORDER BY is_sim , length(lookup.normalized_number) DESC) ################################################################# at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135) at android.content.ContentProviderProxy.query(ContentProviderProxy.java:421) at android.content.ContentResolver.query(ContentResolver.java:536) at android.content.ContentResolver.query(ContentResolver.java:478) at com.ae.apps.common.managers.ContactManager.getContactIdFromAddress(ContactManager.java) at com.ae.apps.messagecounter.utils.MessageCounterUtils.sortThisMap(MessageCounterUtils.java) at <OR>.getMessageCountDegrees(MessageCounterUtils.java) at <OR>.getContactMessageList(MessageCounterUtils.java) at <OR>.convertAddressToContact(MessageCounterUtils.java) at <OR>.getIndexFromDate(MessageCounterUtils.java) at <OR>.getWeekStartDate(MessageCounterUtils.java) at <OR>.getMessageLimitValue(MessageCounterUtils.java) at <OR>.getCycleSentCount(MessageCounterUtils.java) at com.ae.apps.messagecounter.activities.MainActivity$1.run(MainActivity.java) at java.lang.Thread.run(Thread.java:762)

midhunhk commented 7 years ago

This looks to be a data issue where PHONE_NUMBERS_EQUAL seems to having the value '250�Bonus'. This seems to be an invalid data and there doesn't seem to be any code issue from the app. Hence closing.