firebase serve Getting "⚠ functions: Cannot set property config of #<Object> which has only a getter ⚠ Your function was killed because it raised an unhandled error."

922 views
Skip to first unread message

Sreedar Raju

unread,
May 30, 2020, 12:50:19 AM5/30/20
to Firebase Google Group
Hi Experts,
I am getting the following error when I try to run firebase serve. I think it started happening after I ran npm -i firebase-functions@latest. Can somebody please shine their light of experience? I am really getting pushed and frustrated with this - 
The same code is working when deployed to test site, but locally I get the error. Help!!

csa-pool-10-246-5-195:scripts sreraju$ firebase serve


=== Serving from '/Users/sreraju/firebase'...


  Your requested "node" version "8" doesn't match your global version "12"

  functions: functions emulator started at http://localhost:5001

i  functions: Watching "/Users/sreraju/firebase/functions" for Cloud Functions...

i  hosting: Serving hosting files from: public

  hosting: Local server: http://localhost:5000

  functions: Cannot set property config of #<Object> which has only a getter

  Your function was killed because it raised an unhandled error.

Sam Stern

unread,
May 30, 2020, 8:15:31 AM5/30/20
to fireba...@googlegroups.com
Hi Sreedar,

This was a bug in version 8.4.0 of the Firebase CLI.  Upgrade to 8.4.1 to get the fix. 

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/22453653-42af-4b23-b8a1-f1905981310d%40googlegroups.com.

Sohel Sarder

unread,
May 30, 2020, 10:44:24 AM5/30/20
to Firebase Google Group
Hi @Raju,

As the error suggested it is issues with node version. You may try by upgrading your node version.


Thanks,
Sohel

Sreedar Raju

unread,
May 30, 2020, 10:44:30 AM5/30/20
to fireba...@googlegroups.com
Here is the debug log:


