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

Sending SMS is not working on a few contacts #380

Closed
gautierlabarre opened this issue Dec 6, 2018 · 16 comments
Closed

Sending SMS is not working on a few contacts #380

gautierlabarre opened this issue Dec 6, 2018 · 16 comments
Labels
bug An issue that is confirmed as a bug needs testing A contribution that needs testing

Comments

@gautierlabarre
Copy link
Contributor

gautierlabarre commented Dec 6, 2018

Hi, as I said yesterday here is the second bug (but good luck, this one is tricky)

Describe the bug
After a long serie of tests it seems that some contacts are not receiving my texts sent from GSConnect (while they receive those from my phone). I identified one contact with whom it's not working at all while it used to. (I don't want to bother asking for the others).
It is working fine for some, for instance i have a second phone number and i receive my messages properly.

The visual output is random I mean : Sometimes the message from GSConnect is displayed in gray (like if it's pending) and sometimes (most often) it's shown as if everything went smoothly.
For ALL messages i write on GSConnect, they ALL appear on my phone, like they were properly sent (textra latest version).
I activated the confirmation of "sent" a long time ago (on textra) and messages from GSConnect were never displayed as "Received" on textra before (even if they did), it has not changed.

To Reproduce
Hard to do :

  1. Send an SMS from GSConnect
  2. Ask your contact if they received it

Debug output
So, I've three differents output for you, the first one is an SMS not received.
The second is received
The third and last is two sms send (same content) the first contact did not received and the second got it.
I replaced the phone number with * of course.

First output :

DEBUG: [core.js:send:450]: OnePlus: {
  "id": 1544126265698,
  "type": "kdeconnect.sms.request",
  "body": {
    "sendSms": true,
    "phoneNumber": "********",
    "messageBody": "test message"
  }
}
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
DEBUG: [core.js:receive/<:404]: OnePlus: {
  "id": 1544126276426,
  "type": "kdeconnect.sms.messages",
  "body": {
    "messages": [
      {
        "address": "********",
        "body": "test message",
        "date": 1544126266163,
        "type": 2,
        "read": 1,
        "thread_id": 4,
        "_id": 3482,
        "event": 1
      }
    ],
    "event": "batch_messages"
  }
}
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed
g_object_unref: assertion 'G_IS_OBJECT (object)' failed



DEBUG: [notification.js:closeNotification:494]: M: test message
DEBUG: [core.js:send:450]: OnePlus: {
  "id": 1544126336326,
  "type": "kdeconnect.notification.request",
  "body": {
    "cancel": "M: test message"
  }
}

Second output (message received)

DEBUG: [core.js:send:450]: OnePlus: {
  "id": 1544126376838,
  "type": "kdeconnect.sms.request",
  "body": {
    "sendSms": true,
    "phoneNumber": "+33***",
    "messageBody": "test message"
  }
}
Object Meta.Background (0x55ea04bab9f0), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x55e9fcb7a280 ==
#0   55ea041ae520 i   resource:///org/gnome/shell/ui/background.js:721 (7fdd4ee0c790 @ 22)
#1   55ea041ae480 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:208 (7fdd4f1db9d0 @ 54)
#2   55ea041ae360 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:342 (7fdd4f1dba60 @ 1742)
#3   55ea041ae2d0 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:355 (7fdd4f1dbaf0 @ 100)
#4   55ea041ae258 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:370 (7fdd4f1dbb80 @ 10)
#5   55ea041ae188 i   resource:///org/gnome/gjs/modules/signals.js:128 (7fdd4f1c18b0 @ 386)
#6   55ea041ae0f8 i   resource:///org/gnome/shell/ui/tweener.js:244 (7fdd4f1d99d0 @ 159)
#7   55ea041ae050 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7fdd4f1b0b80 @ 71)
#8   55ea041adfd0 i   resource:///org/gnome/shell/ui/tweener.js:219 (7fdd4f1d9940 @ 15)
g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
Object Meta.Background (0x55ea04bab9f0), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x55e9fcb7a280 ==
#0   55ea041ae5a8 i   resource:///org/gnome/shell/ui/background.js:721 (7fdd4ee0c790 @ 22)
#1   55ea041ae520 i   resource:///org/gnome/shell/ui/tweener.js:112 (7fdd4f1d9040 @ 37)
#2   55ea041ae480 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:208 (7fdd4f1db9d0 @ 54)
#3   55ea041ae360 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:342 (7fdd4f1dba60 @ 1742)
#4   55ea041ae2d0 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:355 (7fdd4f1dbaf0 @ 100)
#5   55ea041ae258 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:370 (7fdd4f1dbb80 @ 10)
#6   55ea041ae188 i   resource:///org/gnome/gjs/modules/signals.js:128 (7fdd4f1c18b0 @ 386)
#7   55ea041ae0f8 i   resource:///org/gnome/shell/ui/tweener.js:244 (7fdd4f1d99d0 @ 159)
#8   55ea041ae050 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7fdd4f1b0b80 @ 71)
#9   55ea041adfd0 i   resource:///org/gnome/shell/ui/tweener.js:219 (7fdd4f1d9940 @ 15)
g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
Object Meta.Background (0x55ea04bab9f0), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x55e9fcb7a280 ==
#0   55ea041ae5a8 i   resource:///org/gnome/shell/ui/background.js:721 (7fdd4ee0c790 @ 22)
#1   55ea041ae520 i   resource:///org/gnome/shell/ui/tweener.js:112 (7fdd4f1d9040 @ 37)
#2   55ea041ae480 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:208 (7fdd4f1db9d0 @ 54)
#3   7ffdbc90deb0 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:342 (7fdd4f1dba60 @ 1742)
#4   55ea041ae2d0 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:355 (7fdd4f1dbaf0 @ 100)
#5   55ea041ae258 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:370 (7fdd4f1dbb80 @ 10)
#6   55ea041ae188 i   resource:///org/gnome/gjs/modules/signals.js:128 (7fdd4f1c18b0 @ 386)
#7   55ea041ae0f8 i   resource:///org/gnome/shell/ui/tweener.js:244 (7fdd4f1d99d0 @ 159)
#8   55ea041ae050 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7fdd4f1b0b80 @ 71)
#9   55ea041adfd0 i   resource:///org/gnome/shell/ui/tweener.js:219 (7fdd4f1d9940 @ 15)
g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
DEBUG: [core.js:receive/<:404]: OnePlus: {
  "id": 1544126380344,
  "type": "kdeconnect.sms.messages",
  "body": {
    "messages": [
      {
        "address": "+33***",
        "body": "test message",
        "date": 1544126377910,
        "type": 2,
        "read": 1,
        "thread_id": 99,
        "_id": 3483,
        "event": 1
      }
    ],
    "event": "batch_messages"
  }
}
DEBUG: [core.js:receive/<:404]: OnePlus: {
  "id": 1544126380361,
  "type": "kdeconnect.sms.messages",
  "body": {
    "messages": [
      {
        "address": "+33***",
        "body": "test message",
        "date": 1544126377910,
        "type": 2,
        "read": 1,
        "thread_id": 99,
        "_id": 3483,
        "event": 1
      }
    ],
    "event": "batch_messages"
  }
}

And last output, first contact : nothing, second one OK
(sorry i should have checked the phone number and call them 1 and 2 before replacing them it seems important now ... I can do it again if you want)

DEBUG: [core.js:send:450]: OnePlus: {
  "id": 1544126860622,
  "type": "kdeconnect.sms.request",
  "body": {
    "sendSms": true,
    "phoneNumber": "*** (not working)",
    "messageBody": "test message"
  }
}
DEBUG: [core.js:send:450]: OnePlus: {
  "id": 1544126863373,
  "type": "kdeconnect.sms.request",
  "body": {
    "sendSms": true,
    "phoneNumber": "+33*** (working)",
    "messageBody": "test message"
  }
}
DEBUG: [core.js:receive/<:404]: OnePlus: {
  "id": 1544126863281,
  "type": "kdeconnect.sms.messages",
  "body": {
    "messages": [
      {
        "address": "*** (not working)",
        "body": "test message",
        "date": 1544126860959,
        "type": 2,
        "read": 1,
        "thread_id": 4,
        "_id": 3490,
        "event": 1
      }
    ],
    "event": "batch_messages"
  }
}
DEBUG: [core.js:receive/<:404]: OnePlus: {
  "id": 1544126863548,
  "type": "kdeconnect.sms.messages",
  "body": {
    "messages": [
      {
        "address": "+33***",
        "body": "test message",
        "date": 1544126863475,
        "type": 2,
        "read": 1,
        "thread_id": 23,
        "_id": 3491,
        "event": 1
      }
    ],
    "event": "batch_messages"
  }
}
DEBUG: [core.js:receive/<:404]: OnePlus: {
  "id": 1544126863559,
  "type": "kdeconnect.sms.messages",
  "body": {
    "messages": [
      {
        "address": "+33***",
        "body": "test message",
        "date": 1544126863475,
        "type": 2,
        "read": 1,
        "thread_id": 23,
        "_id": 3491,
        "event": 1
      }
    ],
    "event": "batch_messages"
  }
}
DEBUG: [notification.js:closeNotification:494]: D: test message (the one working)
DEBUG: [core.js:send:450]: OnePlus: {
  "id": 1544126864060,
  "type": "kdeconnect.notification.request",
  "body": {
    "cancel": "D: test message"
  }
}


System Details (please complete the following information):

  • GSConnect version: 17
    • Installed from: Github master from #378
  • GNOME/Shell version: 3.30.1
  • Distro/Release: Ubuntu 18.10

GSConnect environment (if applicable):

  • Paired Device(s): Oneplus 6 up to date
  • KDE Connect app version: latest from 29 november

Additional context
It seems that phones with +33 before the number are working unlike the other. I did not save any contact with +33 myself. (maybe i should remove all messages from textra with the contact without +33 and it'll work, (as if it'll be seen as new contact for GSConnect and prepend the +33 ?)

The contact i tried and with whom it's not working used to work fine before.
It worked from the version 16 and still worked fine with the latest version and out of the blue (without any action from my part (no upgrades) it stopped).

I know those kind of bugs are tough so i'll try my best to give you more logs if you need.
Thanks :)

