Firebase-functions: functions: Failed to emulate api

Created on 8 May 2018  路  1Comment  路  Source: firebase/firebase-functions

Version info

firebase-functions: 1.0.2

firebase-tools: 3.18.4

firebase-admin: 5.12.0

firebase: 4.13.1

google-cloud: 0.57.0

Test case

Steps to reproduce

$ firebase serve --only functions --port 5000 --debug

Were you able to successfully deploy your functions?

Expected behavior

Actual behavior


functions: Failed to emulate api

[2018-05-08T01:45:24.798Z] ----------------------------------------------------------------------
[2018-05-08T01:45:24.804Z] Command:       /Users/shyamchen/.nvm/versions/node/v6.14.2/bin/node /Users/shyamchen/Desktop/Vue-Fullstack-Starter/node_modules/.bin/firebase serve --only functions --port 5000 --debug
[2018-05-08T01:45:24.805Z] CLI Version:   3.18.4
[2018-05-08T01:45:24.805Z] Platform:      darwin
[2018-05-08T01:45:24.805Z] Node Version:  v6.14.2
[2018-05-08T01:45:24.806Z] Time:          Tue May 08 2018 09:45:24 GMT+0800 (CST)
[2018-05-08T01:45:24.806Z] ----------------------------------------------------------------------

[2018-05-08T01:45:24.829Z] > 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-05-08T01:45:24.830Z] > authorizing via signed-in user
[2018-05-08T01:45:24.833Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/vue-by-example-dev

 Tue May 08 2018 09:45:24 GMT+0800 (CST)
[2018-05-08T01:45:25.633Z] <<< HTTP RESPONSE 200 server=nginx, date=Tue, 08 May 2018 01:45:25 GMT, content-type=application/json; charset=utf-8, content-length=131, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-05-08T01:45:25.634Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/vue-by-example-dev/tokens

 Tue May 08 2018 09:45:25 GMT+0800 (CST)
[2018-05-08T01:45:26.327Z] <<< HTTP RESPONSE 200 server=nginx, date=Tue, 08 May 2018 01:45:26 GMT, content-type=application/json; charset=utf-8, content-length=268, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-05-08T01:45:26.329Z] >>> HTTP REQUEST GET https://cloudresourcemanager.googleapis.com/v1/projects/vue-by-example-dev

 Tue May 08 2018 09:45:26 GMT+0800 (CST)
[2018-05-08T01:45:27.262Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Tue, 08 May 2018 01:45:27 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=hq=":443"; ma=2592000; quic=51303433; quic=51303432; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="43,42,41,39,35", accept-ranges=none, connection=close

=== Serving from '/Users/shyamchen/Desktop/Vue-Fullstack-Starter'...

i  functions: Preparing to emulate functions.
[2018-05-08T01:45:28.141Z] Fetching environment
[2018-05-08T01:45:28.142Z] >>> HTTP REQUEST GET https://mobilesdk-pa.googleapis.com/v1/projects/1097057218485:getServerAppConfig

 Tue May 08 2018 09:45:28 GMT+0800 (CST)
[2018-05-08T01:45:28.832Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Tue, 08 May 2018 01:45:28 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=hq=":443"; ma=2592000; quic=51303433; quic=51303432; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="43,42,41,39,35", accept-ranges=none, connection=close
[2018-05-08T01:45:28.833Z] Starting @google-cloud/functions-emulator
[2018-05-08T01:45:28.890Z] Parsing function triggers
[2018-05-08T01:45:29.651Z] Error while deploying to emulator: Error
Error
    at RequestError.Error (native)
    at new RequestError (/Users/shyamchen/Desktop/Vue-Fullstack-Starter/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:34:42)
    at Request._callback (/Users/shyamchen/Desktop/Vue-Fullstack-Starter/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:96:27)
    at Request.self.callback (/Users/shyamchen/Desktop/Vue-Fullstack-Starter/node_modules/googleapis/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/Users/shyamchen/Desktop/Vue-Fullstack-Starter/node_modules/googleapis/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/Users/shyamchen/Desktop/Vue-Fullstack-Starter/node_modules/googleapis/node_modules/request/request.js:1091:12)

>All comments

Restart the computer to work for me.

Was this page helpful?
0 / 5 - 0 ratings