firebase - 从 Create React App 部署时,如何解决来自 Firebase 托管的 410 错误响应?
问题描述
在我进行“纱线构建”之后,我运行“纱线部署”脚本。我已经成功地这样做了几个星期,但今天失败并出现 410 错误。请参阅下面的控制台列表。
yarn run v1.9.4
$ firebase deploy
=== Deploying to 'acestrader-4be71'...
i deploying database, hosting
i database: checking rules syntax...
+ database: rules syntax for database acestrader-4be71 is valid
i hosting: preparing build directory for upload...
Error: HTTP Error: 410, Unknown Error
error Command failed with exit code 1.
我需要做什么来解决这个问题?
- 更新 -
我运行了“firebase deploy --debug”,但在 C: 中找不到任何错误日志文件,但从控制台日志中得到了这个输出。我没有看到任何有用的东西。
C:\Users\Bruce\Dropbox\Projects\AcesTrader>yarn deploydebug
yarn run v1.9.4
$ firebase deploy --debug
[2018-11-02T11:21:41.205Z] ----------------------------------------------------------------------
[2018-11-02T11:21:41.210Z] Command: C:\Program Files\nodejs\node.exe C:\Users\Bruce\AppData\Local\Yarn\Data\global\node_modules\firebase-tools\bin\firebase deploy --debug
[2018-11-02T11:21:41.210Z] CLI Version: 4.0.3
[2018-11-02T11:21:41.210Z] Platform: win32
[2018-11-02T11:21:41.210Z] Node Version: v8.11.3
[2018-11-02T11:21:41.214Z] Time: Fri Nov 02 2018 07:21:41 GMT-0400 (Eastern Daylight Time)
[2018-11-02T11:21:41.214Z] ----------------------------------------------------------------------
[2018-11-02T11:21:41.231Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2018-11-02T11:21:41.236Z] > authorizing via signed-in user
[2018-11-02T11:21:41.241Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/acestrader-4be71
Fri Nov 02 2018 07:21:41 GMT-0400 (Eastern Daylight Time)
[2018-11-02T11:21:41.579Z] <<< HTTP RESPONSE 200 server=nginx, date=Fri, 02 Nov 2018 11:21:41 GMT, content-type=application/json; charset=utf-8, content-length=117, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-11-02T11:21:41.582Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/acestrader-4be71/tokens
Fri Nov 02 2018 07:21:41 GMT-0400 (Eastern Daylight Time)
[2018-11-02T11:21:41.843Z] <<< HTTP RESPONSE 200 server=nginx, date=Fri, 02 Nov 2018 11:21:41 GMT, content-type=application/json; charset=utf-8, content-length=266, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
=== Deploying to 'acestrader-4be71'...
i deploying database, hosting
i database: checking rules syntax...
[2018-11-02T11:21:42.877Z] >>> HTTP REQUEST PUT https://acestrader-4be71.firebaseio.com/.settings/rules.json?dryRun=true
{
/* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
"rules": {
".read": true,
".write": true
}
}
Fri Nov 02 2018 07:21:42 GMT-0400 (Eastern Daylight Time)
[2018-11-02T11:21:43.122Z] <<< HTTP RESPONSE 200 server=nginx, date=Fri, 02 Nov 2018 11:21:42 GMT, content-type=application/json; charset=utf-8, content-length=15, connection=close, access-control-allow-origin=*, cache-control=no-cache, strict-transport-security=max-age=31556926; includeSubDomains; preload
+ database: rules syntax for database acestrader-4be71 is valid
i hosting: preparing build directory for upload...
[2018-11-02T11:21:43.828Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/acestrader-4be71/uploads/-LQJ93kKcUDGkTSR32tU?fileCount=27&message=
Fri Nov 02 2018 07:21:43 GMT-0400 (Eastern Daylight Time)
[2018-11-02T11:21:47.207Z] <<< HTTP RESPONSE 410 server=nginx, date=Fri, 02 Nov 2018 11:21:46 GMT, content-type=application/json; charset=utf-8, content-length=240, connection=close, access-control-allow-origin=*, access-control-allow-methods=GET, PUT, POST, DELETE, OPTIONS, strict-transport-security=max-age=31556926; includeSubDomains; preload
[2018-11-02T11:21:47.209Z] <<< HTTP RESPONSE BODY undefined
Error: HTTP Error: 410, Unknown Error
[2018-11-02T11:21:47.320Z] Error Context: {
"body": {
"error": {
"message": "Unknown Error"
}
},
"response": {
"statusCode": 410,
"headers": {
"server": "nginx",
"date": "Fri, 02 Nov 2018 11:21:46 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "240",
"connection": "close",
"access-control-allow-origin": "*",
"access-control-allow-methods": "GET, PUT, POST, DELETE, OPTIONS",
"strict-transport-security": "max-age=31556926; includeSubDomains; preload"
},
"request": {
"uri": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "deploy.firebase.com",
"port": 443,
"hostname": "deploy.firebase.com",
"hash": null,
"search": "?fileCount=27&message=",
"query": "fileCount=27&message=",
"pathname": "/v1/hosting/acestrader-4be71/uploads/-LQJ93kKcUDGkTSR32tU",
"path": "/v1/hosting/acestrader-4be71/uploads/-LQJ93kKcUDGkTSR32tU?fileCount=27&message=",
"href": "https://deploy.firebase.com/v1/hosting/acestrader-4be71/uploads/-LQJ93kKcUDGkTSR32tU?fileCount=27&message=" },
"method": "PUT"
}
}
}
Having trouble? Try firebase deploy --help
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决方案
推荐阅读
- r - 如何从 Rcpp 调用 R 函数(不应导出)?
- tcl - 如何对列表进行排序,如果列表元素重复,则在 tcl 中添加与该元素关联的值
- pandas - pandas 获得 np.where 的一列或另一列替代
- flutter - 导航不去指定的路线
- automated-tests - 使用邮递员在多个循环中设置环境变量
- regex - 在 Notepad++ 中,如何识别特定行并替换包含正则表达式字符的内容
- github - 如何打开从 GitHub 下载的这个软件?
- ios - 如何获取wilon登录用户单位列表
- c++ - 没有得到预期的输出...代码意外终止(hackerrank 堆栈问题)
- java - 如何使用 Retrofit 在 android 应用程序中获取嵌套的 JSON 响应?