There was an error uploading a file to Cloud Storage: FirebaseError: Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- firebase, javascript
Hướng nghiên cứu
Tái hiện quy trình tải lên trong thiết lập codelab-friendlychat-web\web, sau đó bắt đầu từ saveImageMessage và onMediaFileSelected trong index.js rồi kiểm tra yêu cầu Storage 400 đã được báo cáo. Được xem là hoàn tất khi một hình ảnh nhỏ được tải lên thành công, xuất hiện trong Firebase Storage và tin nhắn trò chuyện không còn nằm trên placeholder đang xoay.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[REQUIRED] Codelab info
https://github.com/firebase/codelab-friendlychat-web.git
The web app failed to upload image with unknown error messages in console.
[REQUIRED] Project setup
codelab-friendlychat-web\web
I followed the instructions at https://firebase.google.com/codelabs/firebase-web#0
[REQUIRED] Describe the problem
Web app failed to upload image with unknown error issue in console
I tried with Chrome and Edge several times. Results were same.
After setup everything mentioned in the instructions https://firebase.google.com/codelabs/firebase-web#0, I started the local hosting server http://localhost:5000, then logged in and ran some tests.
For text messages, it works fine. I can see the messages are properly stored in Firestore database and shown on web page.
But when I tried to upload a small image (30KB), it could finish loading. On the web page, there is a progressing gif spinning and never stops. In the Firebase Storage, it is empty. In the Firebase Firestore Database, I can see a message like this:
imageUrl: "https://www.google.com/images/spin-32.gif?a"
name: "Free Nbload"
profilePicUrl: "https://lh3.googleusercontent.com/a/AATXAJx5kJZWppm91otaS4GdVwT32FyxgNV-r2Fwo-Rl=s96-c"
timestamp: April 14, 2022 at 6:57:58 AM UTC-7
From Chrome Dev console, I noticed some error messages:
POST https://firebasestorage.googleapis.com/v0/b/friendlychat-e91d8.appspot.com/o?name=WhNE6oS971OlXH6zpXsJoDLkpXg2%2FwNJaVrbwqd889GFnRsAa%2Fmagic8ballQuestion.png 400 inspector.js:44
XMLHttpRequest.send @ inspector.js:44
send @ index.esm2017.js?e0fc:2096
doTheRequest @ index.esm2017.js?e0fc:632
eval @ index.esm2017.js?e0fc:373
setTimeout (async)
callWithDelay @ index.esm2017.js?e0fc:371
start @ index.esm2017.js?e0fc:434
start_ @ index.esm2017.js?e0fc:698
eval @ index.esm2017.js?e0fc:603
NetworkRequest @ index.esm2017.js?e0fc:600
makeRequest @ index.esm2017.js?e0fc:769
_makeRequest @ index.esm2017.js?e0fc:3213
eval @ index.esm2017.js?e0fc:2396
eval @ index.esm2017.js?e0fc:2299
Promise.then (async)
_resolveToken @ index.esm2017.js?e0fc:2296
_oneShotUpload @ index.esm2017.js?e0fc:2394
_start @ index.esm2017.js?e0fc:2288
eval @ index.esm2017.js?e0fc:2247
UploadTask @ index.esm2017.js?e0fc:2244
uploadBytesResumable$1 @ index.esm2017.js?e0fc:2821
uploadBytesResumable @ index.esm2017.js?e0fc:3328
saveImageMessage @ index.js?b635:138
await in saveImageMessage (async)
onMediaFileSelected @ index.js?b635:213
There was an error uploading a file to Cloud Storage: FirebaseError: Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown) index.js?b635:149
saveImageMessage @ index.js?b635:149
await in saveImageMessage (async)
onMediaFileSelected @ index.js?b635:213
[Optional] Suggested fix
- Ngôn ngữ chính
- JavaScript
- Star
- 1.9k
- Fork
- 1.8k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/codelab-friendlychat-web
-
Codelab freindly chat website.Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
RunĐang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
firebase/codelab-friendlychat-web#877 · 2 bình luận ·
-
Go to '...'Đang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
-
CameraĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
-
Sifsin projectĐang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
firebase/codelab-friendlychat-web#837 · 1 reaction ·
Tất cả issue của firebase/codelab-friendlychat-web
Issue tương tự
-
Quick Connect form is off-centerĐang mởbug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
jellyfin/jellyfin-web#8865 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
renderer.44: a zoom out cannot keep the center and stay inside data.range at an end of the dataĐang mởarea:contract P3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
grafana/viz-contract#100 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SUB-1: [CI] Update deprecated CodeQL Action v2 to v4Có thể đã có người làm @AnkitSatpute đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
-
The model name in the conversation header is truncated to "Qwen3…" with free space beside itĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100