Running a native image on GCP (Cloud Run) throws error 400
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- firebase, gcp, grpc, java
- Lĩnh vực
- backend-api-design, cloud
Hướng nghiên cứu
Bắt đầu với các khai báo dependency của Firebase Admin và client Firebase Cloud Messaging chạy dưới dạng native image trên Cloud Run, đồng thời so sánh hành vi JVM và native-image đã được báo cáo. Tái hiện phản hồi 400 với việc loại trừ grpc-netty-shaded và thay thế bằng grpc-okhttp, sau đó xác định liệu vấn đề nằm ở việc xây dựng request hay ở cấu hình native-image. Được coi là hoàn tất khi đã ghi lại một cấu hình được hỗ trợ hoặc một chẩn đoán tối thiểu có thể tái hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
Compiling to native this dependency:
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>9.2.0</version>
</dependency>
makes the build fail because grpc-netty-shaded, however with this alternative we can compile:
<!-- FCM -->
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>9.2.0</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Using OkHttp over netty because the shaded netty included in grpc does not work with native image-->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>1.51.1</version>
</dependency>
The problem is that FCM client always responds with error 400:
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
- Ngôn ngữ chính
- Java
- Star
- 620
- Fork
- 305
- Merge trung bình
- 3 giờ 23 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-java
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 bình luận · 1 người được giao ·
-
[BUG] RemoteConfig unit tests fail in non-English (e.g., Korean) Locales due to Date Parsing Đang mởapi: remoteconfig
firebase/firebase-admin-java#1196 · 1 bình luận · 2 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1192 · 3 bình luận ·
-
needs-triage type: feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1149 · 1 bình luận ·
Tất cả issue của firebase/firebase-admin-java
Issue tương tự
-
bug untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
emitter:client:csharp feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Đang mởbug frontend maui-pilot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100