@andyholmes
Copy link
Collaborator

Hmm, phone numbers are tricky, especially all the international variants. Depending on how small the change is I might be able to fix this from my phone though :P

I can see that the messages are being entered in the SMS history which is good news. Textra seems to be free, but not open source, so it's hard to tell what it might be doing internally to futz with phone numbers. I'm sure Google uses libphonenumber, but I'm not sure if that's in Google Messages or built into Android's SMS libraries.

Can you give a list of "changed" but not "censored" phone numbers that are working/not working? For example: "works: +33 1234 5678", "broken: 12345678" with correct lengths, spacing, special characters etc? The phone number comparison code did recently change to allow for non-numeric "addresses" and other things.

@gautierlabarre
Copy link
Contributor Author

Hello,

I've tried two things for you.

First the list (i just changed the lasts two digits by 5 for their own privacy):

Phone number (on phone)  phone number (on Gsconnect log) works  used to work
0652644055 652644055 NO YES
0674379755 674379755 NO YES
0688561055 +33688561055 YES never tried before
0663184055 663184055 NO YES
0635448655 635448655 NO YES
0642224055 +33642224055 YES never tried before

From then on, two options, either old sms were the reason it was not working (due to an update from either gsconnect, kdeconnect, android or textra) OR it was simply the +33.

