Contacts icon indicating copy to clipboard operation
Contacts copied to clipboard

Not showing synced contact storage after upgrading to LOS21 (Android 14)

Open nucular8 opened this issue 1 year ago • 26 comments

Checklist

  • [X] I can reproduce the bug with the latest version given here.
  • [X] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • [X] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • [X] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [X] This issue contains only one bug.
  • [X] I have read and understood the contribution guidelines.

Affected app version

1.0.1.

Affected Android/Custom ROM version

LineageOS 21 (Android 14)

Affected device model

Moto G7 Plus (lake)

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

Open the contacts app. Go to contacts or favorites pane. Click on filter button to choose contact storage to be shown.

Expected behavior

Filtering option in contacts app (and phone app as well) should show synced contact storage.

Actual behavior

Filtering option in contacts app (and phone app as well) only showing phone storage and phone storage (not visible by other apps).

Screenshots/Screen recordings

No response

Additional information

On LOS20 (Android 13) everything was fine. After upgrading to LOS21 (Android 14) the synced contacts are not shown in contacts app (and phone app as well). Syncing of contacts is done with davx5 (https://github.com/bitfireAT/davx5-ose).

nucular8 avatar Feb 18 '24 22:02 nucular8

It's related to https://github.com/FossifyOrg/Phone/issues/28.

Aga-C avatar Feb 18 '24 22:02 Aga-C

You are right. I found this issue and posted my "me too". I guess it's the same piece of code that affects both apps.

nucular8 avatar Feb 18 '24 22:02 nucular8

I think is the same problem:

https://github.com/stephanritscher/Simple-Contacts/issues/20

After test: Simple contacts have this issue too.

Mrothyr avatar Feb 19 '24 18:02 Mrothyr

Quite possible as it seems to be a fork of the same code base.

nucular8 avatar Feb 19 '24 21:02 nucular8

Yes. But it's possible to narrow down the part of the code.

I think its an API issue. Whatsapp is showed in the filter and is also updated to targetSdk 34. Nine and Outlook are not showed and be at targetSdk 33. I use Android 14 (GrapheneOS) and the old version works without problem (targetSdk 33 of the contact app).

Mrothyr avatar Feb 19 '24 22:02 Mrothyr

I have the same problem with CARDDAV contacts. Works fine with 'koler' or 'contacts you' as well as 'Simple Contacts Pro SE' f-droid version 6.22.4.2 Pro (the Github version is broken since January update)

czarnyckm avatar Feb 23 '24 14:02 czarnyckm

I think I have an issue related to this too. My contacts stored in Tuta are not syncing to Fossify Contacts, but they do sync to Google Contacts.

In my filter list I have tickboxes to display contacts from the following apps:

  • WhatsApp
  • Google Accounts
  • Signal
  • Messenger (Facebook/Meta)
  • Phone storage
  • Phone storage (not visible by other apps)

Contacts from Tuta (Tutanota/Tuta Mail - recently rebranded) should also be shown as an option in this list but aren't.

Device: Oppo A54 5G Android OS: ColorOS 13.0 (Android 13) Version: Fossify Contacts 1.0.1 (F-Droid)

jurdabur avatar Feb 28 '24 17:02 jurdabur

getIsSyncable check is wrong here: https://github.com/FossifyOrg/Commons/blob/master/commons/src/main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt#L825 It should probably be just >0: https://developer.android.com/reference/android/content/ContentResolver#getIsSyncable(android.accounts.Account,%20java.lang.String)

cpontvieux-systra avatar Mar 18 '24 11:03 cpontvieux-systra

I haven't investigated this but here are the definitions: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/services/core/java/com/android/server/content/SyncStorageEngine.java;l=260-289

naveensingh avatar Mar 18 '24 11:03 naveensingh

For me the problem was contact not working without Google Services Framework installed. I don't know why it would depend on that though.

Vysp3r avatar May 08 '24 11:05 Vysp3r

I'd like to add that allowing access to groups / individual contacts using the Contact Scopes feature (on GrapheneOS, maybe not available on LineageOS) lets the app show these groups / contacts.

But the general Contacts permission does not work, and I also do not have Google Services Framework installed.

schklom avatar May 08 '24 12:05 schklom

@schklom You're right I just tested on GrapheneOS and that works. It's not great though, because I would have to go in there and add each contact manually each time I add some. It makes me wonder why they would show up properly with Google Services Framework installed.

Vysp3r avatar May 08 '24 13:05 Vysp3r

@Vysp3r A hacky inconvenient workaround is to create a group "All", put every contact in it, and allow that group. You would need to remember to add that group to each new contact in the future though, so far from ideal.

schklom avatar May 08 '24 14:05 schklom

OK, I give it a try. Installing Google Services Framework, nothing changed. Installing Google Play Services - the other accounts materialized magically in the app.

So Google changed somewhat in the API? But Whatsapp is listed in the filters.

GPS is not a option for me. And the work around from schklom is not a option too - anything delete the tags at the contacts randomly. I have no idea what ist happen.

Mrothyr avatar May 15 '24 21:05 Mrothyr

For now, I use the contact app of LineageOS as a temporary solution. But yes, Google services are not an option for me either.

I can provide debug log or other information, provided someone explain me how to get it. I’m a developper, but not a Android developper…

cpontvieux-systra avatar May 16 '24 09:05 cpontvieux-systra

I use an older version of Stephans fork (https://github.com/stephanritscher/Simple-Contacts/releases/tag/6.22.4.2). A contact app with structured addresses is very rare...

Mrothyr avatar May 18 '24 10:05 Mrothyr

I also have this problem and I have attempted to debug it. I wish I had better news, as in isolating the root cause, but Android development has become wildly complicated (at least since I last looked at it). Here's what I (think I) know so far.

I installed and run the debug with a breakpoint just before the line @cpontvieux-systra mentioned. From there I used Android Studio's "evaluation expression" to see what getIsSyncable returns and if I did it correctly, it is returning zero. So I don't think the suggested change would matter for us.

In addition, I also loaded DavX5. When I look at every location in the code that sets setIsSyncable, it only sets it to either zero or one. These two things lead me to believe that perhaps the code should not be checking for syncable.

I also loaded the code for the LineageOS contacts program from https://github.com/LineageOS/android_packages_apps_Contacts Unfortunately, unlike either Fossfy Contacts or DavX5, when I pull the Git repo into Android Studio, it is not in whatever form it needs to be to automagically be compilable and debuggable on my device. However, I did look at the code, and it seems that they only care about syncability specifically for Google contacts. Since I am not using Google anything, I suspect this code is not used for my contacts list.

To be clear on this issue, I want to list my situation. It seems there may be more than one problem being described here. I am running LineageOS 21 on a Google Pixel 8. I did not install any Google services. I am using DavX5 to provide access to my Nextcloud server. Lineage's provided Contacts program can see my contacts, but Fossify can't.

If anyone has any suggestions, perhaps how to get that LineageOS contacts program built so I can debug it and see why it works while Fossify doesn't, please share.

arkdae avatar May 25 '24 22:05 arkdae

At the Moment i have switched to an older Version of simple contacts 6.22.4 - everything after that does also not work with the same result as fossify contacts.

ksapp-dell avatar Aug 25 '24 09:08 ksapp-dell

@ksapp-dell Halleluja! thanks for that work around i can finally manage my contacts again!

paskalito avatar Aug 29 '24 23:08 paskalito

Fixed in https://github.com/FossifyOrg/Commons/pull/55.

Aga-C avatar Sep 03 '24 11:09 Aga-C

I was still testing out the proposed fix and in my case, contacts still disappear when I disable google play services. I have attached two APKs for testing:

naveensingh avatar Sep 03 '24 12:09 naveensingh

I confirm, I installed the two apks and the problem persist. And yes I don’t have any Google play service on my device (neither active, nor installed)

cpontvieux-systra avatar Sep 03 '24 15:09 cpontvieux-systra

It would be great, if you could create a new release once this is fixed...

jzbor avatar Sep 06 '24 14:09 jzbor

Will do!

naveensingh avatar Sep 06 '24 15:09 naveensingh

At the Moment i have switched to an older Version of simple contacts 6.22.4 - everything after that does also not work with the same result as fossify contacts.

(https://github.com/FossifyOrg/Contacts/issues/83#issuecomment-2308752498)

This seems to me the most promising hint for this issue (i.e. some sort of regression in 6.22.5), but I'm too unfamiliar with this app looking at the commits what it could be.

nofishonfriday avatar Sep 12 '24 00:09 nofishonfriday

The app was targeting Android 13 before version 6.22.5, that's why it works.

naveensingh avatar Sep 16 '24 17:09 naveensingh

Hello, I also have the same or similar problems with dialer and contacts apps (both fossify and simplemobiletools versions). Reverting to earlier version of simplemobiletools (v6.22.3 contacts & v5.17.8 dialer) the contacts works flawlessly on Pixel8 - Android 14 - GrapheneOS with no google services installed.

PalmTreeVI avatar Oct 16 '24 01:10 PalmTreeVI

It should be fixed in the next update.

https://github.com/FossifyOrg/Contacts/releases/tag/1.1.0

naveensingh avatar Oct 27 '24 19:10 naveensingh

I am glad to report that with 1.1.0 update this issue is fixed on my device. (Lineage OS 21, Oneplus 9 Pro)

eagerto-learn avatar Oct 28 '24 00:10 eagerto-learn

Same here, issue is fixed (GrapheneOS, A15 without GPS)

Mrothyr avatar Oct 28 '24 00:10 Mrothyr