SubscribeToTopic() results in 401

Đang mở
#439 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
api, authentication, backend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi thông qua FirebaseApp.Create, FirebaseMessaging.GetMessaging và SubscribeToTopicAsync với thiết lập Ubuntu, .NET, SDK và workload federation được ghi trong tài liệu. So sánh thông tin xác thực và cấu hình dự án được sử dụng để đăng ký topic với luồng gửi tin nhắn thành công. Được coi là hoàn tất khi SubscribeToTopicAsync chấp nhận device token và topic mà không trả về 401.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

needs-triage
[READ] Step 1: Are you in the right place?
  • For issues related to the code in this repository file a Github issue.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.
[REQUIRED] Step 2: Describe your environment
  • Operating System version: Ubuntu 22.04.5 LTS
  • Firebase SDK version: 3.1.0
  • Firebase Product: Firebase Cloud Messaging
  • .NET version: 8.0.10
  • OS: Ubuntu
[REQUIRED] Step 3: Describe the problem

We have 2 projects on GCP, project A is used to host workloads on GKE, and project B is set with Firebase
We have a service/api that will handle notifications requests from client apps and will send them to FCM.
The authentication is done via ACD and workload federation, the SAs are given all permissions required.
We are able to send notification and data messages to the devices, but when we send a subscribe to topic request we get 401

Steps to reproduce:
  1. intiialize the default instace for the app,
  2. get the messaging service
  3. use SubscribeToTopicAsync to subscribe a device/s to topic
Relevant Code:
FirebaseApp app = FirebaseApp.Create(
new AppOptions
    {
        ProjectId = firebase_project_id,
        Credential = GoogleCredential.GetApplicationDefault(),
    });
var firebaseMessaging= FirebaseMessaging.GetMessaging(app);

TopicManagementResponse response = firebaseMessaging
                                                    .SubscribeToTopicAsync(new[] { "device_token" }, "test_topic")
                                                    .GetAwaiter()
                                                    .GetResult();

Ngôn ngữ chính
C#
Star
407
Fork
147
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/firebase-admin-dotnet

Tất cả issue của firebase/firebase-admin-dotnet

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.