talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

Push notification are disabled

Open XueSheng-GIT opened this issue 1 year ago • 38 comments

Steps to reproduce

  1. Install Talk 15.0.1 (GPlay)
  2. Enter user credentials to login

Expected behaviour

Notifications should be enabled and available.

Actual behaviour

Message appears (just for a couple of milliseconeds) that push notifications are disabled. Push-notifications disabled I didn't find any way to see this information afterwards (e.g. settings menu). Notifications for other apps (including nextcloud) work just fine. See further details below (Additional information).

Device brand and model

Huawei Mate 40 Pro

Android version

11

Nextcloud Talk app version

15.0.1

Nextcloud server version

24.0.6

Talk version

14.0.5

Custom Signaling server configured

Yes (specify version in Additional Information)

Custom TURN server configured

Yes

Custom STUN server configured

Yes

Android logs

No response

Server log

No response

Additional information

Notifications were working before removing talk-android and reinstalling. Double checking the docs didn't help so far. https://github.com/nextcloud/talk-android/blob/master/docs/notifications.md

Battery optimizations are disabled for talk.

occ notification:test-push --talk <userid>
Trying to push to 3 devices

Language is set to de
Private user key size: 1704
Public user key size: 451
Identified 1 Talk devices and 2 others.

Device token:7887
Device token is valid
Device public key size: 451
Data to encrypt is: {"nid":25490,"app":"admin_notification_talk","subject":"Testing push notifications","type":"admin_notifications","id":"6357dacb"}
Signed encrypted push subject
Push notification sent successfully

XueSheng-GIT avatar Oct 25 '22 12:10 XueSheng-GIT

Still trying to get push notifications working again. I removed talk app, removed the talk pushhash of the user (mysql table oc_notifications_pushhash), installed talk again and logged in with the user. Message still appears that push notifications are disabled and there's no new pushhash created. Why isn't a new pushhash created???

@mahibi Any hint how to debug this issue?

XueSheng-GIT avatar Oct 30 '22 08:10 XueSheng-GIT

Hey @XueSheng-GIT. Thanks for your report.

I tried to reproduce that issue without success.

  • Is it possible for you to test with an other instance? Or did you already?
  • Is it possible for you to collect logs with Android Studio?

timkrueger avatar Oct 31 '22 11:10 timkrueger

@timkrueger thanks for trying to reproduce!

* Is it possible for you to test with an other instance? Or did you already?

* Is it possible for you to collect logs with Android Studio?

I did try three different nextcloud instances (two running latest NC24, one running NC25). All with the same issue.

Never worked with android studio so far, but will try to gather some logs.

Just as an additional side note: the Huawei Mate40pro does not come with GAPPS, but I'm using microg to get push notifications. This works quite well and works without issues for the regular nextcloud app. Talk is registered to receive notifications, but according to microg no messages are received. I'll try to get some logs and will report back.

XueSheng-GIT avatar Oct 31 '22 11:10 XueSheng-GIT

@timkrueger I did gather the log with adb and logcat (I assume android studio does the same). I don't feel comfortable publishing this log right here. Can I send it directly to you somehow?

UPDATE: Just had a quick look at the log myself and found the following lines:

10-31 15:26:23.516 27499 27797 W GooglePlayServicesUtil: com.nextcloud.talk2 requires Google Play services, but their signature is invalid. 10-31 15:26:23.516 27499 27797 W PushRegistrationWorker: executing PushRegistrationWorker doesn't make sense because Google Play Services are not available 10-31 15:26:23.518 27499 27760 I WM-WorkerWrapper: Worker result FAILURE for Work [ id=f4c5db59-4f49-4b01-a8d1-371161a3cfb9, tags={ com.nextcloud.talk.jobs.PushRegistrationWorker } ]

Seems it's really related to the missing GAPPS and microg. But as said earlier, other apps (including nextcloud itself) work just fine with microg and push notifications!

XueSheng-GIT avatar Oct 31 '22 14:10 XueSheng-GIT

@timkrueger Do you still need the full log or is the extract mentioned above enough?

XueSheng-GIT avatar Nov 10 '22 11:11 XueSheng-GIT

@timkrueger Do you still need the full log or is the extract mentioned above enough?

Please sent the logs to tim.krueger at nextcloud.com.

timkrueger avatar Nov 14 '22 11:11 timkrueger

Is it possible for you to re-install Nextcloud Files? If push then still working with Files, we're more sure that this must be an Talk issue.

timkrueger avatar Nov 14 '22 13:11 timkrueger

I did already re-install nextcloud files. But now did again (removed the app, installed again and entered the account details). Push notification is working as expected. I took a logcat, just in case it might be helpful. Should I send it to you?

XueSheng-GIT avatar Nov 14 '22 14:11 XueSheng-GIT

@timkrueger I can test it tomorrow with microG, if needed.

tobiasKaminsky avatar Nov 15 '22 10:11 tobiasKaminsky

@timkrueger I can test it tomorrow with microG, if needed.

