Error contact reading

Albert Vaca Cintora albertvaka at gmail.com
Wed Oct 16 18:15:53 BST 2019


I don't see any use of this function that isn't with either a single
contact or all the contacts (correct me if I'm wrong). The "too many
variables" would be avoided by having a method that in the second case just
doesn't use a "where in", because the problem is too many variables and not
too many results.

On Mon, Oct 14, 2019, 07:06 Simon Redman <simon at ergotech.com> wrote:

> Yes, probably we could do this. The trouble is that for the first time
> running synchronization the desktop would then call this method with the
> complete list of changed contacts. Since it is first sync, it would be all
> of them, thus it would have the same problem.
>
> So the simplest solution would be to just break it in to batches since
> this solves both cases. But what is a safe batch size?
>
> On October 12, 2019 12:01:53 PM PDT, Albert Vaca Cintora <
> albertvaka at gmail.com> wrote:
>>
>> Or even, if we are requesting *all* the IDs, I guess we could remove
>> the `WHERE ID IN()` in that call?
>>
>> On Sat, Oct 12, 2019 at 9:00 PM Albert Vaca Cintora
>> <albertvaka at gmail.com> wrote:
>>
>>>
>>>  Actually here is the call for all the IDs [1], the previous one only
>>>  requests a single ID.
>>>
>>>  https://invent.kde.org/kde/kdeconnect-android/blob/master/src/org/kde/kdeconnect/Plugins/ContactsPlugin/ContactsPlugin.java#L196
>>>
>>>  On Sat, Oct 12, 2019 at 8:57 PM Albert Vaca Cintora
>>>  <albertvaka at gmail.com> wrote:
>>>
>>>>
>>>>  It looks like in getColumnsFromContactsForIDs [1] we are passing to
>>>>  many IDs. A solution probably would be we could request them in
>>>>  smaller batches.
>>>>
>>>>  https://invent.kde.org/kde/kdeconnect-android/blob/master/src/org/kde/kdeconnect/Plugins/ContactsPlugin/ContactsPlugin.java#L161
>>>>
>>>>
>>>>  On Sat, Oct 12, 2019 at 7:19 PM Simon Redman <simon at ergotech.com> wrote:
>>>>
>>>>>
>>>>>  Hmm. I have no idea what is causing this (since it's below Android's
>>>>>  "we're totally not using a sqlite database" layer)
>>>>>
>>>>>  Is this reliably reproducible? (If so, how?)
>>>>>
>>>>>  On 10/12/19 8:48 AM, Aleix Pol wrote:
>>>>>
>>>>>>  Hey Simon,
>>>>>>  I was looking at adb logs, I saw this error, maybe you can take a look.
>>>>>>
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:
>>>>>>  android.database.sqlite.SQLiteException: too many SQL variables (code
>>>>>>  1): , while compiling: SELECT lookup, contact_last_updated_timestamp
>>>>>>  FROM view_contacts WHERE ((1)) AND (lookup
>>>>>>  IN(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
>>>>>>  ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
>>>>>>  ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
>>>>>>  ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,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?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
>>>>>>  ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
>>>>>>  ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?))
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  android.content.ContentResolver.query(ContentResolver.java:754)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  android.content.ContentResolver.query(ContentResolver.java:704)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  android.content.ContentResolver.query(ContentResolver.java:662)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Helpers.ContactsHelper.getColumnsFromContactsForIDs(ContactsHelper.java:307)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Plugins.ContactsPlugin.ContactsPlugin.handleRequestAllUIDsTimestamps(ContactsPlugin.java:196)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Plugins.ContactsPlugin.ContactsPlugin.onPacketReceived(ContactsPlugin.java:253)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Device.onPacketReceived(Device.java:569)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Backends.BaseLink.packageReceived(BaseLink.java:84)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Backends.LanBackend.LanLink.receivedNetworkPacket(LanLink.java:255)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Backends.LanBackend.LanLink.lambda$reset$0$LanLink(LanLink.java:109)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  org.kde.kdeconnect.Backends.LanBackend.-$$Lambda$LanLink$TabvaCXA5qL_bcJDmIELWusNThw.run(Unknown
>>>>>>  Source:4)
>>>>>>  10-12 17:36:27.053 29958  2983 E KDE/Device:    at
>>>>>>  java.lang.Thread.run(Thread.java:764)
>>>>>>
>>>>>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20191016/c67be0fa/attachment.html>


More information about the KDEConnect mailing list