firebase / firebase/firebase-admin-java
Running a native image on GCP (Cloud Run) throws error 400
- 主要言語
- Java
- スター
- 620
- フォーク
- 305
- 平均マージ
- 3時間 23分
- マージ済み PR(30日)
- 1
説明
Hi,
Compiling to native this dependency:
```java
com.google.firebase
firebase-admin
9.2.0
```
makes the build fail because grpc-netty-shaded, however with this alternative we can compile:
```java
com.google.firebase
firebase-admin
9.2.0
io.grpc
grpc-netty-shaded
io.grpc
grpc-okhttp
1.51.1
```
The problem is that FCM client always responds with error 400:
```javascript
Exception in thread "main" com.google.firebase.messaging.FirebaseMessagingException: Unexpected HTTP response with status: 400
{
"error": {
"code": 400,
"message": "Recipient of the message is not set.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message",
"description": "Recipient of the message is not set."
}
]
},
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "INVALID_ARGUMENT"
}
]
}
}
```
Running on JVM works fine.
There is a issue with same problem: https://github.com/GoogleCloudPlatform/native-image-support-java/issues/116 for the old google native support libraries. Their workarounds didn't work for me.
Are there any know solutions?
Thanks
コントリビューションガイド
調査の方向性
Firebase Admin の依存関係宣言と、Cloud Run 上でネイティブイメージとして実行される Firebase Cloud Messaging クライアントから始め、報告されている JVM と native-image の動作を比較します。grpc-netty-shaded の除外と grpc-okhttp の置換を行った状態で 400 レスポンスを再現し、そのうえで問題がリクエストの構築にあるのか、native-image の設定にあるのかを判断します。サポートされる設定または最小限の再現可能な診断を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- firebase, gcp, grpc, java
- 領域
- backend-api-design, cloud
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100