I tried deleting all messages with 674379755, restart GSConnect and send another text. Still not received. So i updated this contact to add the +33 on android, it now looks like that : +33674379755 and i restarted GSConnect again, this time it worked ! My contact did receive the "test message".

This raises a question, why on GSConnect's log, people i didn't text before have the prefix +33, while i haven't save them like that on my phone, but did not add the prefix for the "faulty" contact (674379755) ? I'm just curious :)

So, is there a fix you can do, or do i have to update all my phone number ? :D (if it's linked to this, of course, i case it's not, i have all the logs saved on a file for you).

@andyholmes
Copy link
Collaborator

First the list (i just changed the lasts two digits by 5 for their own privacy):

Thanks, this is really helpful list.

This raises a question, why on GSConnect's log, people i didn't text before have the prefix +33...

Because of how complicated phone numbers can be, both KDE Connect and GSConnect decided on a very simple method for comparing phone numbers. Basically we remove special characters (()+- and leading 0's), then we check if either number "ends with" the other. So a number like +33 688561055 will match 0688561055 and we know it's from that contact. But these should only be removed when we're comparing numbers not permanently, maybe that's a bug I can look for.

It gets even more complicated because when we sync contacts from the phone we get them in (very old) VCard 2.1 format, which can even have phone numbers in different formats depending on the version of Android. Heh, I guess it's kind of complicated to explain how complicated this all is.

Probably what is happening, is if we send to a number like 0674379755 the zero lets Android (libphonenumber) know to add +33 because it knows what country you're in. But if we send to 674379755 maybe it thinks that's the whole number or doesn't know what to do.

So, is there a fix you can do, or do i have to update all my phone number ?

I think if there is a fix, it might be simple, but to find out I would have to make a bunch of test Zips for you to try and that will have to wait until my new laptop arrives in the mail 😞. Even typing these answers on my tablet takes a really long time :P

I would say to fix this now you probably have to change the numbers but it might be easier on https://contacts.google.com/ if you sync your contacts there. But you can definitely leave this bug open until I have a chance to try some things.

@andyholmes andyholmes added the bug An issue that is confirmed as a bug label Dec 8, 2018
@gautierlabarre
Copy link
Contributor Author

Thanks for the explanation, I understand it can be a headache (just by going on contacts.google.com, the table displays phone number with the +33 while the detail modal shows with the leading 0).

Anyways, i'll update only a few contacts, so i'll be able to tell if your ZIP will resolve the issue.
Don't worry i can wait now that i know how to fix it myself.

@andyholmes
Copy link
Collaborator

Hi, sorry I haven't come back to this in awhile, but I have been looking through the related code since I was working on Contacts recently.

Could you tell me in the file ~/.cache/gsconnect/<device-id>/contacts.json if the phone numbers are correct and the same as on your phone? Since I'm in north america it's hard for me to test european phone numbers since Android "knows" where I am.

I tried adding a contact with a number like 0652644055 and it was exported as 065-264-4055 (north american format) so Android didn't break it, but it mangled it a bit. I wonder if that's where the problem is?

@andyholmes
Copy link
Collaborator

Wait, I think I got it :D Try this Zip please:

[email protected]

@andyholmes andyholmes added the needs testing A contribution that needs testing label Jan 5, 2019
@andyholmes andyholmes added this to the v20 milestone Jan 5, 2019
@gautierlabarre
Copy link
Contributor Author

gautierlabarre commented Jan 6, 2019

Hello,

I saw your message right away, but i needed to update my contact to remove the +33 and set the 06 instead. Then i had to check if it was still not working on the previous version, before i try this one.

I had to dissociate my phone to my computer to do so, right ? No easier way ?

Tested on 3 contacts. It works but it seems to work only if the contact has already a message from me (so it's already on the list, on the left of the message window).

After i deleted all messages, i clicked on the icon "+" and write a text, it was never received. Then i write one with my phone (received) and one with your new version (by clicking the contact on the list) (received).

On another contact i tried one message with old version : not received, with the ZIP it worked :)

I also have a contact written as north american format on contact.google.fr (06x-xxx-xxxx) which is not a proper way to write a french phone number, but it's working on your new version, i tried a message yesterday with the previous version, and he did not received it.

Apart from "new messages" your zip seems to have fixed the issue.

@andyholmes
Copy link
Collaborator

I had to dissociate my phone to my computer to do so, right ? No easier way ?

Contacts should sync changes every time you press the + button now, maybe only the very latest though.

Apart from "new messages"...

Hmm, that is strange because the number should come from the same place. Can you use the generate log feature and check the outgoing packet? The phone numbers for the conversation list come from the SMS history, while the new conversations get the number from the address book (eg. north american format). So maybe the ones that come from vCards aren't working after all.

@gautierlabarre
Copy link
Contributor Author

OK, so first of all, the way logs are generated was a bit confusing for me.
If i understood properly, when i click generate log i have some sort of "alert" being displayed saying something like : "do your thing and THEN click on show log". So i should not close this window until i get to reproduce the bug, right ? If yes, it's a weird UX choice, creating a file and then refreshing it would be easier to understand (gedit shows a message when the text has been updated). Once i manage to understand this, it's pretty neat, i could just save the file and see it later.

Anyways, I got home and my phone paired with my computer, i deleted all messages and tried a fresh conversation (selecting contact on your view) : The message wasn't received, and i don't have the contact appearing on the left side of the window. Then i tried to write a few more messages (still nothing) until i unpair the device and paired it back (duh) and then it worked.

Onto the log part now :
First, i got this before i could figure out, how the new logging system worked, it looked important 😉 ...

janv. 07 18:39:12 gjs[7474]: JS WARNING: [/home/gautier/.local/share/gnome-shell/extensions/[email protected]/service/ui/device.js 932]: reference to undefined property "sms"

and then, the first message sent :

janv. 07 18:53:13 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:send:482]: OnePlus: {
                                                                "id": 1546883593349,
                                                                "type": "kdeconnect.sms.request",
                                                                "body": {
                                                                  "sendSms": true,
                                                                  "phoneNumber": "674375050",
                                                                  "messageBody": "Message test 1"
                                                                }
                                                              }

