gpt4 book ai didi

firebase - 部署在出现 404 错误时停止

转载 作者:行者123 更新时间:2023-12-04 01:59:33 26 4
gpt4 key购买 nike

我很难弄清楚为什么每当我尝试部署时 Firebase-CLI 都会输出此错误:

[debug] [2018-01-16T17:05:03.558Z] >>> HTTP REQUEST PUT https://firebaserules.googleapis.com/v1/projects/liberaakademio/releases/firebase.storage/liberaakademio.appspot.com { name: 'projects/liberaakademio/releases/firebase.storage/liberaakademio.appspot.com',
rulesetName: 'projects/liberaakademio/rulesets/a082eaed-1fac-4661-a7ed-156e18e776e1' }
Tue Jan 16 2018 15:05:03 GMT-0200 (-02)
[debug] [2018-01-16T17:05:04.784Z] <<< HTTP RESPONSE 404
[debug] [2018-01-16T17:05:04.784Z] <<< HTTP RESPONSE BODY <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/v1/projects/liberaakademio/releases/firebase.storage/liberaakademio.appspot.com</code> was not found on this server. <ins>That’s all we know.</ins>

[debug] [2018-01-16T17:05:04.786Z] TypeError: Cannot create property 'error' on string '<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/v1/projects/liberaakademio/releases/firebase.storage/liberaakademio.appspot.com</code> was not found on this server. <ins>That’s all we know.</ins>
'
at module.exports (/usr/local/lib/node_modules/firebase-tools/lib/responseToError.js:11:16)
at Request._callback (/usr/local/lib/node_modules/firebase-tools/lib/api.js:43:25)
at Request.self.callback (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:186:22)
at Request.emit (events.js:160:13)
at Request.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1163:10)
at Request.emit (events.js:160:13)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:255:19)
at IncomingMessage.emit (events.js:165:20)
at endReadableNT (_stream_readable.js:1101:12)
[error]
[error] Error: An unexpected error has occurred.

我已经通过在平台上测试验证了我的规则文档,并且它们发布得很好。

我怀疑问题与我的 firebase.json 文件有关,目前看起来是这样的:

{
"firestore": {
"rules": "firebaseRules/firestore.rules",
"indexes": "firebaseRules/indexes.rules"
},
"storage": {
"rules": "firebaseRules/storage.rules"
},
"hosting": {
"public": "build",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [ {
"source" : "**",
"headers" : [ {
"key" : "Access-Control-Allow-Origin",
"value" : "https://api.liberaakademio.com"
} ]
} ]
}
}

最佳答案

问题解决了。

我不是 100% 确定,但我相信将 firebase-tools 更新到最新版本并运行 firebase login --reauth 修复了错误。

关于firebase - 部署在出现 404 错误时停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48286551/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com