با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
گاهی اوقات وقتی در حال ساخت اپلیکیشن هستید، همه چیز طبق برنامه پیش نمی رود و خطایی رخ می دهد!
در صورت شک، کنترل کننده خطا (یا تابع catch() را برای Promises بررسی کنید، و ببینید پیام خطا چه چیزی برای گفتن دارد.
اگر پیام خطا را بررسی کردهاید و Cloud Storage Security Rules دارید که به عملکرد شما اجازه میدهد، اما همچنان در تلاش برای حل این خطا هستید، از صفحه پشتیبانی ما دیدن کنید و به ما اطلاع دهید که چگونه میتوانیم کمک کنیم.
مدیریت پیام های خطا
دلایل متعددی وجود دارد که ممکن است خطا رخ دهد، از جمله فایل موجود نیست، کاربر اجازه دسترسی به فایل مورد نظر را ندارد، یا کاربر بارگذاری فایل را لغو می کند.
برای تشخیص صحیح مشکل و رسیدگی به خطا، در اینجا لیست کاملی از تمام خطاهایی که مشتری ما مطرح می کند و نحوه وقوع آنها آورده شده است.
کد
دلیل
storage/unknown
یک خطای ناشناخته رخ داد.
storage/object-not-found
هیچ شیئی در مرجع مشخص شده وجود ندارد.
storage/bucket-not-found
هیچ سطلی برای Cloud Storage پیکربندی نشده است
storage/project-not-found
هیچ پروژه ای برای Cloud Storage پیکربندی نشده است
storage/quota-exceeded
از سهمیه سطل Cloud Storage شما فراتر رفته است. اگر از طرح قیمتگذاری Spark استفاده میکنید، به طرح قیمتگذاری Blaze بهصورت رایگان ارتقا دهید. اگر قبلاً در طرح قیمت گذاری Blaze هستید، با پشتیبانی Firebase تماس بگیرید.
کاربر احراز هویت نشده است، لطفا احراز هویت کنید و دوباره امتحان کنید.
storage/unauthorized
کاربر مجاز به انجام عمل درخواستی نیست، قوانین امنیتی خود را بررسی کنید تا از صحت آنها اطمینان حاصل کنید.
storage/retry-limit-exceeded
از حداکثر محدودیت زمانی برای یک عملیات (آپلود، دانلود، حذف و غیره) فراتر رفته است. دوباره آپلود کنید.
storage/invalid-checksum
فایل روی کلاینت با جمع کنترلی فایل دریافت شده توسط سرور مطابقت ندارد. دوباره آپلود کنید.
storage/canceled
کاربر عملیات را لغو کرد.
storage/invalid-event-name
نام رویداد نامعتبر ارائه شده است. باید یکی از [ `running` ، `progress` ، `pause` ] باشد
storage/invalid-url
URL نامعتبر ارائه شده به refFromURL() . باید به این شکل باشد: gs://bucket/object یا https://firebasestorage.googleapis.com/v0/b/bucket/o/object?token=<TOKEN>
storage/invalid-argument
آرگومان ارسال شده به put() باید آرایه «File»، «Blob» یا «UInt8» باشد. آرگومان ارسال شده به putString() باید یک رشته خام، «Base64» یا «Base64URL» باشد.
storage/no-default-bucket
هیچ سطلی در ویژگی storageBucket پیکربندی Firebase شما تنظیم نشده است.
storage/cannot-slice-blob
معمولاً زمانی اتفاق میافتد که فایل محلی تغییر کرده باشد (حذف شود، دوباره ذخیره شود، و غیره). پس از تأیید عدم تغییر فایل، دوباره آپلود کنید.
storage/server-file-wrong-size
فایل روی کلاینت با اندازه فایل دریافت شده توسط سرور مطابقت ندارد. دوباره آپلود کنید.
تاریخ آخرین بهروزرسانی 2025-09-04 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-09-04 بهوقت ساعت هماهنگ جهانی."],[],[],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 handler (or `catch()` function for Promises),\nand see what the error message has to say.\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 solve 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 errors our client will raise, and how they occurred.\n\n| Code | Reason |\n|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `storage/unknown` | An unknown error occurred. |\n| `storage/object-not-found` | No object exists at the specified reference. |\n| `storage/bucket-not-found` | No bucket is configured for Cloud Storage |\n| `storage/project-not-found` | No project is configured for Cloud Storage |\n| `storage/quota-exceeded` | 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| `storage/unauthenticated` | User is unauthenticated, please authenticate and try again. |\n| `storage/unauthorized` | User is not authorized to perform the requested action, check your security rules to ensure they are correct. |\n| `storage/retry-limit-exceeded` | The maximum time limit on an operation (upload, download, delete, etc.) has been exceeded. Try uploading again. |\n| `storage/invalid-checksum` | File on the client does not match the checksum of the file received by the server. Try uploading again. |\n| `storage/canceled` | User canceled the operation. |\n| `storage/invalid-event-name` | Invalid event name provided. Must be one of \\[```running```, ```progress```, ```pause```\\] |\n| `storage/invalid-url` | Invalid URL provided to `refFromURL()`. Must be of the form: gs://bucket/object or https://firebasestorage.googleapis.com/v0/b/bucket/o/object?token=\\<TOKEN\\\u003e |\n| `storage/invalid-argument` | The argument passed to `put()` must be \\`File\\`, \\`Blob\\`, or \\`UInt8\\` Array. The argument passed to `putString()` must be a raw, \\`Base64\\`, or \\`Base64URL\\` string. |\n| `storage/no-default-bucket` | No bucket has been set in your Firebase config's `storageBucket` property. |\n| `storage/cannot-slice-blob` | Commonly occurs when the local file has changed (deleted, saved again, etc.). Try uploading again after verifying that the file hasn't changed. |\n| `storage/server-file-wrong-size` | File on the client does not match the size of the file received by the server. Try uploading again. |"]]