Message not received. As i wasn't sure, (at the time) on how the logs were fetched, i did not get any logs from the other texts i sent, but i bet they look the same.

I received a message (no libnotify's notification, no message shown on your message view).


janv. 07 18:56:10 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546883770102,
                                                                "type": "kdeconnect.telephony",
                                                                "body": {
                                                                  "event": "sms",
                                                                  "messageBody": "Rien",
                                                                  "contactName": "M",
                                                                  "phoneThumbnail": "",
                                                                  "phoneNumber": "+33674375050"
                                                                }
                                                              }

janv. 07 18:56:10 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546883770146,
                                                                "type": "kdeconnect.sms.messages",
                                                                "body": {
                                                                  "messages": [
                                                                    {
                                                                      "address": "0674375050",
                                                                      "body": "Rien",
                                                                      "date": 1546883769990,
                                                                      "type": 1,
                                                                      "read": 0,
                                                                      "thread_id": 141,
                                                                      "_id": 4271,
                                                                      "event": 1
                                                                    }
                                                                  ],
                                                                  "event": "batch_messages"
                                                                }
                                                              }

I then sent a last message (for today)


janv. 07 18:56:13 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:send:482]: OnePlus: {
                                                                "id": 1546883773950,
                                                                "type": "kdeconnect.sms.request",
                                                                "body": {
                                                                  "sendSms": true,
                                                                  "phoneNumber": "0674375050",
                                                                  "messageBody": "test 2"
                                                                }
                                                              }
