-
Notifications
You must be signed in to change notification settings - Fork 976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to deploy functions, firebase config variables are not available #678
Comments
What is your repository structure? Is node_modules inside of firebase-web/functions? And what does your functions/package.json look like? |
This is happening to me, too. |
@davidmurdoch Can you answer my questions above? |
It was user error on my part. I did run |
I'm having a similar issue. I'm creating config variables with Of course my functions are not being deployed and I get the error |
@PierBover Can you file a separate issue with log outputs from running both the set and get commands with the --debug flag? |
@laurenzlong @PierBover was a separate issue opened for this? I'm getting it too, and looking for if the issue was opened |
I am having a similar issue. I have set the variables with |
@tomas-paronai You need to run this in the functions directory: See https://firebase.google.com/docs/functions/local-emulator |
@laurenzlong Thank you for pointing me to the right spot. It did the job. I had to miss this in docs. |
Hi there,
i'm a student that just starting using firebase cloud functions, currently i'm trying to deploy a function, but everytime i tried to run the function it failed to deploy! and the code doesn't seems wrong because the code could be deployed and works well in my friends PC. and yes, i've followed the suggested instructions from the console.
Version info
3.17.4
Platform Information
Linux
Steps to reproduce
just try to deploy it return error
Expected behavior
just running
Actual behavior
[2018-02-24T05:05:06.665Z] ----------------------------------------------------------------------
[2018-02-24T05:05:06.672Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy --only functions --debug
[2018-02-24T05:05:06.673Z] CLI Version: 3.17.4
[2018-02-24T05:05:06.673Z] Platform: linux
[2018-02-24T05:05:06.674Z] Node Version: v9.6.1
[2018-02-24T05:05:06.674Z] Time: Sat Feb 24 2018 12:05:06 GMT+0700 (WIB)
[2018-02-24T05:05:06.674Z] ----------------------------------------------------------------------
[2018-02-24T05:05:06.696Z] > 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-02-24T05:05:06.696Z] > authorizing via signed-in user
[2018-02-24T05:05:06.701Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/pasienia-2f867
Sat Feb 24 2018 12:05:06 GMT+0700 (WIB)
[2018-02-24T05:05:08.556Z] <<< HTTP RESPONSE 200 server=nginx, date=Sat, 24 Feb 2018 05:05:08 GMT, content-type=application/json; charset=utf-8, content-length=112, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-02-24T05:05:08.558Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/pasienia-2f867/tokens
Sat Feb 24 2018 12:05:08 GMT+0700 (WIB)
[2018-02-24T05:05:10.185Z] <<< HTTP RESPONSE 200 server=nginx, date=Sat, 24 Feb 2018 05:05:09 GMT, content-type=application/json; charset=utf-8, content-length=264, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
=== Deploying to 'pasienia-2f867'...
i deploying functions
[2018-02-24T05:05:11.692Z] > [functions] package.json contents: {
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"firebase-admin": "~5.4.2",
"firebase-functions": "^0.7.1"
},
"private": true
}
i functions: ensuring necessary APIs are enabled...
[2018-02-24T05:05:11.694Z] >>> HTTP REQUEST GET https://servicemanagement.googleapis.com/v1/services/cloudfunctions.googleapis.com/projectSettings/pasienia-2f867?view=CONSUMER_VIEW
Sat Feb 24 2018 12:05:11 GMT+0700 (WIB)
[2018-02-24T05:05:11.695Z] >>> HTTP REQUEST GET https://servicemanagement.googleapis.com/v1/services/runtimeconfig.googleapis.com/projectSettings/pasienia-2f867?view=CONSUMER_VIEW
Sat Feb 24 2018 12:05:11 GMT+0700 (WIB)
[2018-02-24T05:05:13.641Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:13 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
[2018-02-24T05:05:13.676Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:13 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
✔ functions: all necessary APIs are enabled
[2018-02-24T05:05:13.678Z] >>> HTTP REQUEST GET https://appengine.googleapis.com/v1/apps/pasienia-2f867
Sat Feb 24 2018 12:05:13 GMT+0700 (WIB)
[2018-02-24T05:05:13.679Z] >>> HTTP REQUEST GET https://apikeys.googleapis.com/v1/projects/pasienia-2f867/apiKeys
Sat Feb 24 2018 12:05:13 GMT+0700 (WIB)
[2018-02-24T05:05:15.527Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:15 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
[2018-02-24T05:05:15.533Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:15 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
i functions: preparing functions directory for uploading...
[2018-02-24T05:05:15.535Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/pasienia-2f867/configs
Sat Feb 24 2018 12:05:15 GMT+0700 (WIB)
[2018-02-24T05:05:16.550Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:15 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
[2018-02-24T05:05:16.554Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/pasienia-2f867/configs/someservice/variables
Sat Feb 24 2018 12:05:16 GMT+0700 (WIB)
[2018-02-24T05:05:17.130Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:16 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
[2018-02-24T05:05:17.133Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/pasienia-2f867/configs/someservice/variables/id
Sat Feb 24 2018 12:05:17 GMT+0700 (WIB)
[2018-02-24T05:05:17.135Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/pasienia-2f867/configs/someservice/variables/key
Sat Feb 24 2018 12:05:17 GMT+0700 (WIB)
[2018-02-24T05:05:17.759Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:17 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
[2018-02-24T05:05:17.763Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Sat, 24 Feb 2018 05:05:17 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=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35", accept-ranges=none, connection=close
Error: Error occurred while parsing your function triggers. Please ensure you have the latest firebase-functions SDK by running "npm i --save firebase-functions@latest" inside your functions folder.
Error: Firebase config variables are not available. Please use the latest version of the Firebase CLI to deploy this function.
at init (/home/muhwyndham/Documents/AndroidProjects/Pasienia/firebase-web/functions/node_modules/firebase-functions/lib/config.js:51:15)
at Object.config (/home/muhwyndham/Documents/AndroidProjects/Pasienia/firebase-web/functions/node_modules/firebase-functions/lib/config.js:29:9)
at Object. (/home/muhwyndham/Documents/AndroidProjects/Pasienia/firebase-web/functions/index.js:3:31)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
The text was updated successfully, but these errors were encountered: