firebase / firebase/firebase-admin-java
Running a native image on GCP (Cloud Run) throws error 400
- Lenguaje dominante
- Java
- Estrellas
- 620
- Forks
- 305
- Merge medio
- 3 h 23 min
- PR fusionados (30 d)
- 1
Descripción
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
Guía de contribución
Línea de trabajo
Comienza con las declaraciones de dependencias de Firebase Admin y con el cliente de Firebase Cloud Messaging ejecutándose como una imagen nativa en Cloud Run, comparando el comportamiento informado de JVM y native-image. Reproduce la respuesta 400 con la exclusión de grpc-netty-shaded y la sustitución de grpc-okhttp, y determina después si el problema está en la construcción de la solicitud o en la configuración de native-image. Se considera terminado cuando se documente una configuración compatible o un diagnóstico mínimo reproducible.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- firebase, gcp, grpc, java
- Área
- backend-api-design, cloud
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100