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

Contacts not showing in the messages window #277

Closed
pedrofleck opened this issue Oct 28, 2018 · 31 comments
Closed

Contacts not showing in the messages window #277

pedrofleck opened this issue Oct 28, 2018 · 31 comments
Labels
needs info An issue that needs more information

Comments

@pedrofleck
Copy link

I was using an older git version since I'm using Gnome 3.30, I was having a problem that the only contacts shown in the SMS window was the ones that I received SMS, then I decided to update to the Shell Extensions version (uninstalled and installed again). Now, I can't configure my devices (they don't show up in configurations (pairing again won't fix) and no contacts at all show when I try to send a SMS. Sending ping, SMS to a number, browsing files and other stuff works normally.

@andyholmes
Copy link
Collaborator

Hmm, it's tricky because a lot of things changed during that period that were not at all backwards or forwards compatible.

In particular, I moved the cached contacts file on purpose, because GData (direct to Google) support was removed and the file format changed to support the upcoming Android contacts sync plugin. This was probably when your contacts disappeared.

If you're okay starting from scratch, I'd recommend you uninstall and wipe everything listed in File Locations. At this point you might as well pull from master since it's quite close to v14, and you could even grab a build of the Android app from the new nightly build server and test out some of the experimental stuff like SMS history and contacts sync.

In any case, if a full wipe doesn't fix this let me know because the problem is probably deeper (maybe in the libfolks wrapper).

@pedrofleck
Copy link
Author

My devices are showing in the config window now! But I still can't see any contact. I went conservative with Play Store and v13 because I need to be sure it's working since I use it for productivity. Looking forward to v14 final version though.

@andyholmes
Copy link
Collaborator

Sound good, there are still some changes happening in Android before SMS/Contacts lands and we might have to make some changes afterwards to make it work.

If you have your contacts in Google, and have the dependencies for Desktop Contacts installed, you will still need to have the account registered in Gnome Online Accounts for that to work. I'll try and remember to clarify that in the Wiki.

v14 was uploaded with a single fix that was affecting a lot of people, but all of this work is almost ready to be released as v15. We just need to clean up a few things since it's a big release in a lot of ways.

@pedrofleck
Copy link
Author

I guess I'm using v14 now (nothing happens when I click "about") and the new SMS history is great! I still can't send a message to a new contact (only number), but if the person already sent a message, it shows up (and that's enough functionality for me, although I know it's not the desired behaviour). I have my contacts in Google, the dependencies and the account in Gnome settings, gnome-contacts app shows all my contacts by the way. It's weird that this is happening since the names and pictures appear correctly if I already exchanged messages with the person.

@andyholmes
Copy link
Collaborator

That's a bit odd, but I may know what is causing this issue. One thing that is difficult with KDE Connect is that a device won't report what plugins it has loaded, it will only report what capabilities it would support if all its plugins were loaded. Hmm, that's confusing; in other words it reports what "packets" it supports, but not whether it will actually do anything with them.

So for contacts, the device has to decide whether it's going to use contacts from the desktop or contacts from the phone. The contacts plugin will be automatically loaded if the device claims it supports it, and if it is loaded that's where GSConnect will look for contacts. Here is the check:

https://github.com/andyholmes/gnome-shell-extension-gsconnect/blob/7aae6ca13330807c9e32b1fa7b49ca7d7acc1f97/src/service/device.js#L160-L163

Maybe that's not working on your device, or maybe something else is wrong, but what you can try is to disable that plugin in the Device Settings -> Advanced. The change will happen immediately, so all you have to do is open a new SMS window and the new source will be used. Give that a try and let me know?

@pedrofleck
Copy link
Author

pedrofleck commented Nov 10, 2018

I tried disabling "contacts" plugin and now any contact show up, the previously shown contacts now are just numbers. Maybe KDE Connect on the phone isn't "sending" the contacts list? I already tried to reinstall the app, it is up to date and all the permissions are granted.
EDIT: I have a tablet synced too and even though it doesn't have a SIM card, I can open the SMS/contacts window and after enabling SMS/contacts plugins on phone and PC, all my contacts show up just fine. Definitely it is something with my phone.

@andyholmes
Copy link
Collaborator

Oh okay, maybe something went wrong during the contacts sync the first time. Try this then instead:

  • Disable Contacts plugin
  • Delete ~/.cache/gsconnect/<device-id>/contacts.json
  • Enabled Contacts plugin
  • Open SMS window, select "Sync Contacts" in app-menu (the menu in the panel beside Activities)
  • Wait a few seconds, then close/open window

If you have two devices it might be hard to tell which <device-id> is right, but you can delete both contacts.json because if the plugin is still enabled it will have that info in memory.

If that still doesn't work, might be a problem with Unicode characters if you have non-English names. I made a few names with special characters for testing, but maybe I missed something and we can track that down in the log files.

@pedrofleck
Copy link
Author

