Firebase-tools: Die Eigenschaftskonfiguration von # kann nicht festgelegt werden<object>das hat nur einen Getter</object>

Erstellt am 28. Mai 2020  ·  35Kommentare  ·  Quelle: firebase/firebase-tools

[ERFORDERLICH] Umgebungsinformationen

Firebase-Tools: 8.4.0

Plattform: Windows

[ERFORDERLICH] Testfall

index.js

const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();

exports.testFunction = functions.https.onRequest(async (req, res) => {

  console.log(req.body);

});

[ERFORDERLICH] Schritte zum Reproduzieren

Das anfängliche Emulieren hat gut funktioniert
Die ersten und nachfolgenden Bereitstellungen funktionieren einwandfrei
Die Funktion funktioniert gut in der Produktion
kann nicht mehr lokal emulieren.

Konsolenausgabe:

i  emulators: Starting emulators: functions
+  functions: Using node<strong i="23">@10</strong> from host.
i  functions: Watching "D:\path\to\functions" for Cloud Functions...
!  functions: Cannot set property config of #<Object> which has only a getter
!  Your function was killed because it raised an unhandled error.

Zusätzlich zu diesem Problem ist aus der Ausgabe nicht ersichtlich, was passiert ist. Nichts in Debug-Protokollen.

[ERFORDERLICH] Erwartetes Verhalten


Emulator startet

[ERFORDERLICH] Tatsächliches Verhalten


Der Emulator kann nicht gestartet werden

emulator-suite functions bug

Hilfreichster Kommentar

Das Update wurde gerade in der Version 8.4.1 von firebase-tools

Alle 35 Kommentare

@ boddy33 huh ok das ist extrem seltsam. Gibt es sonst absolut nichts firebase-debug.log ? Oder wenn Sie den Befehl mit --debug ausführen?

Sieht aus wie es ein Fehler in der Emulator-Laufzeit ist.

