microg / microg/GmsCore

FCM notification not showing

Open
#1,050 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

I develop apps and am working on push notifications.
Obviously i am forced to use FCM now.
The issue is that the notification are received but actually not shown with microG on LOS 16.
THough they work on a device in stock rom with GooglePlayServices

GmsGcmMcsInput: Incoming message: DataMessageStanza{id=A0447F26, from=621157750789, category=com.akylas.cairnmobile, app_data=[AppData{key=test, value=1}, AppData{key=gcm.notification.body_loc_args, value=["Martin","100"]}, AppData{key=gcm.notification.title_loc_key, value=received_paiement_title}, AppData{key=gcm.notification.body_loc_key, value=received_paiement_body}], persistent_id=0:1587565831316833%96fe2e77f9fd7ecd, ttl=2419200, sent=1587565831299}
04-22 16:30:33.037  4078  8448 D GmsGcmMcsSvc: Target: ResolveInfo{4085d18 com.akylas.cairnmobile/com.google.firebase.iid.FirebaseInstanceIdReceiver m=0x108000}
04-22 16:30:33.039  4078  8448 D GmsGcmMcsSvc: Adding app com.akylas.cairnmobile for userId 0 to the temp whitelist
04-22 16:30:33.081  4078  4078 W GmsGcmRegisterHdl: oneWay requested
04-22 16:30:33.084 10423 10552 D PushMessagingService: onMessageReceived: A0447F26, 621157750789, null, null, {test=1}
04-22 16:30:33.084 10423 10552 D PushMessagingService: not: null
04-22 16:30:34.090 10423 10552 W FirebaseMessaging: Message ack failed: java.util.concurrent.TimeoutException: Timed out waiting for Task

So here is the thing:

<service
            android:name="com.nativescript.push.PushMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>
  • i dont set permissions as it not needed anymore (though i have tried with C2D_MESSAGE permission without more success).
  • what i see that is wrong is that in onMessageReceived the RemoteMessage.getNotification() is null when it is not in GooglePlayServices. I think this might be the reason for the notification not showing at all.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with FirebaseMessagingService.onMessageReceived and RemoteMessage.getNotification(), then compare the logged behavior on LineageOS 16 with Google Play Services. Reproduce the FCM message using the manifest service configuration shown; done means the received notification is shown under microG as it is on the stock-ROM device.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, firebase, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.