Done, it wasn't difficult to find which device was right because the tablet folder was full of contact pictures. It didn't work again, and even the contacts that were showing disappeared. I don't think it's related with Unicode characters since I have the same Google Account and contacts on my tablet, but the non english characters are:
á é í ó ô ã ç
What would happen if I copy contacts.json from the tablet folder to the phone folder? Since theoretically they're the same contacts?

@andyholmes
Copy link
Collaborator

I don't think it's related with Unicode characters since I have the same Google Account and contacts on my tablet...

That is strange, there's definitely nothing different done for tablets and phones.

What would happen if I copy contacts.json from the tablet folder to the phone folder? Since theoretically they're the same contacts?

Yep, that should work. The two files should be exactly the same, just make sure you have the plugin disabled for your phone when you copy the contacts.json file over. The images are absolute paths though, so they will point to your tablet's cache directory. As long as you don't delete those files this should work.

@andyholmes
Copy link
Collaborator

andyholmes commented Nov 14, 2018

I know you said you're using this at work, but if you're playing with the cache files, maybe you want to give something new a shot. I've been trying to find time to redo the messaging UI, but there's been a lot of bug reports lately.

Anyways, this Zip is basically v16 (just released), only changes are a newer SMS UI and all the old, unused telephony junk has been stripped out:

[email protected]

I'd now encourage you to use the latest Zip from #332 if you're interested in testing.

@andyholmes andyholmes added good first issue needs testing A contribution that needs testing labels Nov 15, 2018
@logix2
Copy link

logix2 commented Nov 27, 2018

I too am having this issue. No contacts are synchronized on my desktop. I'm currently using GSConnect v17, but this feature didn't work in previous versions either. I do have the required dependencies installed. Using Ubuntu 18.10 and Samsung Galaxy S6.

I tried disabling the contacts plugin, deleting the contacts.json file and enabling the plugin but nothing changed.

@andyholmes
Copy link
Collaborator

andyholmes commented Nov 27, 2018

Are the contacts not being stored in contacts.json or are they just not showing in the messaging UI? Could you try this Zip that includes two contact related fixes?

[email protected] (removed, see below)

@andyholmes andyholmes added the bug An issue that is confirmed as a bug label Nov 27, 2018
@andyholmes
Copy link
Collaborator

Sorry, small error in the previous Zip, try this one if you have a chance:

[email protected]

@logix2
Copy link

logix2 commented Nov 28, 2018

Using either the latest release or your zip, the contacts file is empty (only contains {}). Could there be some issue with Samsung's Android mod that prevents this from working?

@andyholmes
Copy link
Collaborator

Could there be some issue with Samsung's Android mod that prevents this from working?

Ah, that might very well be. I hadn't thought of that honestly 😕

I can't find any obvious answers on Google about where Samsung stores their contacts. The only way I could think to test is if you were to "disconnect" the Samsung contact app from Google or whatever cloud, then add a fake contact and see if it's present in Google's contact app (which you may have to install).

The alternative is to sync your contacts with a provider supported by GNOME Online Accounts (Google, NextCloud, etc), install libfolks support and disable the device contacts plugin. Probably you would have to restart the service, too.

@ferdnyc
Copy link
Member

ferdnyc commented Dec 1, 2018

I also have a Galaxy S6 as my personal daily-use phone, running Samsung's stock Android 7.0.

I can tell you from a quick examination of the Accounts configs that while Samsung does have a Samsung Cloud service of their own, with the ability to sync and backup data from various services (including Contacts), they don't usurp Google's contacts-management silently/automatically. My phone has dozens and dozens of contacts all synced to my Google account, including several I've added since I started using the phone, but Samsung Cloud shows 0 contacts stored with them — despite the fact that Contacts sync is enabled. My Contacts updates do all end up being synced to my Google account and are visible in GMail shortly after they're made on the phone, though.

I'll poke around a little more and see how things are being managed internally/locally, though.

@andyholmes
Copy link
Collaborator

@ferdnyc your contacts are syncing properly with GSConnect, right?

@ferdnyc
Copy link
Member

ferdnyc commented Dec 1, 2018

@ferdnyc your contacts are syncing properly with GSConnect, right?

Let's see... yep, sure are. Even a brand-new, just-created contact appears in GSConnect a minute or two later. (It might've appeared sooner, that's the time that passed between me creating it and checking for it.)

I'm not seeing SMS history, even though I use Android Messages, but Contacts sync seems fine.

@ferdnyc
Copy link
Member

ferdnyc commented Dec 1, 2018