janv. 07 18:56:14 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546883773716,
                                                                "type": "kdeconnect.sms.messages",
                                                                "body": {
                                                                  "messages": [
                                                                    {
                                                                      "address": "0674375050",
                                                                      "body": "test 2",
                                                                      "date": 1546883773646,
                                                                      "type": 2,
                                                                      "read": 1,
                                                                      "thread_id": 141,
                                                                      "_id": 4272,
                                                                      "event": 1
                                                                    }
                                                                  ],
                                                                  "event": "batch_messages"
                                                                }
                                                              }

Received but shown in gray on gsconnect message list.

Besides, during all this time, i saw no response on gsconnect message view, but the list is up to date with the latest message (i could see the line below the contact name in bold). I think you might have a refresh issue on the conversation list as well 😉, because i still got some logs of the missing messages :

janv. 07 19:07:11 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:receive/<:436]: OnePlus: {
                                                               "id": 1546884430558,
                                                               "type": "kdeconnect.sms.messages",
                                                               "body": {
                                                                 "messages": [
                                                                   {
                                                                     "address": "0674375050",
                                                                     "body": "Volontiers",
                                                                     "date": 1546884430447,
                                                                     "type": 1,
                                                                     "read": 0,
                                                                     "thread_id": 141,
                                                                     "_id": 4282,
                                                                     "event": 1
                                                                   }
                                                                 ],
                                                                 "event": "batch_messages"
                                                               }
                                                             }
janv. 07 19:07:11 org.gnome.Shell.Extensions.GSConnect[7474]: [/service/core.js:receive/<:436]: OnePlus: {
                                                               "id": 1546884430550,
                                                               "type": "kdeconnect.telephony",
                                                               "body": {
                                                                 "event": "sms",
                                                                 "messageBody": "Volontiers",
                                                                 "contactName": "M",
                                                                 "phoneThumbnail": "",
                                                                 "phoneNumber": "+33674375050"
                                                               }
                                                             }

