为什么我的firebase云功能会继续遇到内部错误500?

发布于 2025-02-09 08:16:32 字数 608 浏览 4 评论 0原文

我试图在Firebase上部署云功能,但我一直遇到此错误。我删除了所有逻辑以安慰响应和调试,但没有任何改变。

我确定问题与权限无关,因为允许使用未经认可的用户调用。

这是我功能的块:

// Firebase config
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const cors = require("cors")({
  origin: true
});

admin.initializeApp();

exports.emailMessage = functions.https.onCall((req, res) => {
  return cors(req, res, async() => {
    console.log(req);
    console.log(res);
  }).catch(() => {
    res.status(500).send("error");
  });
});

I was trying to deploy a cloud function on firebase but I keep getting this error. I deleted all of my logic to console the response and debug but nothing's changed.

I am sure that the problem is not related to permissions because the invocation is allowed for unauthenticated users.

this is the block of my function:

// Firebase config
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const cors = require("cors")({
  origin: true
});

admin.initializeApp();

exports.emailMessage = functions.https.onCall((req, res) => {
  return cors(req, res, async() => {
    console.log(req);
    console.log(res);
  }).catch(() => {
    res.status(500).send("error");
  });
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文