Firebase 功能状态失败

Firebase function status failed

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 │
└────────────┴───────────────────────────────────────────────────────────────────┘

当我去 url 我得到

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"}

并且 url 是正确的 我如何才能获得有关 FAILED 状态原因的更多信息?

当 Cloud Functions 遇到错误时,它通常会记录详细信息。 $ functions logs read.

可以查看本地模拟器的日志文件