You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Electron+React应用集成Firebase Storage遇storage/retry-limit-exceeded错误求助

Electron+React 集成 Firebase Storage 触发重试超时错误

我基于 Electron+React 模板开发的应用,在集成 Firebase Storage 时遇到问题——所有 Storage 操作(列出文件、获取下载链接、上传/下载文件)都会触发以下错误:

Firebase.tsx:31 Uncaught (in promise) FirebaseError: Firebase Storage: Max retry time for operation exceeded, please try again. (storage/retry-limit-exceeded)

调试代码如下:

import { initializeApp } from 'firebase/app';
import { getStorage, ref, getDownloadURL} from 'firebase/storage';

const firebaseConfig = {
  apiKey: 
  authDomain: ...
  projectId: ...
  storageBucket: ...
  messagingSenderId:...
  appId:...
};

const app = initializeApp(firebaseConfig);

const storage = getStorage(app);

const file = ref(storage, '/maps/122.png');

async function getURL() {
  let data = await getDownloadURL(file);
  console.log(data);
}

function Firebase() {
  return <button onClick={() => getURL()}>Click</button>;
}

点击按钮等待数秒后,控制台就会出现上述错误。我已尝试以下方案,但问题仍未解决:

  • 更换不同的 Storage 操作函数
  • 调整函数参数
  • 直接复制官方文档示例代码
  • 将 Storage 规则设置为允许所有操作
  • 检查并确认重试限制为默认值

内容的提问来源于stack exchange,提问作者Daniel Cholewski

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 19:15:38