In fact, I just created two more contacts, one directly on my Phone, one in my Samsung account (there's a dropbox selector at the top of the "Create contact" interface, normally I leave it set to "Google" and manage all of my contacts within my GMail account) — both of those were also synced to GSConnect, almost immediately.

@ferdnyc
Copy link
Member

ferdnyc commented Dec 1, 2018

Heh. And after linking those three together within the phone's contact manager, I now have a fourth contact representing the linked version — but I also still have the three individual contacts as well. So, that probably explains some of the duplication I'm seeing in my GSConnect contacts list.

image

But, yeah, if anything Contacts are over-syncing, for me. 😁

@andyholmes
Copy link
Collaborator

But, yeah, if anything Contacts are over-syncing, for me.

I think I managed to fix this one before my laptop died, it just wasn't cropping old contacts at all :/

@andyholmes
Copy link
Collaborator

I think all of the contact sync bugs have been fixed in v18 now. Please re-open if the same issue persists after upgrading.

@jjaone
Copy link

jjaone commented Jan 10, 2019

Contacts sync problem is still here. I am using Ubuntu 18.10 Desktop (Gnome-Shel 3.30 + GSConnect-plugin v19 in About screen) with Nokia6/Android8 in which I have KDE Connect app installed from Google Play store and no Contacts or Messaging converstaions get synced from the phone to desktop.

@andyholmes
Copy link
Collaborator

Hi, can you please update to the latest release on Github, v20, using the instructions in the Wiki and see if that solves the problem?

@andyholmes andyholmes reopened this Jan 10, 2019
@danjac
Copy link

danjac commented Jan 13, 2019

Fedora 29, latest github release, KDEConnect app + Samsung Galaxy S6. Messaging conversations synced but contacts empty.

@andyholmes
Copy link
Collaborator

Hi, can you confirm the Android app has contacts permissions, the contacts plugin enabled and what contacts app you are using?

Can you also please use the Generate Support Log feature, then open the messaging window and press the [+] button to sync and post the output?

@andyholmes andyholmes added needs info An issue that needs more information and removed good first issue needs testing A contribution that needs testing labels Jan 14, 2019
@andyholmes andyholmes removed the bug An issue that is confirmed as a bug label Mar 13, 2019
@andyholmes
Copy link
Collaborator

I've removed the [bug] tag since I'm not convinced this is a bug in GSConnect, but more likely another Android vendor specific problem with contacts storage. We'll need a debug log with errors showing GSConnect making a mistake or an empty contacts packet to be sure of either.

@andyholmes
Copy link
Collaborator

Closing since there's been no activity or logs supplied in ~4 months. Please re-open if you can still reproduce this bug and supply logs.

@tukusejssirs
Copy link

tukusejssirs commented Aug 30, 2019

CentOS 7 AMD64
GSConnect installed from extensions.gnome.org (v24)
Installed folks (PackageKit and gnome-packagekit were already installed)
All Android permissions for KDE Connect (v1.12.93) are enabled.
I use Google Contacts.

First I tried to enable Contacts plugin (in both Android and CentOS). Messages synced, but not the contacts.

Then I disabled the Contacts plugin (in both Android and CentOS). Installed folks package. I was already signed into Gnome Contacts using my Google credentials. Still, the messages synced, but not the contacts.

I tried to generate support log, but I have no idea if I did it right. Here is the output:

# GSConnect support log:
GSConnect Version: 24
GSConnect Install: user
GJS: 15205
XDG_SESSION_TYPE: x11
GDMSESSION: gnome
--------------------------------------------------------------------------------
journalctl: unrecognized option '--no-host'
# journalctl tail:
Aug 30 13:30:43 srvr-lnv-e531 org.gnome.Shell.Extensions.GSConnect[9932]: [/service/device.js:loadPlugin:779]: OnePlus: "loading 'contacts' plugin"
Aug 30 13:30:43 srvr-lnv-e531 org.gnome.Shell.Extensions.GSConnect[9932]: [/service/__init__.js:JSON.load/</<:145]: Error opening file /home/ts/.cache
                                                                          JSON.load/</<@/home/ts/.local/share/gnome-shell/extensions/gsconnect@andyhol
                                                                          @/home/ts/.local/share/gnome-shell/extensions/[email protected]
Aug 30 13:30:43 srvr-lnv-e531 org.gnome.Shell.Extensions.GSConnect[9932]: [/service/protocol/core.js:send:220]: OnePlus: {
                                                                            "id": 1567164643526,
                                                                            "type": "kdeconnect.contacts.request_all_uids_timestamps",
                                                                            "body": {}
                                                                          }
Aug 30 13:30:47 srvr-lnv-e531 org.gnome.Shell.Extensions.GSConnect[9932]: [/service/device.js:unloadPlugin:814]: OnePlus: "unloading 'contacts' plugin
Aug 30 13:30:47 srvr-lnv-e531 gjs[9932]: gsignal.c:2641: instance '0xc6cf970' has no handler with id '331814'

@andyholmes
Copy link
Collaborator

andyholmes commented Aug 31, 2019

Unfortunately there are no relevant errors related to GSConnect here. This just shows the contacts plugin being loaded, GSConnect requesting the contacts, you phone not sending any contacts and then the plugin being unloaded.

I'd recommend you file an upstream report on the KDE Connect Bug Tracker. If you phone is not sending any contacts, this is likely a bug in the Android app.

If you want to use folks, you may have to restart GNOME Shell, I'm not aware if GSConnect will detect if you install it while running.

@krodelabestiole
Copy link

same here using grapheneOS.

unfortunalety the review log button doen't open any window or show any info. it just closes the popup :/

is the log stored somewhere ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info An issue that needs more information
Projects
None yet
Development

No branches or pull requests

8 participants