One aspect which might be considered is that "signature spoofing" is not possible on (recent) huawei phones. I assume that microG is currently working without issues if signature spoofing is enabled/available.

XueSheng-GIT avatar Nov 15 '22 10:11 XueSheng-GIT

Signature spoofing is indeed needed for a working microG.

tobiasKaminsky avatar Nov 15 '22 13:11 tobiasKaminsky

Signature spoofing is indeed needed for a working microG.

I assume SafetyNet is the biggest issue if signature spoofing is not available. But signature spoofing should not be a requirement for push notifications. I'm using microG since nearly two years without signature spoofing and push notifications are working just fine (including a couple of banking apps and nextcloud files of course).

XueSheng-GIT avatar Nov 15 '22 19:11 XueSheng-GIT

I am not that into it, but I understand that signature spoofing is needed to "trick" all google calls to be redirect from official gplay services to microG:

https://github.com/microg/GmsCore/wiki#system-requirements

Your Android system needs to support signature spoofing so GmsCore can pretend the existence of the official Play Services to applications calling Google APIs.

In your logcat I see:

10-31 15:26:23.516 27499 27797 W GooglePlayServicesUtil: com.nextcloud.talk2 requires Google Play services, but their signature is invalid.

which might indicate that this is not working.

tobiasKaminsky avatar Nov 16 '22 07:11 tobiasKaminsky

But indeed it is strange that only Talk then needs it, as Files works.

tobiasKaminsky avatar Nov 16 '22 07:11 tobiasKaminsky

Hm. While debugging this, I get a 409 when registering to https://push-notifications.nextcloud.com/devices

@nickvergessen do you know what this means? That there is already the same push token? But I installed Talk from scratch…

tobiasKaminsky avatar Nov 16 '22 07:11 tobiasKaminsky

do you know what this means? That there is already the same push token? But I installed Talk from scratch…

The device identifier (a hash of instance id, user id and auth token id) already is registered with a different user public key. I guess it can happen with dev instances and you didn't unsubscribe from the push server when the old account got removed.

This only affects unlucky developer cases, as on a real instance you can never get the same combination of instance + user + auth token, because the auth token is auto increment. Only when the instance is reset it can happen.

nickvergessen avatar Nov 16 '22 08:11 nickvergessen

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Dec 15 '22 01:12 github-actions[bot]

Please don't close this issue.

XueSheng-GIT avatar Dec 22 '22 05:12 XueSheng-GIT

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Jan 20 '23 01:01 github-actions[bot]

I'm on talk 15.1.1 now and issue is still present.

XueSheng-GIT avatar Jan 20 '23 04:01 XueSheng-GIT

I have the same problem.

lukaszsobala avatar Jan 24 '23 23:01 lukaszsobala

I have exaaclty same issue, nextcloud files works like a charm, nextcloud talk does register to microG but doesn't receive any notification (huawei P40 with microG, nextcloud files & talk from GPlay)

redtomaka avatar Feb 15 '23 22:02 redtomaka

Me too, using F-Droid versions on an unrooted Samsung and a single, non-developer instance. Tried reinstalling multiple times in every combination I could think of, always "push messages disabled", and "no device found" .

"Nextcloud Services" polling app works, I 'm using that in the meantime. (And whether you catch this bug or not: Thanks for your efforts!)

jenalj avatar Mar 12 '23 16:03 jenalj

I fixed this by switching from lighttpd (which isn't supported anyway) to nginx.

lukaszsobala avatar Mar 12 '23 16:03 lukaszsobala

I fixed it by uninstalling the F-Droid version and installing from Google Play instead.

The F-Droid version of Talk works with MicroG -only-, it's not compatible with Google Play Services, as it turns out.

jenalj avatar Mar 12 '23 19:03 jenalj

Fdroid version is FOSS, thus it cannot have any receiving parts of push notifications (as those are closed source by Google).

tobiasKaminsky avatar Mar 20 '23 12:03 tobiasKaminsky

Issue still exists on NC.Talk 16.0

RedMi 11Pro 5G (All permission) Screen doesn't wake up upon receiving call & text, no notification or ring tone played.

jtxnn678 avatar Apr 13 '23 16:04 jtxnn678

Issue still present. Using latest Nextcloud-AIO. My Phone is a OnePlus 7 Pro with latest crDroid installed. When trying to enable notification, there is a message underneath the toggle stating "At your request, Android is blocking this category of notifications from appearing on your device". Have tried both F-Droid and GPlay version of Talk apps. Same issue. (v17.0.2)

4r1-60ld avatar Jul 28 '23 05:07 4r1-60ld

Oh... and btw. Latest Nikgapps Core installed.

4r1-60ld avatar Jul 29 '23 06:07 4r1-60ld

But indeed it is strange that only Talk then needs it, as Files works.

@tobiasKaminsky Unfortunately notifications are still not working for Nextcloud Talk 17.1.0 RC1, altough it works for Nextcloud app itself without issues. Did you find out why Talk needs to verify the signature while Nextcloud itself does not?

XueSheng-GIT avatar Sep 05 '23 10:09 XueSheng-GIT