[debug] [2020-05-28T19:48:29.510Z] ----------------------------------------------------------------------
[debug] [2020-05-28T19:48:29.511Z] Command:       /path/to/node-v12.16.3-darwin-x64/bin/node /path/to/node/bin/firebase functions:shell
[debug] [2020-05-28T19:48:29.511Z] CLI Version:   8.4.0
[debug] [2020-05-28T19:48:29.512Z] Platform:      darwin
[debug] [2020-05-28T19:48:29.512Z] Node Version:  v12.16.3
[debug] [2020-05-28T19:48:29.512Z] Time:          Thu May 28 2020 20:48:29 GMT+0100 (British Summer Time)
[debug] [2020-05-28T19:48:29.512Z] ----------------------------------------------------------------------
[debug] [2020-05-28T19:48:29.512Z] 
[debug] [2020-05-28T19:48:29.518Z] > 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-28T19:48:29.519Z] > authorizing via signed-in user
[debug] [2020-05-28T19:48:29.519Z] [iam] checking project firebase-project for permissions ["firebase.projects.get"]
[debug] [2020-05-28T19:48:29.521Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project:testIamPermissions  
 {"permissions":["firebase.projects.get"]}
[debug] [2020-05-28T19:48:30.208Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Thu, 28 May 2020 19:48:30 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=563","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"}
[warn] ⚠  Your requested "node" version "10" doesn't match your global version "12" {"metadata":{"emulator":{"name":"functions"},"message":"Your requested \"node\" version \"10\" doesn't match your global version \"12\""}}
[debug] [2020-05-28T19:48:30.226Z] [functions] Watching "/path/to/app" for Cloud Functions...
[debug] [2020-05-28T19:48:30.233Z] DEBUG: [worker-pool] addWorker(~diagnostic~)
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=1
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-pool] submitWork(triggerId=)
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: Assigning socketPath: /var/folders/5v/7080hjcx6vb_d52z1clvxqd80000gn/T/fire_emu_24604.sock
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: BUSY
[debug] [2020-05-28T19:48:30.430Z] DEBUG: [runtime-status] [24604] Functions runtime initialized. {"cwd":"/path/to/app","node_version":"12.16.3"}
[debug] [2020-05-28T19:48:30.431Z] DEBUG: [runtime-status] [24604] Disabled runtime features: undefined
[debug] [2020-05-28T19:48:30.434Z] DEBUG: [runtime-status] [24604] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.12.1","resolution":"/path/to/app/node_modules/firebase-admin/lib/index.js"}
[debug] [2020-05-28T19:48:30.440Z] DEBUG: [runtime-status] [24604] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.6.2","resolution":"/path/to/app/node_modules/firebase-functions/lib/index.js"}
[debug] [2020-05-28T19:48:30.441Z] DEBUG: [runtime-status] [24604] 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-28T19:48:30.499Z] DEBUG: [runtime-status] [24604] Checked functions.config() {"config":{}}
[debug] [2020-05-28T19:48:30.499Z] DEBUG: [runtime-status] [24604] Error in handleMessage: {"frb":{"cwd":"/path/to/app","projectId":"firebase-project","triggerId":"","emulators":{},"socketPath":"/var/folders/5v/7080hjcx6vb_d52z1clvxqd80000gn/T/fire_emu_24604.sock"},"opts":{"nodeBinary":"/path/to/node-v12.16.3-darwin-x64/bin/node"}} => 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 /path/to/node-v12.16.3-darwin-x64/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (/path/to/node-v12.16.3-darwin-x64/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 {"metadata":{"emulator":{"name":"functions"},"message":"Cannot set property config of #<Object> which has only a getter"}}
[warn] ⚠  Your function was killed because it raised an unhandled error. {"metadata":{"emulator":{"name":"functions"},"message":"Your function was killed because it raised an unhandled error."}}
[debug] [2020-05-28T19:48:30.504Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: exited
[debug] [2020-05-28T19:48:30.504Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: FINISHED

Es sieht so aus, als ob dies ein Problem mit v8.xx ist. Ein Downgrade auf v7.16.2 funktioniert.

Ich habe das Gefühl, dass dies mit der heutigen Veröffentlichung der Firebase-Funktionen zusammenhängt:
https://github.com/firebase/firebase-functions/releases/tag/v3.6.2

Ich sollte etwas sehr Neues sein. Bei anderen Problemen funktionierte der Emulator v8.xx irgendwann (und v8.4.0 wurde vor einer Woche veröffentlicht).

Hallo,
habe das gleiche Problem :)

danke @ uditha-atukorala es funktioniert :)

Wenn Sie dann das Paket [email protected] installieren
HTTP-Anfragen funktionieren bei mir

Fix kommt in # 2302 ... wenn es genehmigt und zusammengeführt wird, werden wir versuchen, so schnell wie möglich zu veröffentlichen

Genau das gleiche Problem. Mac OS

das hat mich in den letzten Stunden verblüfft. Ich habe das gleiche index.js wie @ boddy33 und es passiert sogar, wenn index.js leer ist. Hier ist mein firebase-debug.log:

[debug] [2020-05-28T19:54:42.206Z] [runtime-status] [27226] Checked functions.config() {"config":{}} 
[debug] [2020-05-28T19:54:42.206Z] [runtime-status] [27226] Error in handleMessage: {"frb":{"cwd":"/Users/aprilpolubiec/Documents/my-project/functions","projectId":"my-project","triggerId":"","emulators":{},"socketPath":"/var/folders/sh/fsnv9b8n29713r9d3kj_7w4c0000gn/T/fire_emu_27226.sock"},"opts":{"nodeBinary":"/Users/aprilpolubiec/.nvm/versions/node/v13.7.0/bin/node"}} => 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/aprilpolubiec/.nvm/versions/node/v13.7.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:457:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/aprilpolubiec/.nvm/versions/node/v13.7.0/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.

Wir warten neugierig auf die Genehmigung

Das Update wurde gerade in der Version 8.4.1 von firebase-tools

Danke dafür ... gerade noch rechtzeitig

bestätigt. Vielen Dank.

Hallo
Vor ungefähr 2 Tagen habe ich Funktionen bereitgestellt und alles verlief ohne Probleme. Leider kann ich seit gestern keine Bereitstellung mehr durchführen. Ich hatte ziemlich alte Pakete:

    "firebase": "^5.9.2",
    "firebase-admin": "~8.9.0",
    "firebase-functions": "^3.3.0",
    "firebase-tools": "^4.0.0",

und ich bekam folgendes:
image

konnte aber Funktionen lokal ausführen (--serve).

Heute habe ich alle Abhängigkeiten auf neuere Versionen aktualisiert, die theoretisch einen Hotfix enthalten sollten, aber jetzt bekomme ich leider einen neuen Fehler, genau wie in dieser Ausgabe.

    "firebase": "^7.14.5",
    "firebase-admin": "~8.10.0",
    "firebase-functions": "^3.6.2",
    "firebase-tools": "^8.4.1",
[2020-05-29T09:30:46.002Z] [runtime-status] [42525] Error in handleMessage: {"frb":{"cwd":"/Users/jakub.jodelka/xxxProject/backend","projectId":"xxxProject","triggerId":"","emulators":{},"socketPath":"/var/folders/nj/4g6vwdm90bl4tmktf8hpn__00000gp/T/fire_emu_42525.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/jakub.jodelka/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/jakub.jodelka/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) 
⚠  functions: Cannot set property config of #<Object> which has only a getter
⚠  Your function was killed because it raised an unhandled error.

Ich kann keine Funktionen bereitstellen, kann sie jedoch aufgrund des gleichen Problems nicht einmal lokal ausführen.

Das Update wurde gerade in der Version 8.4.1 von firebase-tools

Sollten meine Funktionen korrekt bereitgestellt werden, wenn ich die neuesten Versionen habe?

@samtstern ^
Ich bin mir nicht sicher, ob dieses Problem geschlossen werden soll.

@jakubjodelka Kannst du versuchen, deinen Ordner node_modules löschen und npm install erneut auszuführen ? Wenn dies danach für Sie weiterhin geschieht und firebase --version 8.4.1 anzeigt, lassen Sie es mich wissen.

Vielen Dank. Ich arbeite jetzt für mich.

[2020-05-29T14:38:16.042Z] > 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"]
[2020-05-29T14:38:16.043Z] > authorizing via signed-in user
[2020-05-29T14:38:16.044Z] [iam] checking project bryn-todoapp-27e80 for permissions ["firebase.projects.get"]
[2020-05-29T14:38:16.047Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/bryn-todoapp-27e80:testIamPermissions
 {"permissions":["firebase.projects.get"]}
[2020-05-29T14:38:16.314Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Fri, 29 May 2020 14:38:16 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=117","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"}
[2020-05-29T14:38:16.316Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/bryn-todoapp-27e80  

[2020-05-29T14:38:16.590Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Fri, 29 May 2020 14:38:16 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"}

=== Serving from 'C:\Users\Bryn\Desktop\bryn-todoapp'...

+  functions: Using node<strong i="5">@10</strong> from host. {"metadata":{"emulator":{"name":"functions"},"message":"Using node<strong i="6">@10</strong> from host."}}
i  functions: Watching "C:\Users\Bryn\Desktop\bryn-todoapp\functions" for Cloud Functions... {"metadata":{"emulator":{"name":"functions"},"message":"Watching \"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\" for Cloud Functions..."}}
[2020-05-29T14:38:18.632Z] [worker-pool] addWorker(~diagnostic~) {"metadata":{"emulator":{"name":"functions"},"message":"[worker-pool] addWorker(~diagnostic~)"}}
[2020-05-29T14:38:18.638Z] [worker-pool] Adding worker with key ~diagnostic~, total=1 {"metadata":{"emulator":{"name":"functions"},"message":"[worker-pool] Adding worker with key ~diagnostic~, total=1"}}     
[2020-05-29T14:38:18.638Z] [worker-pool] submitWork(triggerId=) {"metadata":{"emulator":{"name":"functions"},"message":"[worker-pool] submitWork(triggerId=)"}}
[2020-05-29T14:38:18.639Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: Assigning socketPath: \\?\pipe\C:\Users\Bryn\Desktop\bryn-todoapp\functions\14372 {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: Assigning socketPath: \\\\?\\pipe\\C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\14372"}}
[2020-05-29T14:38:18.640Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: BUSY {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: 
BUSY"}}
[2020-05-29T14:38:18.955Z] [runtime-status] [14372] Functions runtime initialized. {"cwd":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions","node_version":"10.10.0"} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Functions runtime initialized. {\"cwd\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\",\"node_version\":\"10.10.0\"}"}}
[2020-05-29T14:38:18.957Z] [runtime-status] [14372] Disabled runtime features: undefined {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Disabled runtime features: undefined"}}
[2020-05-29T14:38:18.960Z] [runtime-status] [14372] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.12.1","resolution":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\node_modules\\firebase-admin\\lib\\index.js"} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Resolved module firebase-admin {\"declared\":true,\"installed\":true,\"version\":\"8.12.1\",\"resolution\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\\\\node_modules\\\\firebase-admin\\\\lib\\\\index.js\"}"}}
[2020-05-29T14:38:18.961Z] [runtime-status] [14372] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.6.2","resolution":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\node_modules\\firebase-functions\\lib\\index.js"} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Resolved module firebase-functions {\"declared\":true,\"installed\":true,\"version\":\"3.6.2\",\"resolution\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\\\\node_modules\\\\firebase-functions\\\\lib\\\\index.js\"}"}}
!  functions: Your GOOGLE_APPLICATION_CREDENTIALS environment variable points to /home/user/Downloads/[bryn-todoapp-27e80-firebase-adminsdk-gp1c1-8bc2ce2561].json. Non-emulated services will access production using these credentials. Be careful! {"metadata":{"emulator":{"name":"functions"},"message":"Your GOOGLE_APPLICATION_CREDENTIALS environment variable points to /home/user/Downloads/[bryn-todoapp-27e80-firebase-adminsdk-gp1c1-8bc2ce2561].json. Non-emulated services will access production using these credentials. Be careful!"}}
[2020-05-29T14:38:18.974Z] [runtime-status] [14372] 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"}] {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] 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\"}]"}}
[2020-05-29T14:38:19.003Z] [runtime-status] [14372] Checked functions.config() {"config":{}} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Checked functions.config() {\"config\":{}}"}}
[2020-05-29T14:38:19.009Z] [runtime-status] [14372] Error in handleMessage: {"frb":{"cwd":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions","projectId":"bryn-todoapp-27e80","triggerId":"","emulators":{},"socketPath":"\\\\?\\pipe\\C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\14372"},"opts":{"nodeBinary":"C:\\Program Files\\nodejs\\node.exe"}} => 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 C:\Users\Bryn\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Bryn\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:5:58)
    at process._tickCallback (internal/process/next_tick.js:68:7) {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Error in handleMessage: {\"frb\":{\"cwd\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\",\"projectId\":\"bryn-todoapp-27e80\",\"triggerId\":\"\",\"emulators\":{},\"socketPath\":\"\\\\\\\\?\\\\pipe\\\\C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\\\\14372\"},\"opts\":{\"nodeBinary\":\"C:\\\\Program Files\\\\nodejs\\\\node.exe\"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter\n    at C:\\Users\\Bryn\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:455:19\n    at Generator.next (<anonymous>)\n   
 at fulfilled (C:\\Users\\Bryn\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:5:58)\n    at process._tickCallback (internal/process/next_tick.js:68:7)"}}     
!  functions: Cannot set property config of #<Object> which has only a getter {"metadata":{"emulator":{"name":"functions"},"message":"Cannot set property config of #<Object> which has only a getter"}}        
!  Your function was killed because it raised an unhandled error. {"metadata":{"emulator":{"name":"functions"},"message":"Your function was killed because it raised an unhandled error."}}
[2020-05-29T14:38:19.019Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: exited {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: exited"}}
[2020-05-29T14:38:19.029Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: FINISHED {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: FINISHED"}}  `

Ich verstehe es immer noch. Ich habe alles oben

image

@COFFEEEADDICT Überprüfen Sie, ob firebase --version 8.4.1 anzeigt

Hallo Leute,

Ich habe diesen Fehler nach einem Update im Paket firebase-functions (3.6.2) erhalten.

In meinem Fall bestand die Lösung darin, /node_modules zu löschen und die firebase-functions auf die vorherige Version ( npm install --save [email protected] ) herunterzustufen.

Hallo Leute,

Die erste Überprüfung, welche Version Sie installiert haben, war 8.1.1
Bitte aktualisieren Sie die Firebase-Tools telefonisch

sudo npm i -g firebase-tools

Dadurch wird die neueste Version 8.4.1 installiert
Und es hat mein Problem behoben.
In der Tat habe ich die neueste Firebase-Funktion und Admin installiert
"firebase-admin": "8.12.1",
"firebase-Funktionen": "3.6.1",

Ich hoffe, Sie haben das Problem behoben.

arbeiten danke @iamsrujal

Ich bekomme immer noch Hilfe?

System
Mac OS Catalina: 10.15.4
Knoten: v10.21.0
Java: openjdk Version "14.0.1" 2020-04-14

Paketversionen:
"firebase-admin": "^ 8.12.1",
"firebase-Funktionen": "^ 3.7.0",
[email protected]

Der Befehl, den ich ausgeführt habe:
Firebase- Emulatoren: Start - nur Funktionen

Konsolenausgabe:
i Emulatoren starten: ["Funktionen"]
✔ Funktionen: Verwenden von Node @ 10 vom Host.
✔ Funktionen: Der Emulator wurde unter http: // localhost : 5001 gestartet
i-Funktionen: Beobachten von "/ Users / chamika / Projects / Bitsmedia / Muslim-Pro-Firebase / functions" für Cloud-Funktionen ...
⚠ TypeError: Die Eigenschaftskonfiguration von # kann nicht festgelegt werdendas hat nur einen Getter
at InitializeFunctionsConfigHelper (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:328:15)
unter /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:448:13
bei Generator.next ()
unter /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:7:71
bei neuem Versprechen ()
at __awaiter (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:3:12)
at main (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:421:12)
bei Objekt.(/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:511:5)
at Module._compile (intern / modules / cjs / loader.js: 778: 30)
at Object.Module._extensions..js (intern / modules / cjs / loader.js: 789: 10)
⚠ Ihre Funktion wurde beendet, weil ein nicht behandelter Fehler aufgetreten ist.

Ich habe das gleiche Problem und es verschwindet auch nach dem Aktualisieren der Firebase-Tools nicht. Wenn ich versuche, den Emulator auszuführen, schlägt dies fehl. In der firebase-debug.log wird Folgendes angezeigt:

[debug] [2020-06-23T18:50:31.331Z] [runtime-status] [54019] Error in handleMessage: {"frb":{"cwd":"/Users/shaimo-mbp/dev/javascript/CryptoTracker/functions","projectId":"cryptotracker-fa488","triggerId":"","ports":{"firestore":8080},"socketPath":"/var/folders/83/c3hy2yfx53g6_f3bvwcslqcc0000gn/T/fire_emu_54019.sock"},"opts":{"nodeBinary":"/Users/shaimo-mbp/.nvm/versions/node/v10.18.1/bin/node"}} => 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 /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:514:19
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[warn] ⚠  functions:
[warn] ⚠  Your function was killed because it raised an unhandled error.

Wie kann ich es reparieren? Total hier festgefahren ...

Für diejenigen, bei denen dieses Problem weiterhin auftritt: Wenn Sie dieses Problem in einem frisch initialisierten Projekt so reproduzieren können, dass wir es kopieren können, reichen Sie ein neues Problem ein und wir werden es versuchen.

Falls es jemandem hilft: Ich musste die explizite Version verwenden, um die Tools zu aktualisieren, und dann verschwand das Problem:
sudo npm i -g [email protected]

System
Mac OS Catalina: 10.15.4
Knoten: v10.21.0
Java: openjdk Version "14.0.1" 2020-04-14

Update vom 07.09.2020 Dieses Problem besteht weiterhin, wenn "firebase-admin": "^8.10.0", .
Ich musste auf "firebase-admin": "^8.12.1", aktualisieren und überprüfen, ob ich "Firebase-Tools" habe: "8.4.1"

Gleiches Setup wie JohnGeorgiadis. Gleiches Problem...

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

Spielte mit verschiedenen Versionen verschiedener Abhängigkeiten herum, ohne eine Lösung zu finden.

Vielleicht ist dies für jemanden hilfreich: Mein Linux verwendete "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js", wenn ich "firebase" in die Konsole eingab, also benutzte es 7.12. 0 Version des Pakets. Ich habe den symbolischen Link geändert und bin mir jetzt sicher, dass ich die Version 8.6.0 verwende.

user<strong i="6">@machine</strong>: which firebase
/usr/local/bin/firebase
user<strong i="7">@machine</strong>: cd /usr/local/bin
user<strong i="8">@machine</strong>: sudo rm firebase
user<strong i="9">@machine</strong>: sudo ln -s /usr/lib/node_modules/firebase-tools/lib/bin/firebase.js firebase
user<strong i="10">@machine</strong>: firebase --version
8.6.0

Das Wort _local_ ist der Schlüssel

Bei einer globalen Installation werden Firebase-Tools in '/ usr / local / lib / node_modules' installiert. Das von OP hervorgehobene Problem weist jedoch auf einen anderen Pfad hin: '/ usr / lib / node_modules / firebase-tools /'.
Auf dem ersten Pfad hatte ich die neueste Version von Firebase-Tools 8.6.0, aber auf dem zweiten Pfad Version 7.0.2.

Eine Feuerbasis -V gab 7.0.2 zurück

Hier ist ein relevanter Kommentar (aus einer Diskussion hier: https://stackoverflow.com/q/5926672/7461599)

installing without -g option will install a module to you working directory e.g. if you make a directory say ~/Desktop/tmp then cd ~/Desktop/tmp then do npm install appium then do ls you will see node_modules package-lock.json because you have installed a node module appium to your working directory... super confusing because -g should essentially be the default but is not.

Was es für mich getan hat, war npm uninstall firebase-tools und dann sicherzustellen, dass ich die neueste Version mit -g installiert habe. Jetzt zeigt ein firebase -V mit der aktuellen Version auf den richtigen Pfad, und der Firebase-Emulator läuft reibungslos.

Falls es hilft, hatte ich einen Konflikt zwischen meinem globalen npm [email protected] und meinem globalen Garn [email protected] . Durch das Löschen meiner globalen npm-Version wurde das Problem behoben, dass 7.0.0 von firebase -V

Ich habe den obigen Fehler aufgrund einer anderen Knotenversion erhalten, die während verwendet wurde

  1. Projektinitialisierung (Firebase-Init) => Knotenversion => v8.xx.
  2. Projekt läuft (Firebase-Emulatoren: Start) => Knotenversion => v12.xx.

Ich habe das Problem gelöst, indem ich dieselbe Knotenversion erstellt habe

Vielleicht ist dies für jemanden hilfreich: Mein Linux verwendete "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js", wenn ich "firebase" in die Konsole eingab, also benutzte es 7.12. 0 Version des Pakets. Ich habe den symbolischen Link geändert und bin mir jetzt sicher, dass ich die Version 8.6.0 verwende.

user<strong i="7">@machine</strong>: which firebase
/usr/local/bin/firebase
user<strong i="8">@machine</strong>: cd /usr/local/bin
user<strong i="9">@machine</strong>: sudo rm firebase
user<strong i="10">@machine</strong>: sudo ln -s /usr/lib/node_modules/firebase-tools/lib/bin/firebase.js firebase
user<strong i="11">@machine</strong>: firebase --version
8.6.0

Das Wort _local_ ist der Schlüssel

Wie mache ich sudo rm firebase rückgängig?

Vielleicht ist dies für jemanden hilfreich: Mein Linux verwendete "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js", wenn ich "firebase" in die Konsole eingab, also benutzte es 7.12. 0 Version des Pakets. Ich habe den symbolischen Link geändert und bin mir jetzt sicher, dass ich die Version 8.6.0 verwende.

user<strong i="8">@machine</strong>: which firebase
/usr/local/bin/firebase
user<strong i="9">@machine</strong>: cd /usr/local/bin
user<strong i="10">@machine</strong>: sudo rm firebase
user<strong i="11">@machine</strong>: sudo ln -s /usr/lib/node_modules/firebase-tools/lib/bin/firebase.js firebase
user<strong i="12">@machine</strong>: firebase --version
8.6.0

Das Wort _local_ ist der Schlüssel

Wie mache ich sudo rm firebase rückgängig?

Sie können nicht (leicht). Ich würde versuchen, eine ähnliche Binärdatei zu finden und auf demselben Pfad zu platzieren

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen