จัดการข้อผิดพลาดสำหรับ Cloud Storage สำหรับ Unity
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บางครั้งเมื่อคุณสร้างแอป สิ่งต่างๆ อาจไม่เป็นไปตามแผนและเกิดข้อผิดพลาดขึ้น
หากไม่แน่ใจ ให้ตรวจสอบข้อผิดพลาดที่ส่งคืนและดูว่าข้อความแสดงข้อผิดพลาดระบุว่าอย่างไร
หากคุณได้ตรวจสอบข้อความแสดงข้อผิดพลาดและมีCloud Storage Security Rulesที่อนุญาตให้ดำเนินการ แต่ยังคงแก้ไขข้อผิดพลาดไม่ได้ โปรดไปที่หน้าการสนับสนุนของเราและแจ้งให้เราทราบว่าเราจะช่วยคุณได้อย่างไร
จัดการข้อความแสดงข้อผิดพลาด
ข้อผิดพลาดอาจเกิดขึ้นได้จากหลายสาเหตุ เช่น ไม่มีไฟล์
ผู้ใช้ไม่มีสิทธิ์เข้าถึงไฟล์ที่ต้องการ หรือ
ผู้ใช้ยกเลิกการอัปโหลดไฟล์
หากต้องการวินิจฉัยปัญหาและจัดการข้อผิดพลาดอย่างถูกต้อง โปรดดูรายการข้อผิดพลาดทั้งหมดของ Firebase.Storage.StorageException
ที่ไคลเอ็นต์ของเราจะแจ้งและวิธีที่ข้อผิดพลาดเหล่านี้อาจเกิดขึ้น
ชื่อ |
เหตุผล |
ErrorUnknown |
เกิดข้อผิดพลาดที่ไม่รู้จัก |
ErrorObjectNotFound |
ไม่มีออบเจ็กต์ในการอ้างอิงที่ระบุ |
ErrorBucketNotFound |
ไม่ได้กำหนดค่าที่เก็บข้อมูลสำหรับ Cloud Storage |
ErrorProjectNotFound |
ไม่มีการกำหนดค่าโปรเจ็กต์สำหรับ Cloud Storage |
ErrorQuotaExceeded |
คุณใช้โควต้าในที่เก็บข้อมูล Cloud Storage เกินแล้ว หากคุณใช้แพ็กเกจราคา Spark โปรดพิจารณาอัปเกรดเป็นแพ็กเกจราคา Blaze แบบจ่ายตามการใช้งาน หากคุณใช้แพ็กเกจการกำหนดราคา Blaze อยู่แล้ว โปรดติดต่อทีมสนับสนุนของ Firebase
สำคัญ: ตั้งแต่วันที่ 1 ตุลาคม 2025 เป็นต้นไป คุณต้องใช้แพ็กเกจการกำหนดราคา Blaze เพื่อใช้ Cloud Storage แม้จะเป็นที่เก็บข้อมูลเริ่มต้นก็ตาม |
ErrorNotAuthenticated |
ผู้ใช้ไม่ได้รับการตรวจสอบสิทธิ์ โปรดตรวจสอบสิทธิ์แล้วลองอีกครั้ง |
ErrorNotAuthorized |
ผู้ใช้ไม่ได้รับอนุญาตให้ดำเนินการตามที่ขอ ตรวจสอบกฎเพื่อให้แน่ใจว่าถูกต้อง |
ErrorRetryLimitExceeded |
การดำเนินการ (อัปโหลด ดาวน์โหลด ลบ ฯลฯ) ใช้เวลาเกินขีดจำกัดสูงสุด โปรดลองอัปโหลดอีกครั้ง |
ErrorInvalidChecksum |
ไฟล์ในไคลเอ็นต์ไม่ตรงกับผลรวมตรวจสอบของไฟล์ที่เซิร์ฟเวอร์ได้รับ โปรดลองอัปโหลดอีกครั้ง |
ErrorCanceled |
ผู้ใช้ยกเลิกการดำเนินการ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-08 UTC
[null,null,["อัปเดตล่าสุด 2025-08-08 UTC"],[],[],null,["\u003cbr /\u003e\n\nSometimes when you're building an app, things don't go as planned and an\nerror occurs.\n\nWhen in doubt, check the error returned, and see what the error message says.\n| **Note:** By default, a Cloud Storage for Firebase bucket requires Firebase Authentication to perform any action on the bucket's data or files. You can change your Firebase Security Rules for Cloud Storage to [allow unauthenticated access for specific situations](/docs/storage/security/rules-conditions#public). However, for most situations, we strongly recommend [restricting access and setting up robust security rules](/docs/storage/security/get-started) (especially for production apps). Note that if you use Google App Engine and have a default Cloud Storage bucket with a name format of `*.appspot.com`, you may need to consider [how your security rules impact access to App Engine files](/docs/storage/gcp-integration#security-rules-and-app-engine-files).\n\nIf you've checked the error message and have Cloud Storage Security Rules that allow your\naction, but are still struggling to fix the error, visit our\n[Support page](/support) and let us know how we can help.\n\nHandle Error Messages\n\nThere are a number of reasons why errors may occur, including the file\nnot existing, the user not having permission to access the desired file, or the\nuser cancelling the file upload.\n\nTo properly diagnose the issue and handle the error, here is a full list of\nall the [`Firebase.Storage.StorageException`](/docs/reference/unity/class/firebase/storage/storage-exception)\nerrors our client will raise, and how they can occur.\n\n| Name | Reason |\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ErrorUnknown` | An unknown error occurred. |\n| `ErrorObjectNotFound` | No object exists at the specified reference. |\n| `ErrorBucketNotFound` | No bucket is configured for Cloud Storage. |\n| `ErrorProjectNotFound` | No project is configured for Cloud Storage. |\n| `ErrorQuotaExceeded` | Quota on your Cloud Storage bucket has been exceeded. If you're on the Spark pricing plan, consider upgrading to the [pay-as-you-go Blaze pricing plan](/pricing). If you're already on the Blaze pricing plan, reach out to Firebase Support. **Important** : Starting October 1, 2025, the [Blaze pricing plan will be *required* to use Cloud Storage](/docs/storage/faqs-storage-changes-announced-sept-2024), even default buckets. |\n| `ErrorNotAuthenticated` | User is unauthenticated. Authenticate and try again. |\n| `ErrorNotAuthorized` | User is not authorized to perform the requested action. Check your rules to ensure they are correct. |\n| `ErrorRetryLimitExceeded` | The maximum time limit on an operation (upload, download, delete, etc.) has been exceeded. Try uploading again. |\n| `ErrorInvalidChecksum` | File on the client does not match the checksum of the file received by the server. Try uploading again. |\n| `ErrorCanceled` | User canceled the operation. |"]]