Handle errors for Cloud Storage on Apple platforms

Sometimes when you're building an app, things don't go as planned and an error occurs.

When in doubt, check the error returned, and see what the error message says.

If you've checked the error message and have Cloud Storage Security Rules that allow your action, but are still struggling to fix the error, visit our Support page and let us know how we can help.

Handle Error Messages

There are a number of reasons why errors may occur, including the file not existing, the user not having permission to access the desired file, or the user cancelling the file upload.

To properly diagnose the issue and handle the error, here is a full list of all the errors our client will raise, and how they can occur.

NameReason
FIRStorageErrorCodeUnknownAn unknown error occurred.
FIRStorageErrorCodeObjectNotFoundNo object exists at the specified reference.
FIRStorageErrorCodeBucketNotFoundNo bucket is configured for Cloud Storage.
FIRStorageErrorCodeProjectNotFoundNo project is configured for Cloud Storage.
FIRStorageErrorCodeQuotaExceededQuota 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. 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, even default buckets.
FIRStorageErrorCodeUnauthenticatedUser is unauthenticated. Authenticate and try again.
FIRStorageErrorCodeUnauthorizedUser is not authorized to perform the requested action. Check your rules to ensure they are correct.
FIRStorageErrorCodeRetryLimitExceededThe maximum time limit on an operation (upload, download, delete, etc.) has been exceeded. Try uploading again.
FIRStorageErrorCodeNonMatchingChecksumFile on the client does not match the checksum of the file received by the server. Try uploading again.
FIRStorageErrorCodeCanceledUser canceled the operation.
FIRStorageErrorCodeDownloadSizeExceededSize of the downloaded file exceeds the amount of memory allocated for the download. Increase memory cap and try downloading again.