[firebase_messaging] Android: messages sent to the FID from register() fail with UNREGISTERED; iOS works

オープン
#19,017 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
dart, flutter

調査の方向性

Start by tracing FirebaseMessaging.instance.register() and the Android onRegistered path that returns the FID; compare it with the iOS registration flow, which the report says works. Reproduce with the listed manifest setting and send an HTTP v1 message to the returned FID. Done means Android FID registration supports delivery without the reported 404 UNREGISTERED response.

索引モデルが issue の本文から書いたものです。

説明

Needs Attention platform: android plugin: messaging type: bug
Is there an existing issue for this?
  • I have searched the existing issues.
Which plugins are affected?

Messaging

Which platforms are affected?

Android

Description

With FID-based registration (FirebaseMessaging.instance.register() + onRegistered), every FCM HTTP v1 send to the FID returned on Android fails with 404 UNREGISTERED (messaging/installation-id-not-registered).

Reproducing the issue
  1. Add to AndroidManifest.xml:
  2. In Dart:
    FirebaseMessaging.instance.onRegistered.listen((fid) => sendToBackend(fid));
    await FirebaseMessaging.instance.register();
  3. Send an FCM HTTP v1 message to that FID (firebase-admin send({ fid, notification }) or a direct REST call).
  4. → 404 UNREGISTERED. The same steps on iOS (FirebaseMessagingInstallationIdEnabled = true in Info.plist) deliver the message.
Firebase Core version

5.2.0

Flutter Version

3.50.1

Relevant Log Output
# Device (adb logcat, FirebaseMessaging VERBOSE)
D/FirebaseMessaging: Invoking onNewToken for app: [DEFAULT]
D/FirebaseMessaging: onServiceConnected: ComponentInfo{<package>/io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService}
I/flutter: FID: <FID>

# Server (firebase-admin)
code: messaging/installation-id-not-registered
{
  "error": {
    "code": 404,
    "message": "NotRegistered",
    "status": "NOT_FOUND",
    "details": [{ "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError", "errorCode": "UNREGISTERED" }]
  }
}
Flutter dependencies
Expand Flutter dependencies snippet
firebase_core 5.2.0
firebase_core_platform_interface 8.2.0
firebase_messaging 17.1.0
firebase_messaging_platform_interface 4.12.0
Additional context and comments

Device: OnePlus 6T, Android 15, Google Play services 26.45.31.

主要言語
Dart
スター
9.3k
フォーク
4.1k
平均マージ
4日 17時間
マージ済み PR(30日)
49

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/flutterfire のほかの issue

firebase/flutterfire の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。