firebase / firebase/firebase-js-sdk
Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### Operating System
- macOS 10.15.7 (Catalina) — majority of occurrences - Windows 10 — at least one confirmed occurrence (Chrome 129.0.0.0)
### Environment (if applicable)
Browser: Google Chrome, Safari
### Firebase SDK Version
12.4.0
### Firebase SDK Product(s)
Storage
### Project Tooling
Framework: Angular (v22.0.1)
Language: TypeScript (v6.0.3)
Firebase SDK: firebase (v12.14.0)
Node.js (v24.16.0)
### Detailed Problem Description
We are trying to upload audio files (MP3, up to 15 MB — this is our app's enforced maximum) to Firebase Storage using `uploadBytesResumable`. The upload succeeds the vast majority of the time. However, intermittently, the upload fails with:
Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)
The full error object captured from our analytics event log is:
```
{
"error": {
"_baseMessage": "Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)",
"code": "storage/unknown",
"customData": {
"serverResponse": ""
},
"name": "FirebaseError",
"status_": 400
},
"path": "sheet_music/92oBKIzIMSw8STjnndjL",
"uploadType": "blob_resumable"
}
```
The screenshot below shows the event logs for the same session. The start upload event fires at 12:04:10, and upload failed fires at 12:04:15 — approximately 5 seconds later.
### Steps and code to reproduce issue
We have not been able to create a minimal reproduction, as this error only appears intermittently (flaky) across real user sessions.
However, the error consistently appears in one of two scenarios in our app:
1. Direct audio upload — A user selects an MP3 file (up to 15 MB) via a file picker and the app calls uploadBytesResumable to store it at a sheet_music/{documentId} path. Most uploads succeed; occasionally the task fails immediately with storage/unknown and an empty serverResponse.
2. Copy on submit — When a user submits a form, the app fetches the previously uploaded audio blob from Storage (getBlob) and immediately re-uploads it to a new sheet_music/{submittedPath} path using uploadBytesResumable. The error also surfaces here intermittently.
In both cases, the upload fails with serverResponse: "" and status_: 400. We cannot determine from the available data at which phase of the resumable upload the failure occurs.
Contributor guide
Assessment
This issue has not been assessed yet.