Isaac Sekamatte
Isaac Sekamatte

Reputation: 5598

D/FirebaseInstanceId: background sync failed: INVALID_PARAMETERS

Tried to register a token using FCM, the connection is OK, but I get the following error:

Client not ready yet..Waiting for process to come online
Connected to process 13635 on device emulator-5554
D/FirebaseInstanceId: background sync failed: INVALID_PARAMETERS, retry in 10s
D/FirebaseInstanceId: background sync failed: INVALID_PARAMETERS, retry in 20s

Upvotes: 3

Views: 4947

Answers (3)

Soon Santos
Soon Santos

Reputation: 2239

In my case, I was subscribing/unsubscribing using for loop, which did not work for async firebase tasks.

for (var item in items) {
    FirebaseMessaging.instance.subscribeToTopic('topic');
}

The solution was to change to map

items.map((item) {
      FirebaseMessaging.instance.subscribeToTopic('topic');
    }).toList();

Upvotes: 0

Hitesh Patil
Hitesh Patil

Reputation: 380

I also had same issue and I have solved it by just adding below code in AndroidManifest.xml file

<application android:label="My APP Name" android:icon="@mipmap/icon">


<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
  <intent-filter>
    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
    <category android:name="${applicationId}" />
  </intent-filter>
</receiver>

Upvotes: 1

Tirolel
Tirolel

Reputation: 928

Remember to make the installation clean. Had similar issue and I have solved it by uninstalling and relaunch it on real device. Firebase needs to register the device at first launch.

Upvotes: 1

Related Questions