I hope this helps. Now that i understand how the log is working it'll be easier.

Oh and the + button is indeed refreshing. But i have a tiny issue with it (sorry, tell me if i am maddening).
I deleted my messages, pressed the + button (the contact disappear from the list, as expected).
But when i select the same contact, i got all my history displayed, it should be blank, just like on my phone. (the message history is not yet reset from cache, maybe ?).

That's all for tonight, tell me if you need more.

@andyholmes
Copy link
Collaborator

OK, so first of all, the way logs are generated was a bit confusing for me.

Because of frequent complaints about debug messages in the log being insecure and not wanting to provide logs because they were uncensored, that had to be removed. Even today someone complained because they forgot they had turned on debugging themselves. So unfortunately it had to go.

Whenever the dialog is open, messages are still being printed to journald so nothing has really changed, it just turns off automatically when the dialog closes.

janv. 07 18:39:12 gjs[7474]: JS WARNING: [/home/gautier/.local/share/gnome-shell/extensions/[email protected]/service/ui/device.js 932]: reference to undefined property "sms"

This is just a warning from when you set a new keyboard shortcut, nothing wrong here.

and then, the first message sent :

This seems like it's definitely the wrong number being sent. If you start a conversation from the contacts list, it will send to the number in that row which should be the same number in the headerbar. Can you confirm the number in the contact row and headerbar are the same?

I've added the ability to clear plugin cache data in the advanced settings, although there's a good chance I will remove this at some point. Here is an up to date ZIP:

[email protected]

Oh and the + button is indeed refreshing. But i have a tiny issue with it (sorry, tell me if i am maddening).
I deleted my messages, pressed the + button (the contact disappear from the list, as expected).
But when i select the same contact, i got all my history displayed, it should be blank, just like on my phone. (the message history is not yet reset from cache, maybe ?)

That probably is the same number mismatch problem. The conversation should be destroyed properly, but if not there should be some warning or error in the log about it.

@gautierlabarre
Copy link
Contributor Author

gautierlabarre commented Jan 8, 2019

Hum for the first time, i see that when i search for a contact, i have two lines (as if they had two phone number), for example :
first line : 06 74 37 50 50 (with space)
second line : 0674375050 (without, but same number)
And i have this for most contacts (even those starting with +33), some of those have only one line (without space, and when i select them the headerbar shows them without space as well).

Also, the number formatted as 066-309-5050 as a second line as well 066305050.

So, i select the contact : 06 74 37 50 50, i write a message, on the headerbar (above the message content) i have the number 06 74 37 50 50 and it's received

Now i delete all messages with this contact, click the + button (the contact disappear from the list, normal), select the second line 0674375050 and write a message, on the headerbar the number is displayed as 06 74 37 50 50 (with space between numbers, unlike the number i clicked). The message is once again received. Also, the history is indeed empty now.

It looks like there is no issue tonight. Maybe your zip fixed it ?

I have waaaay more logs (i had some unrelated issues as well), i guess your logs starts here :

janv. 08 19:15:13 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:send:482]: OnePlus: {
                                                                "id": 1546971313409,
                                                                "type": "kdeconnect.sms.request",
                                                                "body": {
                                                                  "sendSms": true,
                                                                  "phoneNumber": "0674375050",
                                                                  "messageBody": "test message ?"
                                                                }
                                                              }
janv. 08 19:15:13 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546971313278,
                                                                "type": "kdeconnect.sms.messages",
                                                                "body": {
                                                                  "messages": [
                                                                    {
                                                                      "address": "0674375050",
                                                                      "body": "test message ?",
                                                                      "date": 1546971313235,
                                                                      "type": 2,
                                                                      "read": 1,
                                                                      "thread_id": 146,
                                                                      "_id": 4304,
                                                                      "event": 1
                                                                    }
                                                                  ],
                                                                  "event": "batch_messages"
                                                                }
                                                              }
janv. 08 19:15:13 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546971313288,
                                                                "type": "kdeconnect.sms.messages",
                                                                "body": {
                                                                  "messages": [
                                                                    {
                                                                      "address": "0674375050",
                                                                      "body": "test message ?",
                                                                      "date": 1546971313235,
                                                                      "type": 2,
                                                                      "read": 1,
                                                                      "thread_id": 146,
                                                                      "_id": 4304,
                                                                      "event": 1
                                                                    }
                                                                  ],
                                                                  "event": "batch_messages"
                                                                }
                                                              }
