มีความท้าทายอื่นๆ หรือไม่พบปัญหาของคุณตามที่ระบุไว้ด้านล่างนี้ โปรด รายงานข้อผิดพลาดหรือขอคุณสมบัติ และเข้าร่วมการสนทนา Stack Overflow
โครงการ Firebase และแอป Firebase
โครงการ Firebase คืออะไร?
โครงการ Firebase เป็นเอนทิตีระดับบนสุดสำหรับ Firebase ในโครงการ คุณสามารถลงทะเบียนแอป Apple, Android หรือเว็บได้ หลังจากลงทะเบียนแอปกับ Firebase แล้ว คุณจะเพิ่ม Firebase SDK เฉพาะผลิตภัณฑ์ ลงในแอปได้ เช่น Analytics, Cloud Firestore, Crashlytics หรือ Remote Config
คุณควรลงทะเบียนตัวแปรของ Apple, Android และเว็บแอปภายในโปรเจ็กต์ Firebase เดียว คุณสามารถใช้โปรเจ็กต์ Firebase หลายโปรเจ็กต์เพื่อรองรับสภาพแวดล้อมที่หลากหลาย เช่น การพัฒนา การจัดเตรียม และการผลิต
แหล่งข้อมูลสำหรับการเรียนรู้เพิ่มเติมเกี่ยวกับโปรเจ็กต์ Firebase มีดังนี้
- ทำความเข้าใจกับโครงการ Firebase — ให้ภาพรวมโดยย่อของแนวคิดที่สำคัญต่างๆ เกี่ยวกับโครงการ Firebase รวมถึงความสัมพันธ์กับ Google Cloud และลำดับชั้นพื้นฐานของโครงการ ตลอดจนแอปและทรัพยากรต่างๆ
- แนวทางปฏิบัติที่ดีที่สุดทั่วไปสำหรับการตั้งค่าโครงการ Firebase — ให้แนวทางปฏิบัติทั่วไปในระดับสูงสำหรับการตั้งค่าโครงการ Firebase และการลงทะเบียนแอปของคุณกับโครงการ เพื่อให้คุณมีขั้นตอนการพัฒนาที่ชัดเจนซึ่งใช้สภาพแวดล้อมที่แตกต่างกัน
โปรดทราบว่าสำหรับโครงการ Firebase ทั้งหมด Firebase จะเพิ่มป้ายกำกับของ firebase:enabled
โดยอัตโนมัติภายใน หน้า ป้ายกำกับ สำหรับโครงการของคุณใน Google Cloud Console เรียนรู้เพิ่มเติมเกี่ยวกับป้ายกำกับนี้ใน คำถามที่พบบ่อย ของเรา
องค์กร Google Cloud คืออะไร
องค์กร Google Cloud เป็นคอนเทนเนอร์สำหรับโครงการ Google Cloud (รวมถึงโครงการ Firebase) ลำดับชั้นนี้ช่วยให้จัดระเบียบ จัดการการเข้าถึง และตรวจสอบโครงการ Google Cloud และ Firebase ได้ดีขึ้น สำหรับข้อมูลเพิ่มเติม โปรดดูที่ การสร้างและการจัดการองค์กร
ฉันจะเพิ่ม Firebase ในโครงการ Google Cloud ที่มีอยู่ได้อย่างไร
คุณอาจมีโครงการที่มีอยู่แล้วที่จัดการผ่าน Google Cloud Console หรือคอนโซล Google APIs โดยค่าเริ่มต้น โปรเจ็กต์เหล่านี้จะมองเห็นได้ใน คอนโซล Firebase แต่ไม่ถือว่าเป็นโปรเจ็กต์ Firebase
หากต้องการเพิ่ม Firebase ในโครงการ Google Cloud ที่มีอยู่ ให้คลิก เพิ่มโครงการ ในหน้า Landing Page ของ คอนโซล Firebase จากนั้นเลือกโครงการของคุณในเมนู ชื่อโครงการ
เหตุใดโครงการ Google Cloud ของฉันจึงมีป้ายกำกับ firebase:enabled
ใน หน้า ป้ายกำกับ สำหรับโปรเจ็กต์ของคุณใน Google Cloud Console คุณอาจเห็นป้ายกำกับของ firebase:enabled
(โดยเฉพาะอย่างยิ่ง Key
ของ firebase
มี Value
เป็น enabled
)
Firebase เพิ่มป้ายกำกับนี้โดยอัตโนมัติเนื่องจากโปรเจ็กต์ของคุณเป็นโปรเจ็กต์ Firebase ซึ่งหมายความว่าโปรเจ็กต์ของคุณเปิดใช้งานการกำหนดค่าและบริการเฉพาะของ Firebase เรียนรู้เพิ่มเติมเกี่ยวกับ ความสัมพันธ์ระหว่างโครงการ Firebase และ Google Cloud
เราขอแนะนำอย่างยิ่งให้คุณอย่าแก้ไขหรือลบป้ายกำกับนี้ ป้ายกำกับนี้ใช้โดย Firebase และ Google Cloud เพื่อแสดงรายการโครงการ Firebase ของคุณ (เช่น ผ่านทาง REST API ปลายทางรายการ projects.list
หรือในเมนูภายในคอนโซล Firebase)
โปรดทราบว่าการเพิ่มป้ายกำกับนี้ด้วยตนเองในรายการป้ายกำกับโครงการของคุณไม่ได้เปิดใช้การกำหนดค่าและบริการเฉพาะของ Firebase สำหรับโครงการ Google Cloud ของคุณ ในการทำเช่นนั้น คุณต้องเพิ่ม Firebase ผ่าน คอนโซล Firebase (หรือสำหรับกรณีการใช้งานขั้นสูง ผ่านทาง Firebase Management REST API หรือ Firebase CLI )
เหตุใดโปรเจ็กต์ Firebase ของฉันจึงไม่ปรากฏในรายการโปรเจ็กต์ Firebase
คำถามที่พบบ่อยนี้ใช้ได้หากคุณไม่เห็นโปรเจ็กต์ Firebase ในตำแหน่งต่อไปนี้
- ในรายการโครงการที่คุณกำลังดูภายในคอนโซล Firebase
- ในการตอบกลับจากการเรียก REST API
projects.list
endpoint - ในการตอบสนองจากการรันคำสั่ง Firebase CLI
firebase projects:list
ลองทำตามขั้นตอนการแก้ปัญหาเหล่านี้:
- ขั้นแรก ให้ลองเข้าถึงโครงการของคุณโดยไปที่ URL ของโครงการโดยตรง ใช้รูปแบบต่อไปนี้:
https://console.firebase.google.com/project/ PROJECT-ID /overview
- หากคุณไม่สามารถเข้าถึงโปรเจ็กต์หรือได้รับข้อผิดพลาดเกี่ยวกับสิทธิ์ ให้ตรวจสอบสิ่งต่อไปนี้:
- ตรวจสอบว่าคุณลงชื่อเข้าใช้ Firebase โดยใช้บัญชี Google เดียวกันกับที่มีสิทธิ์เข้าถึงโครงการ คุณสามารถลงชื่อเข้าใช้และออกจากคอนโซล Firebase ผ่านอวาตาร์บัญชีของคุณที่มุมบนขวาของคอนโซล
- ตรวจสอบว่าคุณสามารถดูโครงการใน Google Cloud Console ได้หรือไม่
- ตรวจสอบว่าโปรเจ็กต์ของคุณเปิดใช้ label
firebase:enabled
ใน หน้า Labels สำหรับโปรเจ็กต์ของคุณใน Google Cloud Console Firebase และ Google Cloud ใช้ป้ายกำกับนี้เพื่อแสดงรายการโครงการ Firebase ของคุณ หากคุณไม่เห็นป้ายกำกับนี้ แต่ เปิดใช้งาน Firebase Management API สำหรับโปรเจ็กต์ของคุณ ให้เพิ่มป้ายกำกับด้วยตนเอง (โดยเฉพาะKey
ของfirebase
มีValue
เป็นenabled
) - ตรวจสอบให้แน่ใจว่าคุณได้รับมอบหมายหนึ่งใน บทบาท IAM พื้นฐาน (เจ้าของ ผู้แก้ไข ผู้ดู) หรือบทบาทที่มีสิทธิ์ที่เกี่ยวข้องกับ Firebase เช่น บทบาทที่กำหนดไว้ล่วงหน้า ของ Firebase คุณสามารถดูบทบาทของคุณได้ใน หน้า IAM ของ Google Cloud Console
- หากโปรเจ็กต์ของคุณเป็นขององค์กร Google Cloud คุณอาจต้องการสิทธิ์เพิ่มเติมเพื่อดูโปรเจ็กต์ที่แสดงในคอนโซล Firebase ติดต่อบุคคลที่จัดการองค์กร Google Cloud ของคุณเพื่อมอบบทบาทที่เหมาะสมในการดูโครงการ เช่น บทบาทเบราว์เซอร์
หากขั้นตอนการแก้ปัญหาข้างต้นไม่ช่วยให้คุณเห็นโครงการในรายการโครงการ Firebase โปรดติดต่อ ฝ่ายสนับสนุน Firebase
ฉันสามารถมีโครงการได้กี่โครงการต่อบัญชี?
- แผนการกำหนดราคาแบบ Spark — โควต้าโปรเจกต์ของคุณจำกัดจำนวนโปรเจ็กต์เพียงเล็กน้อย (ปกติประมาณ 5-10 รายการ)
- แผนการกำหนดราคา Blaze — โควต้าโปรเจ็กต์ของคุณต่อบัญชีสำหรับการเรียกเก็บเงินใน Cloud จะเพิ่มขึ้นอย่างมาก ตราบใดที่บัญชีสำหรับการเรียกเก็บเงินใน Cloud ของคุณอยู่ในสถานะที่ดี
ขีดจำกัดของโควต้าโครงการมักไม่ค่อยเป็นปัญหาสำหรับนักพัฒนาส่วนใหญ่ แต่ถ้าจำเป็น คุณสามารถ ขอเพิ่มโควต้าโครงการของคุณ ได้
โปรดทราบว่าการลบโปรเจ็กต์ทั้งหมดต้องใช้เวลา 30 วันและนับรวมในโควต้าของคุณจนกว่าจะลบทั้งหมด
ฉันสามารถมีแอป Firebase ได้กี่แอปในโครงการ Firebase
โครงการ Firebase เป็นคอนเทนเนอร์สำหรับแอป Firebase ใน Apple, Android และเว็บ Firebase จำกัดจำนวนแอป Firebase ทั้งหมดภายในโปรเจ็กต์ Firebase ไว้ที่ 30
หลังจากตัวเลขนี้ ประสิทธิภาพจะเริ่มลดลง (โดยเฉพาะอย่างยิ่งสำหรับ Google Analytics) และในที่สุด เมื่อแอปจำนวนมากขึ้น ฟังก์ชันบางอย่างของผลิตภัณฑ์จะหยุดทำงาน นอกจากนี้ การเพิ่มแอป Firebase ในโครงการจะสร้างรหัสไคลเอ็นต์ OAuth 2.0 อย่างน้อยหนึ่งรหัส มีรหัสไคลเอนต์ไม่เกิน 30 รหัสที่สามารถสร้างได้ภายในโครงการเดียว
คุณควรตรวจสอบให้แน่ใจว่าแอป Firebase ทั้งหมดภายในโปรเจ็กต์ Firebase เดียวเป็นตัวแปรแพลตฟอร์มของแอปพลิเคชันเดียวกันจากมุมมองของผู้ใช้ปลายทาง ตัวอย่างเช่น หากคุณพัฒนาแอปพลิเคชันไวท์เลเบล แต่ละแอปที่มีป้ายกำกับแยกกันควรมีโปรเจ็กต์ Firebase ของตัวเอง แต่เวอร์ชัน Apple และ Android ของป้ายกำกับนั้นสามารถอยู่ในโปรเจ็กต์เดียวกันได้ อ่านคำแนะนำโดยละเอียดเพิ่มเติมใน แนวทางปฏิบัติที่ดีที่สุดทั่วไปสำหรับการตั้งค่าโปรเจ็กต์ Firebase
ในกรณีที่ไม่ค่อยเกิดขึ้น โครงการของคุณต้องการแอปมากกว่า 30 แอป คุณสามารถขอเพิ่มขีดจำกัดแอปได้ โปรเจ็กต์ของคุณต้องอยู่ในแผนการกำหนดราคาของ Blaze จึงจะส่งคำขอนี้ได้ ไปที่ Google Cloud Console เพื่อ ทำการร้องขอ และทำการประเมิน เรียนรู้เพิ่มเติมเกี่ยวกับ การจัดการโควต้า ในเอกสารประกอบของ Google Cloud
จะเกิดอะไรขึ้นหากฉันแท็กโปรเจ็กต์เป็นสภาพแวดล้อม "การใช้งานจริง"
ในคอนโซล Firebase คุณสามารถติดแท็กโปรเจ็กต์ Firebase ของคุณด้วยประเภทสภาพแวดล้อม ไม่ว่าจะเป็นสภาพแวดล้อม การผลิต หรือสภาพแวดล้อมที่ ไม่ระบุ (ไม่ใช่ผลิตภัณฑ์)
การติดแท็กโปรเจ็กต์ของคุณเป็นประเภทสภาพแวดล้อมจะไม่ส่งผลต่อวิธีการทำงานของโปรเจ็กต์ Firebase หรือฟีเจอร์ต่างๆ อย่างไรก็ตาม การแท็กสามารถช่วยคุณและทีมจัดการโปรเจ็กต์ Firebase ต่างๆ สำหรับวงจรชีวิตของแอปได้
หากคุณแท็กโปรเจ็กต์เป็นสภาพแวดล้อมที่ใช้งานจริง เราจะเพิ่มแท็ก Prod ที่มีสีสันสดใสให้กับโปรเจ็กต์ในคอนโซล Firebase เพื่อเตือนคุณว่าการเปลี่ยนแปลงใดๆ อาจส่งผลต่อแอปที่ใช้งานจริงที่เกี่ยวข้อง ในอนาคต เราอาจเพิ่มคุณสมบัติและการป้องกันเพิ่มเติมสำหรับโปรเจ็กต์ Firebase ที่ถูกแท็กเป็นสภาพแวดล้อมการใช้งานจริง
หากต้องการเปลี่ยนประเภทสภาพแวดล้อมของโครงการ Firebase ให้ไปที่ settings โครงการ > ทั่วไป จากนั้นในการ์ด โครงการของคุณ ภายใต้ สภาพแวดล้อม คลิก edit เพื่อเปลี่ยนประเภทสภาพแวดล้อม
ฉันจะหา App ID สำหรับแอป Firebase ได้จากที่ใด
ในคอนโซล Firebase ให้ไปที่การตั้งค่าของคุณ settings โครงการ เลื่อนลงไปที่การ์ด แอปของคุณ จากนั้นคลิกแอป Firebase ที่ต้องการเพื่อดูข้อมูลของแอป รวมถึง ID แอป
ต่อไปนี้เป็นตัวอย่างค่ารหัสแอป:
- แอป Firebase iOS:
1:1234567890:ios:321abc456def7890
- แอป Android ของ Firebase:
1:1234567890:android:321abc456def7890
- เว็บแอป Firebase:
1:1234567890:web:321abc456def7890
ข้อกำหนดเบื้องต้นสำหรับการลิงก์ Play/AdMob/AdWords/BigQuery กับโปรเจ็กต์หรือแอป Firebase ของฉันมีอะไรบ้าง
- ใน การเชื่อมโยง บัญชี Google Play คุณต้องมีสิ่งต่อไปนี้:
- บทบาท Firebase อย่างใดอย่างหนึ่งต่อไปนี้: เจ้าของหรือผู้ดูแลระบบ Firebase
และ - ระดับการเข้าถึง Google Play อย่างใดอย่างหนึ่งต่อไปนี้: เจ้าของบัญชีหรือผู้ดูแลระบบ
- บทบาท Firebase อย่างใดอย่างหนึ่งต่อไปนี้: เจ้าของหรือผู้ดูแลระบบ Firebase
- ในการลิงก์ แอป AdMob คุณต้องเป็นทั้งเจ้าของโปรเจ็กต์ Firebase และผู้ดูแลระบบ AdMob
- สำหรับการเชื่อมโยง บัญชี AdWords คุณต้องเป็นทั้งเจ้าของโปรเจ็กต์ Firebase และผู้ดูแลระบบ AdWords
- ในการลิงก์ โครงการ BigQuery คุณต้องเป็นเจ้าของโครงการ Firebase
ฉันควรรวมประกาศโอเพ่นซอร์สใดไว้ในแอปของฉัน
บนแพลตฟอร์มของ Apple พ็อด Firebase จะมีไฟล์ประกาศซึ่งรวมถึงรายการที่เกี่ยวข้อง Firebase Android SDK มี Activity
ตัวช่วย สำหรับแสดงข้อมูลใบอนุญาต
สิทธิ์และการเข้าถึงโครงการ Firebase
ฉันจะกำหนดบทบาทของสมาชิกโครงการ เช่น บทบาทเจ้าของได้อย่างไร
ในการจัดการบทบาทที่กำหนดให้กับสมาชิกโครงการแต่ละคน คุณต้องเป็นเจ้าของโครงการ Firebase (หรือได้รับการกำหนดบทบาทด้วยสิทธิ์ resourcemanager.projects.setIamPolicy
)
ต่อไปนี้เป็นสถานที่ที่คุณสามารถมอบหมายและจัดการบทบาทได้:
- คอนโซล Firebase มีวิธีง่ายๆ ในการกำหนดบทบาทให้กับสมาชิกโครงการใน แท็บ ผู้ใช้และสิทธิ์ ของ settings > การตั้งค่าโครงการ ในคอนโซล Firebase คุณสามารถมอบหมาย บทบาทพื้นฐาน ใดก็ได้ (เจ้าของ ผู้แก้ไข ผู้ดู) บทบาทผู้ ดูแลระบบ/ผู้ดู Firebase หรือ บทบาทหมวดหมู่ผลิตภัณฑ์ที่กำหนดไว้ล่วงหน้าของ Firebase
- Google Cloud Console มีชุดเครื่องมือมากมายเพื่อกำหนดบทบาทให้กับสมาชิกโครงการใน หน้า IAM ใน Cloud Console คุณยังสามารถสร้างและจัดการ บทบาทที่กำหนดเอง ตลอดจนให้บัญชีบริการเข้าถึงโครงการของคุณ
โปรดทราบว่าใน Google Cloud Console สมาชิกโครงการจะเรียกว่า ผู้หลัก
หากเจ้าของโปรเจ็กต์ของคุณไม่สามารถทำงานของเจ้าของได้อีกต่อไป (เช่น คนที่ลาออกจากบริษัทของคุณ) และโปรเจ็กต์ของคุณไม่ได้รับการจัดการผ่านองค์กร Google Cloud (ดูย่อหน้าถัดไป) คุณสามารถ ติดต่อฝ่ายสนับสนุน Firebase ได้รับมอบหมายเจ้าของชั่วคราว
โปรดทราบว่าหากโครงการ Firebase เป็นส่วนหนึ่งขององค์กร Google Cloud โครงการนั้นอาจไม่มีเจ้าของ หากคุณไม่พบเจ้าของโครงการ Firebase ให้ติดต่อบุคคลที่จัดการองค์กร Google Cloud เพื่อกำหนดเจ้าของโครงการ
ฉันจะหาเจ้าของโปรเจ็กต์ Firebase ได้อย่างไร
คุณสามารถดูสมาชิกโครงการและบทบาทของพวกเขาได้จากที่ต่อไปนี้:
- หากคุณมีสิทธิ์เข้าถึงโปรเจ็กต์ในคอนโซล Firebase คุณสามารถดูรายชื่อสมาชิกโปรเจ็กต์ รวมถึงเจ้าของ ในหน้า ผู้ใช้และสิทธิ์ ของคอนโซล Firebase
- หากคุณ ไม่มี สิทธิ์เข้าถึงโปรเจ็กต์ในคอนโซล Firebase ให้ตรวจสอบว่าคุณมีสิทธิ์เข้าถึงโปรเจ็กต์ใน Google Cloud Console หรือไม่ คุณสามารถดูรายชื่อสมาชิกโครงการ รวมถึงเจ้าของ ใน หน้า IAM ของ Google Cloud Console
หากเจ้าของโปรเจ็กต์ของคุณไม่สามารถทำงานของเจ้าของได้อีกต่อไป (เช่น คนที่ลาออกจากบริษัทของคุณ) และโปรเจ็กต์ของคุณไม่ได้รับการจัดการผ่านองค์กร Google Cloud (ดูย่อหน้าถัดไป) คุณสามารถ ติดต่อฝ่ายสนับสนุน Firebase ได้รับมอบหมายเจ้าของชั่วคราว
โปรดทราบว่าหากโครงการ Firebase เป็นส่วนหนึ่งขององค์กร Google Cloud โครงการนั้นอาจไม่มีเจ้าของ บุคคลที่จัดการองค์กร Google Cloud ของคุณสามารถทำงานต่างๆ แทนเจ้าของได้ อย่างไรก็ตาม ในการทำงานเฉพาะเจ้าของหลายๆ อย่าง (เช่น การมอบหมายบทบาทหรือการจัดการพร็อพเพอร์ตี้ Google Analytics) ผู้ดูแลระบบอาจต้องมอบหมาย บทบาทเจ้าของที่แท้จริง ให้ตนเองเพื่อทำงานเหล่านั้น หากคุณไม่พบเจ้าของโครงการ Firebase ให้ติดต่อบุคคลที่จัดการองค์กร Google Cloud เพื่อกำหนดเจ้าของโครงการ
เหตุใดฉันจึงควรมอบหมายบทบาทเจ้าของให้กับสมาชิกโครงการ
เพื่อให้แน่ใจว่ามีการจัดการโปรเจ็กต์ Firebase อย่างเหมาะสม โปรเจ็กต์จะต้องมี Owner เจ้าของโครงการคือบุคคลที่ดำเนินการด้านการดูแลระบบที่สำคัญได้หลายอย่าง (เช่น มอบหมายบทบาทและจัดการพร็อพเพอร์ตี้ Google Analytics) และฝ่ายสนับสนุน Firebase สามารถดำเนินการตามคำขอการดูแลระบบจากเจ้าของโครงการที่แสดงเท่านั้น
หลังจากที่คุณตั้งค่าเจ้าของสำหรับโปรเจ็กต์ Firebase แล้ว สิ่งสำคัญคือต้องอัปเดตการมอบหมายเหล่านั้นให้เป็นปัจจุบันอยู่เสมอ
โปรดทราบว่าหากโปรเจ็กต์ Firebase เป็นส่วนหนึ่งขององค์กร Google Cloud บุคคลที่จัดการองค์กร Google Cloud ของคุณสามารถทำงานหลายอย่างที่เจ้าของทำได้ อย่างไรก็ตาม สำหรับงานเฉพาะเจ้าของหลายอย่าง (เช่น การมอบหมายบทบาทหรือการจัดการพร็อพเพอร์ตี้ Google Analytics) ผู้ดูแลระบบอาจต้องมอบหมาย บทบาทเจ้าของที่แท้จริง ให้ตนเองเพื่อทำงานเหล่านั้น
ฉันไม่คิดว่าฉันมีโปรเจ็กต์ Firebase แต่ฉันได้รับอีเมลเกี่ยวกับโปรเจ็กต์ ฉันจะเข้าถึงโครงการนี้ได้อย่างไร
อีเมลที่คุณได้รับควรมีลิงก์เพื่อเปิดโปรเจ็กต์ Firebase การคลิกลิงก์ในอีเมลควรเปิดโครงการในคอนโซล Firebase
หากคุณไม่สามารถเปิดโครงการในลิงก์ได้ ตรวจสอบให้แน่ใจว่าคุณได้ลงชื่อเข้าใช้ Firebase โดยใช้บัญชี Google เดียวกับที่ได้รับอีเมลเกี่ยวกับโครงการ คุณสามารถลงชื่อเข้าใช้และออกจากคอนโซล Firebase ผ่านอวาตาร์บัญชีของคุณที่มุมบนขวาของคอนโซล
โปรดทราบว่าหากคุณเป็นผู้ดูแลระบบขององค์กร Google Cloud คุณอาจได้รับแจ้งเกี่ยวกับการเปลี่ยนแปลงโครงการ Firebase ภายในองค์กรของคุณ อย่างไรก็ตาม คุณอาจไม่มีสิทธิ์เพียงพอในการเปิดโครงการ Firebase ในกรณีเหล่านี้ วิธีแก้ปัญหาที่ง่ายที่สุดคือกำหนด บทบาทเจ้าของจริง ให้กับตัวเองเพื่อเปิดโครงการและดำเนินการที่จำเป็น เรียนรู้เพิ่มเติมเกี่ยวกับ สาเหตุและเมื่อใดที่ควรกำหนดบทบาทเจ้าของ
แพลตฟอร์มและเฟรมเวิร์ก
ไปที่หน้าการแก้ไขปัญหาและคำถามที่พบบ่อยเฉพาะแพลตฟอร์มสำหรับเคล็ดลับและคำตอบที่เป็นประโยชน์สำหรับคำถามที่พบบ่อยเพิ่มเติม
คอนโซล Firebase
เบราว์เซอร์ใดบ้างที่รองรับการเข้าถึงคอนโซล Firebase
คอนโซล Firebase สามารถเข้าถึงได้จากเบราว์เซอร์เดสก์ท็อปยอดนิยมเวอร์ชันล่าสุด เช่น Chrome, Firefox, Safari และ Edge เบราว์เซอร์บนมือถือไม่ได้รับการสนับสนุนอย่างสมบูรณ์ในขณะนี้
ฉันสามารถโหลดคอนโซล Firebase ได้ แต่ทำไมฉันจึงค้นหาหรือเข้าถึงโปรเจ็กต์ Firebase ของฉันไม่เจอ
คำถามที่พบบ่อยนี้ใช้ได้หากคุณประสบปัญหาอย่างใดอย่างหนึ่งต่อไปนี้:
- คอนโซล Firebase ส่งคืนหน้าข้อผิดพลาดที่ระบุว่าโครงการของคุณอาจไม่มีอยู่จริงหรือคุณไม่มีสิทธิ์เข้าถึงโครงการ
- คอนโซล Firebase ไม่แสดงโครงการของคุณแม้ว่าคุณจะป้อนรหัสโครงการหรือชื่อโครงการในช่องค้นหาของคอนโซลก็ตาม
ลองทำตามขั้นตอนการแก้ปัญหาเหล่านี้:
- ขั้นแรก ให้ลองเข้าถึงโครงการของคุณโดยไปที่ URL ของโครงการโดยตรง ใช้รูปแบบต่อไปนี้:
https://console.firebase.google.com/project/ PROJECT-ID /overview
- หากคุณยังไม่สามารถเข้าถึงโครงการหรือได้รับข้อผิดพลาดเกี่ยวกับสิทธิ์ ให้ตรวจสอบสิ่งต่อไปนี้:
- ตรวจสอบว่าคุณลงชื่อเข้าใช้ Firebase โดยใช้บัญชี Google เดียวกันกับที่มีสิทธิ์เข้าถึงโครงการ คุณสามารถลงชื่อเข้าใช้และออกจากคอนโซล Firebase ผ่านอวาตาร์บัญชีของคุณที่มุมบนขวาของคอนโซล
- ตรวจสอบให้แน่ใจว่า เปิดใช้งาน Firebase Management API สำหรับโปรเจ็กต์แล้ว
- ตรวจสอบให้แน่ใจว่าคุณได้รับมอบหมายหนึ่งใน บทบาท IAM พื้นฐาน (เจ้าของ ผู้แก้ไข ผู้ดู) หรือบทบาทที่มีสิทธิ์ที่เกี่ยวข้องกับ Firebase เช่น บทบาทที่กำหนดไว้ล่วงหน้า ของ Firebase คุณสามารถดูบทบาทของคุณได้ใน หน้า IAM ของ Google Cloud Console
- หากโปรเจ็กต์ของคุณเป็นขององค์กร Google Cloud คุณอาจต้องการสิทธิ์เพิ่มเติมเพื่อดูโปรเจ็กต์ที่แสดงในคอนโซล Firebase ติดต่อบุคคลที่จัดการองค์กร Google Cloud ของคุณเพื่อมอบบทบาทที่เหมาะสมในการดูโครงการ เช่น บทบาทเบราว์เซอร์
หากขั้นตอนการแก้ปัญหาข้างต้นไม่ช่วยให้คุณค้นหาหรือเข้าถึงโปรเจ็กต์ได้ โปรดติดต่อ ฝ่ายสนับสนุน Firebase
เหตุใดคอนโซล Firebase จึงไม่โหลดให้ฉัน
คำถามที่พบบ่อยนี้มีผลบังคับใช้หากคุณประสบปัญหาใดๆ ต่อไปนี้:
- หน้าในคอนโซล Firebase โหลดไม่เสร็จ
- ข้อมูลภายในเพจไม่โหลดตามที่คาดไว้
- คุณได้รับข้อความแสดงข้อผิดพลาดของเบราว์เซอร์เมื่อโหลดคอนโซล Firebase
ลองทำตามขั้นตอนการแก้ปัญหาเหล่านี้:
- ตรวจสอบแถว คอนโซล ของ Firebase Status Dashboard เพื่อดูว่าบริการหยุดชะงักหรือไม่
- ตรวจสอบว่าคุณใช้ เบราว์เซอร์ที่รองรับ
- ลองโหลดคอนโซล Firebase ในหน้าต่างที่ไม่ระบุตัวตนหรือหน้าต่างส่วนตัว
- ปิดใช้งานส่วนขยายของเบราว์เซอร์ทั้งหมด
- ตรวจสอบว่าการเชื่อมต่อเครือข่ายไม่ถูกบล็อกโดยตัวบล็อกโฆษณา โปรแกรมป้องกันไวรัส พร็อกซี ไฟร์วอลล์ หรือซอฟต์แวร์อื่นๆ
- ลองโหลดคอนโซล Firebase โดยใช้เครือข่ายหรืออุปกรณ์อื่น
- หากใช้ Chrome ให้ตรวจสอบ คอนโซลเครื่องมือสำหรับนักพัฒนาซอฟต์แวร์ เพื่อหา ข้อผิดพลาด
หากขั้นตอนการแก้ปัญหาข้างต้นไม่สามารถแก้ปัญหาได้ โปรดติดต่อ ฝ่ายสนับสนุน Firebase
ภาษาคอนโซล Firebase ของฉันถูกกำหนดอย่างไร
การตั้งค่าภาษาสำหรับคอนโซล Firebase จะขึ้นอยู่กับภาษาที่เลือกใน การตั้งค่าบัญชี Google ของ คุณ
หากต้องการเปลี่ยนการตั้งค่าภาษา โปรดดูที่ เปลี่ยนภาษา
คอนโซล Firebase รองรับภาษาต่อไปนี้:
- ภาษาอังกฤษ
- บราซิล โปรตุเกส
- ภาษาฝรั่งเศส
- ภาษาเยอรมัน
- ชาวอินโดนีเซีย
- ญี่ปุ่น
- เกาหลี
- รัสเซีย
- ภาษาจีนตัวย่อ
- สเปน
- จีนดั้งเดิม
คอนโซล Firebase รองรับบทบาทและสิทธิ์ใดบ้าง
คอนโซล Firebase และ Google Cloud Console ใช้บทบาทและสิทธิ์พื้นฐานเดียวกัน เรียนรู้เพิ่มเติมเกี่ยวกับบทบาทและการอนุญาตใน เอกสาร Firebase IAM
Firebase รองรับบทบาท พื้นฐาน (พื้นฐาน) ของเจ้าของ ผู้แก้ไข และผู้ดู:
- เจ้าของ โครงการสามารถเพิ่มสมาชิกคนอื่นๆ ในโครงการ ตั้งค่า การผสานรวม (โครงการที่ลิงก์กับบริการต่างๆ เช่น BigQuery หรือ Slack) และมีสิทธิ์แก้ไขโดยสมบูรณ์สำหรับโครงการ
- ผู้ แก้ไข โครงการมีสิทธิ์แก้ไขเต็มรูปแบบสำหรับโครงการ
- ผู้ ดู โครงการมีสิทธิ์อ่านเท่านั้นสำหรับโครงการ โปรดทราบว่าคอนโซล Firebase ในปัจจุบันไม่ได้ซ่อน/ปิดใช้งานการแก้ไขการควบคุม UI จากผู้ดูโครงการ แต่การดำเนินการเหล่านี้จะล้มเหลวสำหรับสมาชิกโครงการที่ได้รับบทบาทผู้ดู
Firebase ยังรองรับ:
- บทบาทที่กำหนดไว้ล่วงหน้าของ Firebase — บทบาทเฉพาะของ Firebase ที่ดูแลจัดการซึ่งเปิดใช้งานการควบคุมการเข้าถึงที่ละเอียดกว่าบทบาทพื้นฐานของเจ้าของ ผู้แก้ไข และผู้ดู
- บทบาทที่ กำหนดเอง — บทบาท IAM ที่กำหนดเองทั้งหมดที่คุณสร้างเพื่อปรับแต่งชุดสิทธิ์ที่ตรงกับข้อกำหนดเฉพาะขององค์กรของคุณ
ราคา
สินค้าใดที่ชำระ? ที่ไม่มีค่าใช้จ่าย?
ผลิตภัณฑ์โครงสร้างพื้นฐานแบบชำระเงินของ Firebase ได้แก่ Realtime Database, Cloud Storage for Firebase, Cloud Functions, Hosting, Test Lab และการตรวจสอบสิทธิ์ทางโทรศัพท์ เราเสนอระดับที่ไม่มีค่าใช้จ่ายสำหรับคุณสมบัติเหล่านี้ทั้งหมด
Firebase ยังมีผลิตภัณฑ์ที่ไม่มีค่าใช้จ่ายมากมาย: Analytics, Cloud Messaging, ตัวเขียนการแจ้งเตือน, การกำหนดค่าระยะไกล, การจัดทำดัชนีแอป, ลิงก์แบบไดนามิก และการรายงานข้อขัดข้อง คุณสามารถใช้ผลิตภัณฑ์เหล่านี้ได้ไม่จำกัดจำนวนในทุกแผน รวมถึงแผน Spark ที่ไม่มีค่าใช้จ่ายของเรา นอกจากนี้ ฟีเจอร์การยืนยันตัวตนทั้งหมดนอกเหนือจากการยืนยันตัวตนทางโทรศัพท์จะไม่มีค่าใช้จ่าย
Firebase เสนอเครดิตทดลองใช้ฟรีสำหรับผลิตภัณฑ์แบบชำระเงินหรือไม่
สามารถใช้บริการแบบชำระเงินของ Firebase ภายใต้ช่วง ทดลองใช้ Google Cloud ฟรี ผู้ใช้ Google Cloud และ Firebase รายใหม่สามารถใช้ประโยชน์จากช่วงทดลองใช้งาน 90 วันที่รวมเครดิตการเรียกเก็บเงินบนคลาวด์ฟรีมูลค่า $300 เพื่อสำรวจและประเมินผลิตภัณฑ์และบริการของ Google Cloud และ Firebase
ในช่วงทดลองใช้ Google Cloud ฟรี คุณจะได้รับบัญชีสำหรับการเรียกเก็บเงินใน Cloud แบบทดลองใช้ฟรี โครงการ Firebase ใดๆ ที่ใช้บัญชีสำหรับการเรียกเก็บเงินนั้นจะอยู่ในแผนการกำหนดราคา Blaze ในช่วงทดลองใช้ฟรี
ไม่ต้องกังวล การตั้งค่าบัญชีสำหรับการเรียกเก็บเงินบนระบบคลาวด์แบบทดลองใช้ฟรีนี้ไม่ได้ช่วยให้เราสามารถเรียกเก็บเงินจากคุณได้ คุณจะไม่ถูกเรียกเก็บเงิน เว้นแต่คุณจะเปิดใช้การเรียกเก็บเงินโดยชัดแจ้งด้วยการอัปเกรดบัญชีการเรียกเก็บเงินบนระบบคลาวด์รุ่นทดลองใช้ฟรีเป็นบัญชีแบบชำระเงิน คุณสามารถอัปเกรดเป็นบัญชีแบบชำระเงินได้ตลอดเวลาระหว่างช่วงทดลองใช้ หลังจากที่คุณอัปเกรดแล้ว คุณยังสามารถใช้เครดิตที่เหลืออยู่ได้ (ภายในระยะเวลา 90 วัน)
เมื่อช่วงทดลองใช้ฟรีหมดอายุ คุณจะต้องดาวน์เกรดโครงการเป็นแผนราคา Spark หรือ ตั้งค่าแผนราคา Blaze ในคอนโซล Firebase เพื่อใช้โครงการ Firebase ต่อไป
เรียนรู้เพิ่มเติมเกี่ยวกับการ ทดลองใช้ Google Cloud ฟรี
ฉันจะรู้ได้อย่างไรว่าแผนการกำหนดราคาแบบใดที่เหมาะกับฉัน
แผนการกำหนดราคาประกายไฟ
แผน Spark ของเราเป็นสถานที่ที่ยอดเยี่ยมในการพัฒนาแอปของคุณโดยไม่มีค่าใช้จ่าย คุณจะได้รับฟีเจอร์ Firebase ที่ไม่มีค่าใช้จ่ายทั้งหมด (Analytics, ตัวสร้างการแจ้งเตือน, Crashlytics และอื่นๆ) และฟีเจอร์โครงสร้างพื้นฐานแบบชำระเงินจำนวนมาก อย่างไรก็ตาม หากคุณใช้ทรัพยากรแผน Spark เกินในเดือนปฏิทิน แอปของคุณจะถูกปิดในช่วงที่เหลือของเดือนนั้น นอกจากนี้ ฟีเจอร์ Google Cloud ยังไม่พร้อมใช้งานเมื่อใช้แผน Spark
แผนการกำหนดราคา Blaze
แผน Blaze ของเราออกแบบมาสำหรับแอปที่ใช้งานจริง แผน Blaze ยังช่วยให้คุณขยายแอปของคุณด้วยฟีเจอร์ Google Cloud แบบชำระเงิน คุณจ่ายเฉพาะทรัพยากรที่คุณใช้ ทำให้คุณปรับขนาดได้ตามความต้องการ เรามุ่งมั่นที่จะทำให้ราคาของแผน Blaze สามารถแข่งขันกับผู้ให้บริการระบบคลาวด์ชั้นนำของอุตสาหกรรมได้
ฉันจะตรวจสอบการใช้งานและการเรียกเก็บเงินของฉันได้อย่างไร?
คุณสามารถติดตามการใช้ทรัพยากรโครงการในคอนโซล Firebase บนแดชบอร์ดใดๆ ต่อไปนี้:
- แดชบอร์ด การใช้งานระดับโครงการโดยรวมและการเรียกเก็บเงิน
- แดชบอร์ด การใช้งานการ รับรองความถูกต้อง (โดยเฉพาะสำหรับอินสแตนซ์การตรวจสอบความถูกต้องของโทรศัพท์)
- แดชบอร์ด การใช้งาน Cloud Firestore
- แดชบอร์ด การใช้งาน Cloud Functions
- แดชบอร์ด การใช้งานที่ เก็บข้อมูลบนคลาวด์
- แดชบอร์ด การใช้งาน โฮสติ้ง
- แดชบอร์ด การใช้งาน ฐานข้อมูลเรียลไทม์
เกิดอะไรขึ้นกับแผนการกำหนดราคา Flame?
ในเดือนมกราคม 2020 แผนการกำหนดราคาของ Flame (โควต้าเพิ่มเติม $25/เดือน) ถูกนำออกเป็นตัวเลือกสำหรับการลงชื่อสมัครใช้ใหม่ ผู้ใช้แผนปัจจุบันได้รับระยะเวลาผ่อนผันในการย้ายโครงการออกจากแผน Flame ในเดือนกุมภาพันธ์ พ.ศ. 2565 โครงการที่เหลือในแผนราคา Flame ถูกปรับลดเป็นแผนราคา Spark
ดังนั้น
- โครงการแผน Spark และ Blaze ที่มีอยู่และโครงการใหม่ใดๆ จะไม่สามารถสลับหรือลงทะเบียนสำหรับแผน Flame ได้อีกต่อไป
- หากคุณย้ายโปรเจ็กต์แผน Flame ที่มีอยู่ไปยังแผนราคาอื่น โปรเจ็กต์จะไม่สามารถกลับไปใช้แผน Flame ได้
- โครงการที่ดาวน์เกรดเป็นแผน Spark สามารถอัปเกรดเป็นแผน Blaze เพื่อกลับมาใช้บริการแบบชำระเงินเพิ่มเติมได้
- การอ้างอิงถึงแผน Flame ถูกลบออกจากเอกสารประกอบ
คุณมีคำถามเพิ่มเติมเกี่ยวกับการเกษียณอายุของแผน Flame หรือไม่? อ่านคำถามที่ พบบ่อยเพิ่มเติม ด้านล่าง
ต้องการเรียนรู้เกี่ยวกับแผนการกำหนดราคาอื่นๆ ที่นำเสนอโดย Firebase หรือไม่ เยี่ยมชม หน้าการกำหนดราคา Firebase ของเรา ! หากคุณต้องการเริ่มย้ายโครงการที่มีอยู่ไปยังแผนการกำหนดราคาอื่น คุณสามารถทำได้ใน คอนโซล Firebase สำหรับโครงการของคุณ
คำถามที่พบบ่อยเพิ่มเติมเกี่ยวกับการเลิกใช้แผน Flame
ฉันมีโครงการหรือกระบวนการหรือโมเดลธุรกิจที่ใช้ต้นทุน Firebase คงที่ ฉันควรทำอย่างไรดี?
ลงชื่อสมัครใช้แผนการกำหนดราคา Blaze และอย่าลืม ตั้งค่าการแจ้งเตือนงบประมาณ
ฉันขอสิทธิ์พิเศษในการสร้างโปรเจ็กต์ Flame ใหม่ได้ไหม
ไม่ Firebase ไม่ได้เสนอการเข้าถึงพิเศษสำหรับโปรเจ็กต์เพื่อเปลี่ยนหรือลงชื่อสมัครใช้แผน Flame
ฉันเปลี่ยนโครงการแผน Flame ของฉันเป็นแผนการกำหนดราคาอื่น ฉันจะเปลี่ยนกลับได้อย่างไร
ไม่สามารถเปลี่ยนไปใช้แผน Flame ได้อีกต่อไป สำหรับการเข้าถึงบริการจากแผน Flame ตรวจสอบให้แน่ใจว่าคุณใช้แผนการกำหนดราคาของ Blaze และพิจารณา ตั้งค่าการแจ้งเตือนงบประมาณ สำหรับโครงการของคุณ
โครงการของฉันถูกเปลี่ยนเป็นแผนการกำหนดราคาอื่นโดยอัตโนมัติซึ่งเป็นส่วนหนึ่งของการเลิกใช้แผน Flame ฉันควรทำอย่างไรดี?
หากโปรเจ็กต์ของคุณต้องการโควต้าเพิ่มเติมนอกเหนือจากที่ให้มากับแผน Spark คุณจะต้องอัปเกรดโปรเจ็กต์ของคุณเป็นแผนราคา Blaze
เหตุใดแผน Flame จึงถูกยกเลิก
ในช่วงหลายปีที่ผ่านมา เราพบว่าการใช้แผน Flame ลดลง และโครงการส่วนใหญ่ที่ใช้แผนดังกล่าวไม่ได้ใช้มูลค่าเต็มที่ การรักษาแผนการกำหนดราคานี้โดยทั่วไปจะไม่คุ้มทุน และเรารู้สึกว่าเราสามารถให้บริการทุกคนได้ดีขึ้นหากทรัพยากรไปที่โครงการริเริ่ม Firebase อื่นๆ
การใช้งานแบบไม่มีค่าใช้จ่ายในแผน Blaze แตกต่างจากการใช้งานแบบไม่มีค่าใช้จ่ายในแผน Spark อย่างไร
การใช้งานแบบไม่มีค่าใช้จ่ายในแผน Blaze จะคำนวณทุกวัน ขีดจำกัดการใช้งานยังแตกต่างจากแผน Spark สำหรับ Cloud Functions, การตรวจสอบสิทธิ์โทรศัพท์ และ Test Lab
สำหรับ Cloud Functions การใช้งานแบบไม่มีค่าใช้จ่ายในแผน Blaze จะคำนวณที่ระดับบัญชีสำหรับการเรียกเก็บเงินใน Cloud ไม่ใช่ระดับโปรเจ็กต์ และมีขีดจำกัดต่อไปนี้
- 2M การร้องขอ/เดือน
- 400K GB-วินาที/เดือน
- 200K CPU วินาที/เดือน
- 5 GB ของเครือข่ายขาออก/เดือน
สำหรับการตรวจสอบสิทธิ์ทางโทรศัพท์ การใช้งานแผน Blaze แบบไม่มีค่าใช้จ่ายจะถูกคำนวณเป็นรายเดือน
สำหรับ Test Lab การใช้งานแผน Blaze แบบไม่มีค่าใช้จ่ายมีขีดจำกัดดังต่อไปนี้:
- 30 นาทีของอุปกรณ์จริง/วัน
- 60 นาทีของอุปกรณ์เสมือน/วัน
โควต้าการใช้งานที่ไม่มีค่าใช้จ่ายจะรีเซ็ตเมื่อฉันเปลี่ยนจากแผน Spark เป็น Blaze หรือไม่
การใช้งานที่ไม่มีค่าใช้จ่ายจากแผน Spark จะรวมอยู่ในแผน Blaze การใช้งานที่ไม่มีค่าใช้จ่ายจะไม่ถูกรีเซ็ตเมื่อย้ายไปยังแผน Blaze
"การเชื่อมต่อฐานข้อมูลพร้อมกัน" คืออะไร?
การเชื่อมต่อพร้อมกันเทียบเท่ากับอุปกรณ์เคลื่อนที่ แท็บเบราว์เซอร์ หรือแอปเซิร์ฟเวอร์หนึ่งเครื่องที่เชื่อมต่อกับฐานข้อมูล Firebase กำหนดให้มีการจำกัดจำนวนการเชื่อมต่อกับฐานข้อมูลของแอปพร้อมกัน ขีดจำกัดเหล่านี้มีไว้เพื่อป้องกันทั้ง Firebase และผู้ใช้ของเราจากการละเมิด
ขีดจำกัดของแผน Spark คือ 100 และไม่สามารถเพิ่มได้ แผน Flame and Blaze จำกัดการเชื่อมต่อพร้อมกัน 200,000 ครั้งต่อฐานข้อมูล
ขีดจำกัดนี้ไม่เหมือนกับจำนวนผู้ใช้แอปของคุณทั้งหมด เนื่องจากผู้ใช้ของคุณไม่ได้เชื่อมต่อทั้งหมดพร้อมกัน หากคุณต้องการการเชื่อมต่อพร้อมกันมากกว่า 200,000 รายการ โปรดอ่าน Scale with Multiple Databases
จะเกิดอะไรขึ้นหากฉันใช้พื้นที่จัดเก็บแผน Spark หรือขีดจำกัดการดาวน์โหลดสำหรับ Realtime Database เกินขีดจำกัด
เพื่อให้คุณมีราคาที่สามารถคาดเดาได้ ทรัพยากรที่มีให้คุณในแผน Spark จะถูกจำกัดไว้ ซึ่งหมายความว่าเมื่อคุณเกินขีดจำกัดของแผนในเดือนใดก็ตาม แอปของคุณจะถูกปิดเพื่อป้องกันการใช้ทรัพยากรเพิ่มเติมและค่าใช้จ่ายเพิ่มเติม
จะเกิดอะไรขึ้นหากฉันเกินขีดจำกัดการเชื่อมต่อพร้อมกันของแผน Spark สำหรับฐานข้อมูลเรียลไทม์
เมื่อแอพของคุณถึงขีดจำกัดการทำงานพร้อมกันในแผน Spark การเชื่อมต่อที่ตามมาจะถูกปฏิเสธจนกว่าการเชื่อมต่อที่มีอยู่บางส่วนจะถูกปิด แอปจะทำงานต่อไปสำหรับผู้ใช้ที่เชื่อมต่อ
จะเกิดอะไรขึ้นหากฉันอัปโหลด ดาวน์โหลด หรือพื้นที่เก็บข้อมูลเกินขีดจำกัดของแผน Spark สำหรับ Cloud Storage
เมื่อคุณเกินขีดจำกัดสำหรับ Cloud Storage ในโครงการบนแผน Spark ผลลัพธ์จะขึ้นอยู่กับประเภทของขีดจำกัดที่คุณเกิน:
- หากคุณใช้ พื้นที่จัดเก็บเกินขีดจำกัด GB คุณจะไม่สามารถจัดเก็บข้อมูลในโครงการนั้นได้อีก เว้นแต่คุณจะลบข้อมูลบางส่วนที่จัดเก็บไว้หรืออัปเกรดเป็นแผนที่มีพื้นที่จัดเก็บเพิ่มขึ้น หรือพื้นที่จัดเก็บไม่จำกัด
- หากคุณ ดาวน์โหลดเกินขีดจำกัด GB แอปของคุณจะไม่สามารถดาวน์โหลดข้อมูลเพิ่มเติมได้จนกว่าจะถึงวันถัดไป (เริ่มตั้งแต่เวลาเที่ยงคืน เวลาแปซิฟิกของสหรัฐอเมริกา) เว้นแต่คุณจะอัปเกรดเป็นแผนที่มีข้อจำกัดน้อยกว่าหรือไม่มีขีดจำกัด
- หากคุณใช้ งานเกินขีดจำกัดการอัปโหลดหรือดาวน์โหลด แอปของคุณจะไม่สามารถอัปโหลดหรือดาวน์โหลดข้อมูลเพิ่มเติมได้จนกว่าจะถึงวันถัดไป (เริ่มตั้งแต่เวลาเที่ยงคืน เวลาแปซิฟิกของสหรัฐอเมริกา) เว้นแต่คุณจะอัปเกรดเป็นแผนที่มีข้อจำกัดน้อยกว่า หรือไม่มีเลย ขีด จำกัด
การผสานรวมของ Firebase กับ Google Cloud ทำงานอย่างไร
Firebase ผสานรวมกับ Google Cloud อย่างลึกซึ้ง โปรเจ็กต์แชร์ระหว่าง Firebase และ Google Cloud ดังนั้นโปรเจ็กต์จึงสามารถเปิดใช้บริการ Firebase และบริการ Google Cloud ได้ คุณเข้าถึงโปรเจ็กต์เดียวกันได้จากคอนโซล Firebase หรือ Google Cloud Console โดยเฉพาะ:
- ผลิตภัณฑ์ Firebase บางอย่างได้รับการสนับสนุนโดยตรงจาก Google Cloud เช่น Cloud Storage สำหรับ Firebase รายการผลิตภัณฑ์ที่สนับสนุนโดย Google Cloud จะเพิ่มขึ้นเรื่อยๆ เมื่อเวลาผ่านไป
- Firebase และ Google Cloud แชร์การตั้งค่าหลายอย่างของคุณ รวมทั้งผู้ทำงานร่วมกันและข้อมูลการเรียกเก็บเงิน การใช้งานทั้ง Firebase และ Google Cloud ของคุณจะปรากฏในบิลเดียวกัน
นอกจากนี้ เมื่อคุณอัปเกรดเป็นแผน Blaze คุณสามารถใช้ Infrastructure-as-a-Service และ API ระดับโลกของ Google Cloud ได้โดยตรงในโครงการ Firebase ในราคามาตรฐาน ของ Google Cloud คุณยังสามารถส่งออกข้อมูลจาก Google Cloud ไปยัง BigQuery เพื่อการวิเคราะห์ได้โดยตรง หากต้องการเรียนรู้เพิ่มเติม โปรดดู ลิงก์ BigQuery กับ Firebase
มีประโยชน์หลายอย่างในการปรับปรุงความปลอดภัย ปรับปรุงเวลาแฝง และประหยัดเวลาในการใช้ Google Cloud กับ Firebase (เทียบกับบริการคลาวด์อื่นๆ ที่ไม่ได้อยู่ร่วมกัน) ตรวจสอบ เว็บไซต์ Google Cloud สำหรับรายละเอียดเพิ่มเติม
จะเกิดอะไรขึ้นกับโปรเจ็กต์ Firebase ของฉัน หากฉันเพิ่มหรือลบบัญชีสำหรับการเรียกเก็บเงินสำหรับโปรเจ็กต์นั้นใน Google Cloud Console
หากมีการเพิ่มบัญชีสำหรับการเรียกเก็บเงินใน Cloud ให้กับโปรเจ็กต์ใน Google Cloud Console โปรเจ็กต์เดียวกันจะอัปเกรดเป็นแผน Firebase Blaze โดยอัตโนมัติ หากโปรเจ็กต์นั้นอยู่ในแผน Spark
ในทางตรงกันข้าม หากบัญชีการเรียกเก็บเงินใน Cloud ที่ใช้งานอยู่ถูกลบออกจากโปรเจ็กต์ใน Google Cloud Console โปรเจ็กต์นั้นจะถูกดาวน์เกรดเป็นแผน Firebase Spark
ฉันสามารถอัปเกรด ดาวน์เกรด หรือยกเลิกได้ตลอดเวลาหรือไม่
ได้ คุณสามารถอัปเกรด ดาวน์เกรด หรือยกเลิกได้ตลอดเวลา โปรดทราบว่าเราไม่คืนเงินตามสัดส่วนสำหรับการลดระดับหรือการยกเลิก ซึ่งหมายความว่าหากคุณปรับลดรุ่นหรือยกเลิกก่อนสิ้นสุดช่วงเวลาที่เรียกเก็บเงิน คุณจะยังคงชำระเงินส่วนที่เหลือของเดือน
ฉันจะได้รับการสนับสนุนประเภทใด?
แอป Firebase ทั้งหมด รวมถึงแอปที่ใช้แผนแบบไม่มีค่าใช้จ่าย จะได้รับการสนับสนุนทางอีเมลจากเจ้าหน้าที่ Firebase ในช่วงเวลาทำการของสหรัฐอเมริกาในแปซิฟิก All accounts have unlimited support for billing-related issues, account-related issues, technical (troubleshooting) questions, and incident reports.
Can I cap usage on the Blaze plan?
No, you cannot currently cap your Blaze plan usage. We are evaluating options for supporting caps on Blaze plan usage.
Blaze users can define a budget for their project or account, and receive alerts as their spending approaches those limits. Learn how to set up budget alerts .
What are automated backups? Do you offer hourly backups?
Automated backups are an advanced feature for customers on our Blaze pricing plan that backs up your Firebase Realtime Database data once a day and uploads it to Google Cloud Storage .
We do not offer hourly backups.
Do you offer open-source, nonprofit, or educational discounts?
Our Spark plan can be used by any type of individual or organization, including nonprofits, schools, and open-source projects. Since these plans already include generous quotas, we don't offer any special discounts or plans for open-source, nonprofit, or educational projects.
Do you offer enterprise contracts, pricing, support, or dedicated infrastructure hosting?
Our Blaze plan is suitable for enterprises of all sizes, and our SLA meets or exceeds the industry standard for cloud infrastructure. However, we do not currently offer enterprise contracts, pricing, or support, nor do we offer dedicated infrastructure hosting (that is, on-premises installations) for services like our Realtime Database. We are hard at work adding some of these features.
Do you offer ad-hoc pricing? I only want pay-as-you-go for one or two features.
We offer ad-hoc pricing in the Blaze plan, where you pay only for the features you use.
How do the paid Firebase plans work with Ads? Are there no-cost advertising credits with paid plans?
The Firebase pricing plans are separate from Ads, so there are no advertising credits without cost. As a Firebase developer, you are able to "link" your Ads account to Firebase to support conversion tracking.
All ads campaigns are managed directly in Ads, and Ads billing is managed from the Ads console.
Cloud Functions pricing
Why do I need a billing account to use Cloud Functions for Firebase?
Cloud Functions for Firebase relies on some paid Google services. New function deployments with Firebase CLI 11.2.0 and higher rely on Cloud Build and Artifact Registry . Deployments to older versions use Cloud Build in the same way, but rely on Container Registry and Cloud Storage for storage instead of Artifact Registry. Usage of these services will be billed in addition to existing pricing.
Storage space for Firebase CLI 11.2.0 and newer versions
Artifact Registry provides the containers in which functions run. Artifact Registry provides the first 500MB at no cost, so your first function deployments may not incur any fees. Above that threshold, each additional GB of storage is billed at $0.10 per month.
Storage space for Firebase CLI 11.1.x and prior versions
For functions deployed to older versions, Container Registry , provides the containers in which functions run. You'll be billed for each container required to deploy a function. You may notice small charges for each container stored—for example, 1GB of storage is billed at $0.026 per month .
To understand more about how your bill might change, please review the following
- Cloud Functions pricing : existing no-cost tier is unchanged.
- Cloud Build pricing: Cloud Build provides for a no-cost tier.
- Artifact Registry pricing .
- Container Registry pricing .
Does Cloud Functions for Firebase still have no-cost usage?
Yes. On the Blaze plan, Cloud Functions provides a no-cost tier for invocations, compute time, and internet traffic. The first 2,000,000 invocations, 400,000 GB-sec, 200,000 CPU-sec, and 5 GB of Internet egress traffic is provided at no cost each month. You'll be charged only for usage above those thresholds.
After the first 500MB of no-cost storage, each deployment operation will incur small-scale charges for the storage space used for the function's container. If your development process depends on deploying functions for testing, you can further minimize costs by using the Firebase Local Emulator Suite during development.
See Firebase Pricing plans and the Cloud Functions Pricing example scenarios.
Is Firebase planning to raise the quotas and limits for Cloud Functions for Firebase?
No. There are no plans to change the quotas except for the removal of a maximum build time limit; instead of receiving errors or warnings when the daily build quota of 120 minutes is reached, you'll be billed under the terms of the Blaze pricing plan. See Quotas and limits .
Can I get the Google Cloud $300 credit?
Yes, you can create a Cloud Billing account in the Google Cloud Console to get the $300 credit, then link that Cloud Billing account to a Firebase project.
More about the Google Cloud credit here .
Note that if you do this, you have to then set up the Blaze pricing plan in the Firebase console in order for your project to continue working after the $300 credit is exhausted.
I want to follow a codelab to learn about Firebase. Can you give me a temporary billing account?
No, sorry. You can use the Firebase emulator for development without having a Cloud Billing account. Alternatively, try applying for a Google Cloud free trial . If you're still having trouble paying your bill because of this change, contact Firebase Support.
I'm worried I'm going to rack up a huge bill.
You can set up budget alerts in the Google Cloud Console to help control costs. Also, you can set limits on the number of billed instances created for each of your functions. To get an idea of costing for typical scenarios, see the Cloud Functions Pricing examples.
How can I check my current billing charges?
View the Usage and billing dashboard in the Firebase console.
I use Firebase Extensions. Do I need a billing account?
Yes. Since extensions use Cloud Functions , extensions will be subject to the same charges as other functions.
To use extensions, you will need to upgrade to the Blaze pricing plan. You will be charged a small amount (typically around $0.01 per month for the Firebase resources required by each extension you install (even if they are not used), in addition to any charges associated with your use of Firebase services.
Privacy
Where can I find information about privacy and security in Firebase?
Check out the page Privacy and Security in Firebase .
Do the Firebase SDKs log any usage/diagnostic information outside of Analytics?
Yes. This is currently iOS-only, but may change in the future. The Firebase Apple platforms SDK includes the FirebaseCoreDiagnostics
framework by default. This framework is used by Firebase to collect SDK usage and diagnostics information to help prioritize future product enhancements. FirebaseCoreDiagnostics
is optional, so if you would like to opt out of sending Firebase diagnostic logs, you can do so by unlinking the library from your application. You can browse the full source, including logged values, on GitHub
A/B Testing
A/B Testing: How many experiments can I create and run?
You are allowed up to 300 experiments per project, which could consist of up to 24 running experiments, with the rest as draft or completed.
A/B Testing: Why can't I view my experiments after unlinking and re-linking my project to Google Analytics?
Linking to a different Google Analytics property will cause you to lose access to experiments created beforehand. To regain access to a previous experiment, re-link your project to the Google Analytics property that was linked when the experiment was created.
AdMob
AdMob: Can I link my Windows apps to Firebase?
No, Windows apps are not currently supported.
AdMob: Why can't I link my app to AdMob from the Firebase console?
You can link an AdMob app to a Firebase app via the AdMob console. Learn how.
AdMob: What permissions or access do I need to link a Firebase app to an AdMob app?
In order to do this linking, you need the following access:
- AdMob : You need to be an AdMob admin.
- Firebase : You must have the
firebase.links.create
permission, which is included in the Owner role and the Firebase Admin role . - Google Analytics : You must have the Edit role or Manage Users role for the property associated with the Firebase project. Learn more.
AdMob: Can multiple users in the same AdMob account link AdMob apps and Firebase apps?
For multi-user AdMob accounts , the user who created the first Firebase link and accepted the Firebase Terms of Service is the only user who can create new links between AdMob apps and Firebase apps.
AdMob: To use AdMob, should I use the Firebase SDK for AdMob or the Google Mobile Ads SDK?
- For iOS projects , use the Google Mobile Ads SDK:
pod 'Google-Mobile-Ads-SDK'
- For Android projects , use the Google Mobile Ads SDK:
implementation 'com.google.android.gms:play-services-ads:21.4.0'
Note that the Firebase Android SDKs for AdMob transitively include the Firebase SDK for Google Analytics. So, if your app calls any Google Analytics APIs and you switch to using the Google Mobile Ads SDK, make sure that you explicitly add the dependency for the Firebase SDK for Google Analytics (
) to your app'scom.google.firebase:firebase-analytics build.gradle
file. - For C++ projects and Unity projects , follow the instructions in the respective documentation.
Analytics
Analytics: Why is Google Analytics a recommended part of using Firebase products?
Google Analytics is a free and unlimited analytics solution that works with Firebase features to deliver powerful insights. It enables you to view event logs in Crashlytics, notification effectiveness in FCM, deep link performance for Dynamic Links, and in-app purchase data from Google Play. It powers advanced audience targeting in Remote Config, Remote Config personalization, and more.
Google Analytics acts as a layer of intelligence in the Firebase console to provide you with more actionable insights about how to develop a high quality app, grow your user base, and earn more money.
To get started, read the documentation .
Analytics: How do I control how my Analytics data is shared with the rest of Firebase?
By default, your Google Analytics data is used to enhance other Firebase and Google features. You can control how your Google Analytics data is shared in your project settings anytime. Learn more about Data sharing settings .
Analytics in my iOS app: Can I install Analytics without ad attribution and IDFA collection features?
Yes. See the Configure Data Collection and Usage page for more details.
Analytics: Why don't I see any data after unlinking my app from Google Analytics?
Your analytics data resides within the Google Analytics property - not within the Firebase project. If you delete or unlink the property, then your data is unlinked from your project as well. The data still resides in that property, however, and you can always relink it to your project.
Creating a new Google Analytics account (and new property) will result in having a blank analytics dashboard in the Firebase console.
Analytics: How do I segment users who have not met some criterion?
You can reframe the problem by "negatively targeting" these users. For example, reframe the problem as "Don't show ads to people who have bought something", and form an audience of those users to target.
Analytics: Are audiences and/or events defined in the Google Analytics interface also available in the Firebase console?
Your audiences and user properties will be synced. For some features, you'll need to use the Google Analytics interface, such as segmentation and closed funnels. You can access the Google Analytics interface directly via deep-links from the Firebase console.
Any changes you make from the Firebase console can also be performed in Google Analytics, and those changes will be reflected in Firebase.
Analytics: What changed in the Google Analytics section with the October 2021 update?
You can find a summary of these changes in the Firebase Help Center article New Google Analytics 4 functionality in Google Analytics for Firebase .
Upgrading your Analytics property
Analytics: What is the new fully upgraded Google Analytics account?
You can read more about the new Google Analytics upgrade in our blog post .
Analytics: How do I know if I'm using Google Analytics for Firebase or a fully upgraded Google Analytics account?
If you see a link to "View your data in Google Analytics" from the analytics dashboard in the Firebase console, then your project is using a fully upgraded Google Analytics account.
You can also check by viewing the Google Analytics card in the Firebase console (you can access this from settings > Project Settings > Integrations , then click Manage ). If you see a Linked Google Analytics account listed in the Your Google Analytics property section, your project is using the full Google Analytics experience in Firebase. If you do not see a Linked Google Analytics account , your project is using Google Analytics for Firebase.
Analytics: When must I upgrade my Google Analytics for Firebase property to retain service?
Any Firebase project created before July 31, 2019 must be upgraded to the full Google Analytics 4 experience if it hasn't already. (Banners display in the Analytics dashboard if an upgrade is required.) The associated Terms of Service must be accepted by February 15, 2022 to ensure data collection continues and by March 15, 2022 to prevent the deletion of the Analytics property and its data. If you no longer want to use Google Analytics and the associated data, no action is required and the property will be deleted on March 15, 2022.
Failure to accept the new Google Analytics Terms of Service will disrupt Firebase features, including Crash-Free Users (Crashlytics), targeted Configurations and Remote Config personalization, A/B Testing features, Targeting and Campaign Metrics (Cloud Messaging). It will also disrupt Google Analytics for Firebase Integrations , including Exporting project data to BigQuery , Google Ads Integrations , and AdMob Integrations .
If you have questions about accessing your Firebase project, including finding or assigning an Owner, review the Permissions and access to Firebase projects FAQs .
Analytics: What will happen to my data when I upgrade to the new Google Analytics for Firebase?
This will not affect your existing Firebase project analytics data in the Firebase console.
You will be able to continue using the same dashboard and workflows you are using today, and you will also have access to some advanced features in Google Analytics.
Note that if you decide to enable cross-device reporting after making the upgrade, your data will be de-duplicated using the UserID. This may decrease some user counts in the Firebase console.
Analytics: Why do I get an error when trying to upgrade my project to the new Google Analytics experience?
If you are experiencing an error when upgrading, such as:
The operation has failed (Reason: Requested entity already exists)
or
The operation has failed (Reason: Precondition check failed)
This means that there is an association between your project and an already existing Google Analytics property. You can unlink the property, delete it, or upgrade through the Google Analytics interface.
If this is still an issue, you can use the REST API to unlink by using the removeAnalytics
method , then use the addGoogleAnalytics
method to link a new property.
You can then move the data from one property to another .
Authentication
Firebase Authentication: Which countries are supported for phone authentication?
Firebase Authentication supports phone number verification across the the world, but not all networks reliably deliver our verification messages. The following countries have good rates of delivery, and should be expected to work well for phone number sign in.
Country | Code |
---|---|
AD | Andorra |
AE | United Arab Emirates |
AF | Afghanistan |
AG | Antigua and Barbuda |
AL | Albania |
AM | Armenia |
AO | Angola |
AR | Argentina |
AS | American Samoa |
AT | Austria |
AU | Australia |
AW | Aruba |
AZ | Azerbaijan |
BA | Bosnia and Herzegovina |
BB | Barbados |
BD | Bangladesh |
BE | Belgium |
BF | Burkina Faso |
BG | Bulgaria |
BJ | Benin |
BM | Bermuda |
BN | Brunei Darussalam |
BO | Bolivia |
BR | Brazil |
BS | Bahamas |
BT | Bhutan |
BW | Botswana |
BY | Belarus |
BZ | Belize |
CA | Canada |
CD | Congo, (Kinshasa) |
CF | Central African Republic |
CG | Congo (Brazzaville) |
CH | Switzerland |
CI | Côte d'Ivoire |
CK | Cook Islands |
CL | Chile |
CM | Cameroon |
CO | Colombia |
CR | Costa Rica |
CV | Cape Verde |
CW | Curaçao |
CY | Cyprus |
CZ | Czech Republic |
DE | Germany |
DJ | Djibouti |
DK | Denmark |
DM | Dominica |
DO | Dominican Republic |
DZ | Algeria |
EC | Ecuador |
EG | Egypt |
ES | Spain |
ET | Ethiopia |
FI | Finland |
FJ | Fiji |
FK | Falkland Islands (Malvinas) |
FM | Micronesia, Federated States of |
FO | Faroe Islands |
FR | France |
GA | Gabon |
GB | United Kingdom |
GD | Grenada |
GE | Georgia |
GF | French Guiana |
GG | Guernsey |
GH | Ghana |
GI | Gibraltar |
GL | Greenland |
GM | Gambia |
GP | Guadeloupe |
GQ | Equatorial Guinea |
GR | Greece |
GT | Guatemala |
GY | Guyana |
HK | Hong Kong, SAR China |
HN | Honduras |
HR | Croatia |
HT | Haiti |
HU | Hungary |
ID | Indonesia |
IE | Ireland |
IL | Israel |
IM | Isle of Man |
IN | India |
IQ | Iraq |
IT | Italy |
JE | Jersey |
JM | Jamaica |
JO | Jordan |
JP | Japan |
KE | Kenya |
KG | Kyrgyzstan |
KH | Cambodia |
KM | Comoros |
KN | Saint Kitts and Nevis |
KR | Korea (South) |
KW | Kuwait |
KY | Cayman Islands |
KZ | Kazakhstan |
LA | Lao PDR |
LB | Lebanon |
LC | Saint Lucia |
LI | Liechtenstein |
LK | Sri Lanka |
LS | Lesotho |
LT | Lithuania |
LU | Luxembourg |
LV | Latvia |
LY | Libya |
MA | Morocco |
MD | Moldova |
ME | Montenegro |
MF | Saint-Martin (French part) |
MG | Madagascar |
MK | Macedonia, Republic of |
MM | Myanmar |
MN | Mongolia |
MO | Macao, SAR China |
MS | Montserrat |
MT | Malta |
MU | Mauritius |
MW | Malawi |
MX | Mexico |
MY | Malaysia |
MZ | Mozambique |
NA | Namibia |
NC | New Caledonia |
NE | Niger |
NF | Norfolk Island |
NG | Nigeria |
NI | Nicaragua |
NL | Netherlands |
NO | Norway |
NP | Nepal |
NZ | New Zealand |
OM | Oman |
PA | Panama |
PE | Peru |
PG | Papua New Guinea |
PH | Philippines |
PK | Pakistan |
PL | Poland |
PM | Saint Pierre and Miquelon |
PR | Puerto Rico |
PS | Palestinian Territory |
PT | Portugal |
PY | Paraguay |
QA | Qatar |
RE | Réunion |
RO | Romania |
RS | Serbia |
RU | Russian Federation |
RW | Rwanda |
SA | Saudi Arabia |
SC | Seychelles |
SE | Sweden |
SG | Singapore |
SH | Saint Helena |
SI | Slovenia |
SK | Slovakia |
SL | Sierra Leone |
SN | Senegal |
SR | Suriname |
ST | Sao Tome and Principe |
SV | El Salvador |
SZ | Swaziland |
TC | Turks and Caicos Islands |
TG | Togo |
TH | Thailand |
TL | Timor-Leste |
TM | Turkmenistan |
TO | Tonga |
TR | Turkey |
TT | Trinidad and Tobago |
TW | Taiwan, Republic of China |
TZ | Tanzania, United Republic of |
UA | Ukraine |
UG | Uganda |
US | United States of America |
UY | Uruguay |
UZ | Uzbekistan |
VC | Saint Vincent and Grenadines |
VE | Venezuela (Bolivarian Republic) |
VG | British Virgin Islands |
VI | Virgin Islands, US |
VN | Viet Nam |
WS | Samoa |
YE | Yemen |
YT | Mayotte |
ZA | South Africa |
ZM | Zambia |
ZW | Zimbabwe |
Cloud Functions
Cloud Functions runtime support
How do I upgrade to the latest supported version of Node.js?
- Make sure you're on the Blaze pricing plan .
- Make sure you are using the latest version of the Firebase CLI.
- Update the
engines
field in your functions'package.json
. - Optionally, test your changes using the Firebase Local Emulator Suite .
- Redeploy all functions.
How can I make sure I deployed my functions to a specfic Node.js runtime?
In the Firebase console, go to the functions dashboard , select a function, and check the function's language under Additional details .
I use Firebase Extensions. Will I be affected by Cloud Functions runtime updates?
Yes. Since extensions use Cloud Functions , the runtime of your extensions will need to be updated on the same timeline as Cloud Functions.
We recommend that you periodically update to the latest version of each extension installed in your project. You can upgrade your projects' extensions via the Firebase console or Firebase CLI .
Cloud Messaging
Cloud Messaging: What's the difference between the Notifications composer and Cloud Messaging?
Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.
The Notifications composer is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, the Notifications composer lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
Capabilities | Notifications composer | Cloud Messaging | |
---|---|---|---|
Target | Single device | ||
Clients subscribed to topics (ie weather) | |||
Clients in predefined user segment (app, version, language) | |||
Clients in specified analytics audiences | |||
Clients in device groups | |||
Upstream from client to server | |||
Message Type | Notifications up to 2kb | ||
Data messages up to 4kb | |||
Delivery | Immediate | ||
Future client device local time | |||
Analytics | Built-in Notifications analytics collection and funnel analytics |
Cloud Messaging: Apple announced they're deprecating the legacy binary protocol for APNs. Do I need to do anything?
No. Firebase Cloud Messaging switched to the HTTP/2-based APNs protocol in 2017. If you are using FCM to send notifications to iOS devices, there should be no action required on your part.
Cloud Messaging: Do I need to use other Firebase services in order to use FCM?
You can use Firebase Cloud Messaging as a standalone component, in the same manner as you did with GCM, without using other Firebase services.
Cloud Messaging: I am an existing Google Cloud Messaging (GCM) developer. Should I move to Firebase Cloud Messaging?
FCM is the new version of GCM under the Firebase brand. It inherits GCM's core infrastructure, with new SDKs to make Cloud Messaging development easier.
Benefits of upgrading to FCM SDK include:
- Simpler client development. You no longer have to write your own registration or subscription retry logic.
- An out-of-the-box notification solution. You can use the Notifications composer, a serverless notifications solution with a web console that lets anyone send notifications to target specific audiences based on insights from Google Analytics for Firebase.
To upgrade from GCM SDKs to FCM SDKs, see the guides for migrating Android and iOS apps.
Cloud Messaging: Why do my targeted devices apparently fail to receive messages?
When it looks like devices haven't successfully received messages, check first for these two potential causes:
Foreground message handling for notification messages . Client apps need to add message handling logic to handle notification messages when the app is in the foreground on the device. See the details for iOS and Android .
Network firewall restrictions . If your organization has a firewall that restricts the traffic to or from the Internet, you need to configure it to allow connectivity with FCM in order for your Firebase Cloud Messaging client apps to receive messages. The ports to open are:
- 5228
- 5229
- 5230
FCM usually uses 5228, but it sometimes uses 5229 and 5230. FCM does not provide specific IPs, so you should allow your firewall to accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of 15169 .
Cloud Messaging: I have implemented onMessageReceived
in my Android app, but it is not being called.
When your app is in the background, notification messages are displayed in the system tray, and onMessageReceived
is not called. For notification messages with a data payload, the notification message is displayed in the system tray, and the data that was included with the notification message can be retrieved from the intent launched when the user taps on the notification.
For more information, see Receive and handle messages .
Notifications composer: What's the difference between the Notifications composer and Cloud Messaging?
The Notifications composer is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, the Notifications composer lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.
Here's a comparison of the messaging capabilities provided by Firebase Cloud Messaging and the Notifications composer:
Capabilities | Notifications composer | Cloud Messaging | |
---|---|---|---|
Target | Single device | ||
Clients subscribed to topics (ie weather) | |||
Clients in predefined user segment (app, version, language) | |||
Clients in specified analytics audiences | |||
Clients in device groups | |||
Upstream from client to server | |||
Message Type | Notifications up to 2kb | ||
Data messages up to 4kb | |||
Delivery | Immediate | ||
Future client device local time | |||
Analytics | Built-in Notifications analytics collection and funnel analytics |
Notifications composer: I am an existing Google Cloud Messaging (GCM) developer, and I want to use the Notifications composer. What should I do?
The Notifications composer is an out-of-the-box solution that lets anyone send notifications to target specific audiences based on insights from Google Analytics for Firebase. Also, the Notifications composer provides funnel analysis for every message, allowing easy evaluation of notification effectiveness.
If you are an existing GCM developer, to use the Notifications composer you have to upgrade from GCM SDKs to FCM SDKs. See the guides for migrating Android and iOS apps.
Cloud Storage for Firebase
Cloud Storage for Firebase: Why can't I use Cloud Storage for Firebase?
Cloud Storage for Firebase creates a default bucket in the App Engine no-cost tier. This allows you to quickly get up and running with Firebase and Cloud Storage for Firebase, without having to put in a credit card or enable a Cloud Billing account. It also allows you to easily share data between Firebase and a Google Cloud project.
There are, however, two known cases where this bucket cannot be created and you will be unable to use Cloud Storage for Firebase:
- A project imported from Google Cloud which had a App Engine Master/Slave Datastore application.
- A project imported from Google Cloud which has domain prefixed projects. For example:
domain.com:project-1234
.
There are currently no workarounds to these issues, and we recommend that you create a new project in the Firebase console and enable Cloud Storage for Firebase in that project.
Cloud Storage for Firebase: Why do I get error code 412 responses about service account permissions and failed service account operations when using the Cloud Storage for Firebase API?
It's likely you're getting 412 error codes either because the Cloud Storage for Firebase API is not enabled for your project or a necessary service account is missing the required permissions.
See the related FAQ .
Cloud Storage for Firebase: Why do I see new service account IDs associated with my Firebase projects that use Cloud Storage for Firebase?
Firebase uses service accounts to operate and manage services without sharing user credentials. When you create a Firebase project, you might notice that a number of service accounts are already available in your project.
The service account that Cloud Storage for Firebase uses is scoped to your project and is named
service- PROJECT_NUMBER @gcp-sa-firebasestorage.iam.gserviceaccount.com
.
If you used Cloud Storage for Firebase before September 19, 2022, you may see an additional service account on previously-linked Cloud Storage buckets named firebase-storage@system.gserviceaccount.com
. As of September 19, 2022, this service account is no longer supported.
You can view all service accounts associated with your project in the Firebase console, on the Service accounts tab .
Adding the new service account
If you removed the service account previously or the service account is not present in your project, you may do one of the following to add the account.
- (Recommended) Automated: Use the AddFirebase REST endpoint to re-import your bucket into Firebase. You will only need to call this endpoint once, not once for each linked bucket.
- Manual: Follow the steps in Creating and managing service accounts . Following that guide, add a service account with the IAM role
Cloud Storage for Firebase Service Agent
, and service account name
service- PROJECT_NUMBER @gcp-sa-firebasestorage.iam.gserviceaccount.com
.
Removing the new service account
We strongly discourage you from removing the service account because this may block access to your Cloud Storage buckets from your apps. To remove the service account from your project, follow the instructions in Disabling a service account .
Crashlytics
Visit the Crashlytics troubleshooting & FAQ page for helpful tips and answers to more FAQs.
Dynamic Links
Dynamic Links: Why does my Android app access each Dynamic Link twice?
The getInvitation
API clears the saved Dynamic Link to prevent it from being accessed twice. Be sure to call this API with the autoLaunchDeepLink
parameter set to false
in each of the deep link activities to clear it for the case when the activity is triggered outside the main activity.
Firebase Local Emulator Suite
Why do Emulator Suite logs show an error starting with "Multiple projectIds are not recommended in single project mode"?
This message means the Emulator Suite has detected it may be running a particular product emulator using different project IDs. This may indicate a misconfiguration, and can cause issues when emulators try to communicate with one another, and when you try to interact with emulators from your code. If project IDs don't match, it often appears that data is missing, since data stored in emulators is keyed to projectID, and interoperability depends on matching project IDs.
This has been a common source of confusion among developers, so by default the Local Emulator Suite will now only allow running with a single project ID, unless you specify otherwise in the firebase.json
configuration file. If an emulator detects more than one project ID, it will log a warning and potentially throw a fatal error.
Check your project ID declaration(s) for mismatches in:
- The default project set at the command line. By default, the project ID will be taken on startup from the project selected with
firebase init
orfirebase use
. To view the list of projects (and see which one is selected) usefirebase projects:list
. - Unit tests. The project ID is often specified in calls to the Rules Unit Testing library methods
initializeTestEnvironment
orinitializeTestApp
. Other testing code may initialize withinitializeApp(config)
. - The command line
--project
flag. Passing the Firebase CLI--project
flag overrides the default project. You'll need to ensure the value of the flag matches the project ID in unit tests and app initialization.
Platform-specific places to check:
Web | The projectId property in your JavaScript firebaseConfig object, used in initializeApp . |
Android | The project_id property inside the google-services.json configuration file. |
Apple platforms | The PROJECT_ID property in the GoogleService-Info.plist configuration file. |
To disable single project mode, update firebase.json
with the singleProjectMode
key:
{ "firestore": { ... }, "functions": { ... }, "hosting": { ... }, "emulators": { "singleProjectMode": false, "auth": { "port": 9099 }, "functions": { "port": 5001 }, ... } }
Hosting
Hosting: Why does my Hosting release history table in the Firebase console show file counts that are more than what my local project actually has?
Firebase automatically adds extra files containing metadata about the Hosting site, and these files are included in the total file count for the release.
Hosting: What's the largest file size that I can deploy to Firebase Hosting?
Hosting has a maximum size limit of 2 GB for individual files.
We recommend storing larger files using Cloud Storage , which offers a maximum size limit in the terabyte range for individual objects.
Hosting: How many Hosting sites can I have per Firebase project?
The Firebase Hosting multisite feature supports a maximum of 36 sites per project.
Performance Monitoring
Visit the Performance Monitoring troubleshooting & FAQ page for helpful tips and answers to more FAQs.
Performance Monitoring: How many custom URL patterns can I create?
You can create up to 400 total custom URL patterns per app and up to 100 custom URL patterns per domain for that app.
Performance Monitoring: Why am I not seeing real time display of performance data?
To view real time performance data, make sure that your app uses a Performance Monitoring SDK version that's compatible with real time data processing.
- iOS — v7.3.0 or later
- tvOS — v8.9.0 or later
- Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
- Web — v7.14.0 or later
Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.
Realtime Database
Realtime Database: Why was my Realtime Database reported bandwidth lower than average between September 2016 and March 2017?
For our bandwidth calculations, we normally include SSL encryption overhead (based on layer 5 of the OSI model). However, in September 2016, we introduced a bug that caused our bandwidth reporting to ignore encryption overhead. This might have resulted in artificially low reported bandwidth and bills on your account for a few months.
We released a fix for the bug in late March 2017, returning bandwidth reporting and billing to their normal levels.
Realtime Database: What are the scaling limitations of the Realtime Database?
Each Realtime Database instance has limits on the number of write operations per second. For small writes, this limit is approximately 1000 write operations per second. If you are approaching this limit, batching operations using multi-path updates can help you achieve higher throughput.
In addition, each database instance has a cap on the number of simultaneous database connections . Our default limits are large enough for most applications. If you are building an app that requires additional scale, you may need to shard your application across multiple database instances for added scale. You may also consider Cloud Firestore as an alternative database.
Realtime Database: What can I do if I'm over my Realtime Database usage limits?
If you've received an email alert or notification in the Firebase console that you've exceeded your Realtime Database usage limits, you can address it based on the usage limit you've exceeded. To see your Realtime Database usage, go to the Realtime Database Usage dashboard in the Firebase console.
If you're over your download limit, you can upgrade your Firebase pricing plan or wait until your download limit resets at the start of your next billing cycle. To decrease your downloads, try the following steps:
- Add queries to limit the data that your listen operations return.
- Check for unindexed queries.
- Use listeners that only download updates to data — for example,
on()
instead ofonce()
. - Use security rules to block unauthorized downloads.
If you're over your storage limit, upgrade your pricing plan to avoid service disruptions. To reduce the amount of data in your database, try the following steps:
- Run periodic cleanup jobs.
- Reduce any duplicate data in your database.
Note that it may take some time to see any data deletions reflected in your storage allotment.
If you're over your simultaneous database connections limit, upgrade your plan to avoid any service disruptions. To manage simultaneous connections to your database, try connecting via users via the REST API if they don't require a realtime connection.
Remote Config
Remote Config: Why don't fetched values change the behavior and appearance of my app?
Unless you fetch values with fetchAndActivate()
, values are stored locally but not activated. To activate fetched values so that they can take effect, call activate
. This design lets you control when the behavior and appearance of your app changes, because you can choose when to call activate
. After you call activate
, your app source code determines when updated parameter values are used.
For example, you could fetch values and then activate them the next time a user starts your app, which removes the need to delay app startup while your app waits for fetched values from the service. Changes to your app's behavior and appearance then occur when your app uses the updated parameter values.
To learn more about the Remote Config API and usage model, see Remote Config API Overview .
Remote Config: I am making a lot of fetch requests while developing my app. Why doesn't my app always get the latest values from the service when it sends fetch requests?
During app development, you might want to fetch and activate configs very frequently (many times per hour) to let you rapidly iterate as you develop and test your app. To accommodate rapid iteration on a project with up to 10 developers, you can temporarily set a FirebaseRemoteConfigSettings
object with a low minimum fetch interval ( setMinimumFetchIntervalInSeconds
) in your app.
Remote Config: How quickly does the Remote Config service return fetched values after my app sends a fetch request?
Devices usually receive fetched values in less than a second, and often receive fetched values in milliseconds. The Remote Config service handles fetch requests within milliseconds, but the time required to complete a fetch request will depend on the network speed of the device and the latency of the network connection used by the device.
If your goal is to make fetched values take effect in your app as soon as possible, but without creating a jarring user experience, consider adding calls to fetchAndActivate
each time that your app does a full screen refresh.
Test Lab
Visit the Test Lab troubleshooting page for helpful tips and answers to FAQs.
Firebase User Segmentation Storage
What is Firebase User Segmentation Storage?
Firebase User Segmentation Storage stores Firebase installation IDs and related attributes and segments as well as audience lists you've created to provide targeting information to other Firebase services that use them, such as Crashlytics, FCM, Remote Config personalization, and more.