[cloud_functions]: Apple platforms ignore custom domains passed as region
Maintainer thường phản hồi trong vòng 4 ngày
@ragavendranbala-TSL đang làm issue này rồi.
Từ ngày 27/11/2026.
- #19016 của @ragavendranbala-TSL — đang mở
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend-api-design, mobile
Hướng nghiên cứu
Bắt đầu với FirebaseFunctionsPlugin.swift, được dùng chung bởi iOS và macOS, rồi theo dõi cách đối số region được truyền đến Functions.functions(app:region:). So sánh lệnh gọi đó với factory Functions.functions(app:customDomain:) của SDK iOS/macOS và cách xử lý trên Android và web được mô tả trong issue. Công việc hoàn tất khi URL miền tùy chỉnh được chuyển đến factory miền tùy chỉnh trên các nền tảng Apple, còn các giá trị region thông thường vẫn dùng factory region.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[cloud_functions]: Apple platforms ignore custom domains passed as region
Which plugins are affected?
Functions
Which platforms are affected?
iOS, macOS
Description
The Android and web Firebase SDKs accept a custom domain in the same
parameter as a region — regionOrCustomDomain. On Android,
FirebaseFunctions.getInstance(app, regionOrCustomDomain) URL-parses the
value and switches to custom-domain mode when it is a URL; the JS SDK's
getFunctions(app, regionOrCustomDomain) does the same.
The Firebase iOS/macOS SDKs also support custom domains, but through a
separate factory: Functions.functions(app:customDomain:). When a custom
domain string is passed to Functions.functions(app:region:) instead, the
SDK interpolates it into the host and produces a malformed URL such as
https://https://example.com-project.cloudfunctions.net/name.
The Flutter plugin always calls Functions.functions(app:region:) and
never exposes the customDomain: factory, so on Apple platforms there is
no way to reach a function through a custom domain — for example a
Google Cloud Load Balancer fronting Cloud Armor, where the function must
be called at https://api.example.com/functionName rather than the
cloudfunctions.net host.
Reproducing the issue
- Deploy a callable function behind a custom domain.
- Call
FirebaseFunctions.instanceFor(region: 'https://api.example.com').httpsCallable('myFunction').call(). - On Android and web the call reaches the custom domain. On iOS/macOS it
fails: the plugin passes the URL string as a region, and the SDK builds
an invalidcloudfunctions.netURL.
Suggested fix
In FirebaseFunctionsPlugin.swift (shared by iOS and macOS), detect an
http prefix in the region argument and call
Functions.functions(app:customDomain:) instead — matching the
region-or-custom-domain convention the other SDKs already use. This adds
no public Dart API surface.
- Ngôn ngữ chính
- Dart
- Star
- 9.3k
- Fork
- 4.1k
- Merge trung bình
- 4 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 49
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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/flutterfire
-
Needs Attention platform: android plugin: messaging type: bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
firebase/flutterfire#19017 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Needs Attention platform: web plugin: crashlytics type: enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 34/100
firebase/flutterfire#19014 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
[firebase_messaging]: Android getToken() errors lose their cause since firebase-messaging 25.1.0 ("FCM Registration failed!")Có thể đã có người làm @SelaseKay đã nhận 3 ngày trước. Đang mởNeeds Attention platform: android plugin: messaging reproduced type: bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
firebase/flutterfire#18997 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
[firebase_storage]: Windows: getData() crashes with access violation (use-after-free of StorageReference in ReferenceGetData)Có thể đã có người làm @SelaseKay đã nhận 4 ngày trước. Đang mởblocked: customer-response platform: windows plugin: storage type: bug type: crash
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
firebase/flutterfire#18994 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
[firebase_auth_web]: Make the Auth emulator persistence from #18926 configurable instead of hard-gated on kDebugModeCó thể đã có người làm @SelaseKay đã nhận 2 ngày trước. Đang mởNeeds Attention platform: web plugin: auth type: enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
firebase/flutterfire#18992 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của firebase/flutterfire
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
hajisensai/Fushi#4543 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[video_player] _updatePosition sets isCompleted=true after 500ms when duration is Duration.zeroĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dart-lang/dart_style#1928 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
chriskelly/wish-together#212 ·
Maintainer thường phản hồi trong vòng 1 ngày