janv. 08 19:15:13 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/plugins/notification.js:closeNotification:577]: "M: test message ?"
janv. 08 19:15:13 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:send:482]: OnePlus: {
                                                                "id": 1546971313993,
                                                                "type": "kdeconnect.notification.request",
                                                                "body": {
                                                                  "cancel": "M: test message ?"
                                                                }
                                                              }
janv. 08 19:15:21 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546970390582,
                                                                "type": "kdeconnect.battery",
                                                                "body": {
                                                                  "currentCharge": 68,
                                                                  "isCharging": false,
                                                                  "thresholdEvent": 0
                                                                }
                                                              }
janv. 08 19:15:30 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546971329788,
                                                                "type": "kdeconnect.sms.messages",
                                                                "body": {
                                                                  "messages": [
                                                                    {
                                                                      "address": "0674375050",
                                                                      "body": "Reçu",
                                                                      "date": 1546971329631,
                                                                      "type": 1,
                                                                      "read": 0,
                                                                      "thread_id": 146,
                                                                      "_id": 4305,
                                                                      "event": 1
                                                                    }
                                                                  ],
                                                                  "event": "batch_messages"
                                                                }
                                                              }
janv. 08 19:15:30 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546971329796,
                                                                "type": "kdeconnect.sms.messages",
                                                                "body": {
                                                                  "messages": [
                                                                    {
                                                                      "address": "0674375050",
                                                                      "body": "Reçu",
                                                                      "date": 1546971329631,
                                                                      "type": 1,
                                                                      "read": 0,
                                                                      "thread_id": 146,
                                                                      "_id": 4305,
                                                                      "event": 1
                                                                    }
                                                                  ],
                                                                  "event": "batch_messages"
                                                                }
                                                              }
janv. 08 19:15:30 org.gnome.Shell.Extensions.GSConnect[8540]: [/service/core.js:receive/<:436]: OnePlus: {
                                                                "id": 1546971329912,
                                                                "type": "kdeconnect.notification",
                                                                "body": {
                                                                  "payloadHash": "d62471f84e7c4ecff1b2a50dee76badd",
                                                                  "id": "0|com.textra|122|null|10109",
                                                                  "appName": "Textra",
                                                                  "isClearable": true,
                                                                  "ticker": "M: Reçu",
                                                                  "title": "M",
                                                                  "text": "Reçu",
                                                                  "time": "1546971329797"
                                                                },
                                                                "payloadSize": 3815,
                                                                "payloadTransferInfo": {
                                                                  "port": 1740
                                                                }
                                                              }

@gautierlabarre
Copy link
Contributor Author

Oh and for the alert log, if you have other people confused, maybe juste changing the button label would help like : "I'm finished, show the log file now".
That's just a suggestion, if it's only me then it doesn't need changing 😃

@andyholmes
Copy link
Collaborator

Hum for the first time, i see that when i search for a contact, i have two lines (as if they had two phone number), for example...

I think you should now clear the contacts cache in Advanced before proceeding, then resync by pressing the [+] button. I guess that if everyone has this problem I should hold off on releasing v20 until I can find a fix for this.

@gautierlabarre
Copy link
Contributor Author

gautierlabarre commented Jan 9, 2019

Hello,

I pressed the cross icon on Advanced menu (for contacts AND SMS). Then resync with the + button.
I search for the same contact (and i still have the two lines for phone number), and i have the conversation's history (is it normal ?).

My contact received the message.

@andyholmes
Copy link
Collaborator

i still have the two lines for phone number

Can you confirm you don't have two phone numbers defined for these contacts? Once the contacts are cleared each number is only added once to the list. If there are two phone numbers with different formats but the same spacing, it's likely that's how GSConnect is receiving them in the vCard dump.

i have the conversation's history (is it normal ?)

Yes, it's normal for conversations to sync at the same time as contacts.

@andyholmes
Copy link
Collaborator

I've split your duplicate numbers issue off into a new issue, since I think the original has been solved now and it was set for the v20 milestone, which has now been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that is confirmed as a bug needs testing A contribution that needs testing
Projects
None yet
Development

No branches or pull requests

2 participants