Firebase功能状态失败

时间:2019-10-06 12:54:46

标签: firebase firebase-cli firebase-tools

D:\work\ocr\receiptWeb\functions>functions list
┌────────┬────────┬─────────┬─────────────────────────────────────────────────────────────────┐    
│ Status │ Name   │ Trigger │ Resource                                                        │    
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤    
│ FAILED │ upload │ HTTP    │ http://localhost:8010/invoice-manager-251609/us-central1/upload │    
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤    
│ FAILED │ tst    │ HTTP    │ http://localhost:8010/invoice-manager-251609/us-central1/tst    │    
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤    
│ FAILED │ tst1   │ HTTP    │ http://localhost:8010/invoice-manager-251609/us-central1/tst1   │    
└────────┴────────┴─────────┴─────────────────────────────────────────────────────────────────┘    



D:\work\ocr\receiptWeb\functions>functions describe tst1
┌────────────┬───────────────────────────────────────────────────────────────────┐
│ Property   │ Value                                                             │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Name       │ tst1                                                              │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Trigger    │ HTTP                                                              │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Resource   │ http://localhost:8010/invoice-manager-251609/us-central1/tst1     │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Timeout    │ 60 seconds                                                        │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Local path │ D:\work\ocr\receiptWeb\functions                                  │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Archive    │ file://C:\Users\USER\AppData\Local\Temp\tmp-12096kv8vKcUEnCAt.zip │
└────────────┴───────────────────────────────────────────────────────────────────┘

当我进入网址时,我会得到

Function worker crashed with exit code: 1\nundefinedWarning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail[2019-10-06T12:57:02.376Z] @firebase/database: FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com

我做到了

set FIREBASE_CONFIG={"projectId":"invoice-manager-251609","appId":"1:127001043239:web:e3c996dc4dab60b7c94902","databaseURL":"https://invoice-manager-251609.firebaseio.com","storageBucket":"invoice-manager-251609.appspot.com","locationId":"europe-west","apiKey":"AIzaSyCaV3vpQaEMUPjz9CftkYdp888l7cLy8Gw","authDomain":"invoice-manager-251609.firebaseapp.com","messagingSenderId":"127001043239"}

并且网址正确 如何获得有关失败状态原因的更多信息?

1 个答案:

答案 0 :(得分:2)

当Cloud Function遇到错误时,通常会记录详细信息。您可以使用$ functions logs read查看本地仿真器的日志文件。