[debug] [2020-05-30T05:11:10.943Z] ----------------------------------------------------------------------
[debug] [2020-05-30T05:11:10.945Z] Command:       /usr/local/bin/firebase /Users/sreraju/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/bin/firebase serve
[debug] [2020-05-30T05:11:10.945Z] CLI Version:   8.1.1
[debug] [2020-05-30T05:11:10.945Z] Platform:      darwin
[debug] [2020-05-30T05:11:10.945Z] Node Version:  v12.16.1
[debug] [2020-05-30T05:11:10.949Z] Time:          Fri May 29 2020 22:11:10 GMT-0700 (Pacific Daylight Time)
[debug] [2020-05-30T05:11:10.949Z] ----------------------------------------------------------------------
[debug] [2020-05-30T05:11:10.949Z]
[debug] [2020-05-30T05:11:10.958Z] > 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"]
[debug] [2020-05-30T05:11:10.959Z] > authorizing via signed-in user
[debug] [2020-05-30T05:11:10.959Z] [iam] checking project slr67-qa for permissions ["firebase.projects.get"]
[debug] [2020-05-30T05:11:10.962Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2020-05-30T05:11:10.962Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token  
 <request body omitted>
[debug] [2020-05-30T05:11:11.287Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Sat, 30 May 2020 05:11:11 GMT","server":"scaffolding on HTTPServer2","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-05-30T05:11:11.301Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/slr67-qa:testIamPermissions  
 {"permissions":["firebase.projects.get"]}
[debug] [2020-05-30T05:11:11.602Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Sat, 30 May 2020 05:11:11 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=91","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-05-30T05:11:11.603Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/slr67-qa  
 
[debug] [2020-05-30T05:11:12.005Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Sat, 30 May 2020 05:11:12 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[info]
[info] === Serving from '/Users/sreraju/firebase'...
[info]
[debug] [2020-05-30T05:11:12.009Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/slr67-qa/webApps/-/config  
 
[warn] ⚠  Your requested "node" version "8" doesn't match your global version "12"
[info] ✔  functions: functions emulator started at http://localhost:5001
[debug] [2020-05-30T05:11:12.652Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Sat, 30 May 2020 05:11:12 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[info] i  functions: Watching "/Users/sreraju/firebase/functions" for Cloud Functions...
[debug] [2020-05-30T05:11:12.700Z] [worker-pool] addWorker(~diagnostic~)
[debug] [2020-05-30T05:11:12.700Z] [worker-pool] Adding worker with key ~diagnostic~, total=1
[debug] [2020-05-30T05:11:12.701Z] [worker-pool] submitWork(triggerId=)
[debug] [2020-05-30T05:11:12.701Z] [worker-~diagnostic~-02d02823-6b93-484d-89d4-4407b2c1dcf4]: Assigning socketPath: /var/folders/yn/k7cbpg416dv7_56d0g2sxdw80000gn/T/fire_emu_20857.sock
[debug] [2020-05-30T05:11:12.701Z] [worker-~diagnostic~-02d02823-6b93-484d-89d4-4407b2c1dcf4]: BUSY
[info] i  hosting: Serving hosting files from: public
[info] ✔  hosting: Local server: http://localhost:5000
[debug] [2020-05-30T05:11:13.019Z] [runtime-status] [20857] Functions runtime initialized. {"cwd":"/Users/sreraju/firebase/functions","node_version":"12.16.1"}
[debug] [2020-05-30T05:11:13.021Z] [runtime-status] [20857] Disabled runtime features: undefined
[debug] [2020-05-30T05:11:13.033Z] [runtime-status] [20857] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.12.1","resolution":"/Users/sreraju/firebase/functions/node_modules/firebase-admin/lib/index.js"}
[debug] [2020-05-30T05:11:13.038Z] [runtime-status] [20857] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.6.2","resolution":"/Users/sreraju/firebase/functions/node_modules/firebase-functions/lib/index.js"}
[debug] [2020-05-30T05:11:13.040Z] [runtime-status] [20857] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}]
[debug] [2020-05-30T05:11:13.195Z] [runtime-status] [20857] Checked functions.config() {"config":{}}
[debug] [2020-05-30T05:11:13.196Z] [runtime-status] [20857] Error in handleMessage: {"frb":{"cwd":"/Users/sreraju/firebase/functions","projectId":"slr67-qa","triggerId":"","emulators":{},"socketPath":"/var/folders/yn/k7cbpg416dv7_56d0g2sxdw80000gn/T/fire_emu_20857.sock"},"opts":{"nodeBinary":"/usr/local/bin/firebase"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter
    at /Users/sreraju/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/sreraju/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[warn] ⚠  functions: Cannot set property config of #<Object> which has only a getter
[warn] ⚠  Your function was killed because it raised an unhandled error.
[debug] [2020-05-30T05:11:13.204Z] [worker-~diagnostic~-02d02823-6b93-484d-89d4-4407b2c1dcf4]: exited
[debug] [2020-05-30T05:11:13.204Z] [worker-~diagnostic~-02d02823-6b93-484d-89d4-4407b2c1dcf4]: FINISHED
csa-pool-10-246-5-195:firebase sreraju$  
csa-pool-10-246-5-195:firebase sreraju$
csa-pool-10-246-5-195:firebase sreraju$ 

--

Michael Bleigh

unread,
May 30, 2020, 11:32:55 AM5/30/20
to Firebase Google Group
As mentioned by Sam, you are on version 8.1.1 and this bug was fixed in 8.4.1. please upgrade your CLI

Sreedar Raju

unread,
May 30, 2020, 7:02:50 PM5/30/20
to fireba...@googlegroups.com
That Solved it!! thank you guys!!

On Sat, May 30, 2020 at 12:56 PM Sreedar Raju <sre...@gmail.com> wrote:
Thank you all for your replies. Appreciate it!
-Sreedar

Reply all
Reply to author
Forward
0 new messages