Ошибка CLI Firebase в шаге Google Cloud Build - PullRequest
1 голос
/ 17 февраля 2020

Когда я запускаю команду «firebase use» из CLI Firebase на шаге cloudbuild, я получаю следующую ошибку:

Starting Step #5 - "SetFirebaseEnvironment"
Step #5 - "SetFirebaseEnvironment": Already have image (with digest): eu.gcr.io/BUCKET_NAME/firebase:7.12-0
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.806Z] ----------------------------------------------------------------------
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.808Z] Command:       /usr/local/bin/node /usr/local/bin/firebase use dev --debug
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.808Z] CLI Version:   7.12.1
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.808Z] Platform:      linux
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.808Z] Node Version:  v13.6.0
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.813Z] Time:          Mon Feb 17 2020 13:09:50 GMT+0000 (Coordinated Universal Time)
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.813Z] ----------------------------------------------------------------------
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.813Z] 
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.820Z] > 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"]
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.820Z] > attempting to authenticate via app default credentials
Step #5 - "SetFirebaseEnvironment": [2020-02-17T13:09:50.854Z] TypeError: Cannot create property 'refresh_token' on string 'Not Found
Step #5 - "SetFirebaseEnvironment": '
Step #5 - "SetFirebaseEnvironment":     at /usr/local/lib/node_modules/firebase-tools/node_modules/google-auto-auth/node_modules/google-auth-library/lib/auth/oauth2client.js:208:28
Step #5 - "SetFirebaseEnvironment":     at /usr/local/lib/node_modules/firebase-tools/node_modules/google-auto-auth/node_modules/google-auth-library/lib/auth/computeclient.js:85:7
Step #5 - "SetFirebaseEnvironment":     at Request._callback (/usr/local/lib/node_modules/firebase-tools/node_modules/google-auto-auth/node_modules/google-auth-library/lib/transporters.js:106:7)
Step #5 - "SetFirebaseEnvironment":     at Request.self.callback (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
Step #5 - "SetFirebaseEnvironment":     at Request.emit (events.js:321:20)
Step #5 - "SetFirebaseEnvironment":     at Request.EventEmitter.emit (domain.js:485:12)
Step #5 - "SetFirebaseEnvironment":     at Request.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1154:10)
Step #5 - "SetFirebaseEnvironment":     at Request.emit (events.js:321:20)
Step #5 - "SetFirebaseEnvironment":     at Request.EventEmitter.emit (domain.js:485:12)
Step #5 - "SetFirebaseEnvironment":     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1076:12)
Step #5 - "SetFirebaseEnvironment":     at Object.onceWrapper (events.js:427:28)
Step #5 - "SetFirebaseEnvironment":     at IncomingMessage.emit (events.js:333:22)
Step #5 - "SetFirebaseEnvironment":     at IncomingMessage.EventEmitter.emit (domain.js:485:12)
Step #5 - "SetFirebaseEnvironment":     at endReadableNT (_stream_readable.js:1220:12)
Step #5 - "SetFirebaseEnvironment":     at processTicksAndRejections (internal/process/task_queues.js:84:21)
Step #5 - "SetFirebaseEnvironment": 
Step #5 - "SetFirebaseEnvironment": Error: An unexpected error has occurred.
Finished Step #5 - "SetFirebaseEnvironment"
2020/02/17 14:09:51 Step Step #5 - "SetFirebaseEnvironment" finished
2020/02/17 14:09:51 status changed to "ERROR"
ERROR
ERROR: build step 5 "eu.gcr.io/BUCKET_NAME/firebase:7.12-0" failed: exit status 2
2020/02/17 14:09:54 Build finished with ERROR status

Когда я запускаю ту же команду на локальном компьютере с точно такой же Версия CLI Firebase и версия узла Я не получаю эту ошибку. Почему я получаю эту ошибку и как ее решить?

1 Ответ

1 голос
/ 19 февраля 2020

Кажется, что теперь это исправлено (см. Комментарии к исходному вопросу со ссылками), но, как правило, для решения этой проблемы логик c состоит в том, чтобы попытаться восстановить изображение firebase docker, используемое на этапе создания облака.

...