[debug] [2025-04-30T17:05:16.874Z] ---------------------------------------------------------------------- [debug] [2025-04-30T17:05:16.875Z] Command: C:\Program Files\nodejs\node.exe C:\Users\elgat\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js emulators:start --only functions [debug] [2025-04-30T17:05:16.875Z] CLI Version: 14.1.0 [debug] [2025-04-30T17:05:16.875Z] Platform: win32 [debug] [2025-04-30T17:05:16.876Z] Node Version: v22.14.0 [debug] [2025-04-30T17:05:16.876Z] Time: Wed Apr 30 2025 19:05:16 GMT+0200 (hora de verano de Europa central) [debug] [2025-04-30T17:05:16.876Z] ---------------------------------------------------------------------- [debug] [debug] [2025-04-30T17:05:17.000Z] > 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] [2025-04-30T17:05:17.001Z] > authorizing via signed-in user (elgatodeescayola@gmail.com) [info] i emulators: Starting emulators: functions {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: functions"}} [debug] [2025-04-30T17:05:17.006Z] [logging] Logging Emulator only supports listening on one address (127.0.0.1). Not listening on ::1 [debug] [2025-04-30T17:05:17.006Z] assigned listening specs for emulators {"user":{"hub":[{"address":"127.0.0.1","family":"IPv4","port":4400},{"address":"::1","family":"IPv6","port":4400}],"ui":[{"address":"127.0.0.1","family":"IPv4","port":4000},{"address":"::1","family":"IPv6","port":4000}],"logging":[{"address":"127.0.0.1","family":"IPv4","port":4500}]},"metadata":{"message":"assigned listening specs for emulators"}} [debug] [2025-04-30T17:05:17.009Z] [hub] writing locator at C:\Users\elgat\AppData\Local\Temp\hub-beelifesocialpost.json [debug] [2025-04-30T17:05:17.018Z] [functions] Functions Emulator only supports listening on one address (127.0.0.1). Not listening on ::1 [debug] [2025-04-30T17:05:17.018Z] [eventarc] Eventarc Emulator only supports listening on one address (127.0.0.1). Not listening on ::1 [debug] [2025-04-30T17:05:17.018Z] [tasks] Cloud Tasks Emulator only supports listening on one address (127.0.0.1). Not listening on ::1 [debug] [2025-04-30T17:05:17.018Z] late-assigned ports for functions and eventarc emulators {"user":{"hub":[{"address":"127.0.0.1","family":"IPv4","port":4400},{"address":"::1","family":"IPv6","port":4400}],"ui":[{"address":"127.0.0.1","family":"IPv4","port":4000},{"address":"::1","family":"IPv6","port":4000}],"logging":[{"address":"127.0.0.1","family":"IPv4","port":4500}],"functions":[{"address":"127.0.0.1","family":"IPv4","port":5001}],"eventarc":[{"address":"127.0.0.1","family":"IPv4","port":9299}],"tasks":[{"address":"127.0.0.1","family":"IPv4","port":9499}]},"metadata":{"message":"late-assigned ports for functions and eventarc emulators"}} [warn] ! functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: apphosting, auth, firestore, database, hosting, pubsub, storage, dataconnect {"metadata":{"emulator":{"name":"functions"},"message":"The following emulators are not running, calls to these services from the Functions emulator will affect production: \u001b[1mapphosting, auth, firestore, database, hosting, pubsub, storage, dataconnect\u001b[22m"}} [debug] [2025-04-30T17:05:17.048Z] defaultcredentials: writing to file C:\Users\elgat\AppData\Roaming\firebase\elgatodeescayola_gmail_com_application_default_credentials.json [debug] [2025-04-30T17:05:17.049Z] Setting GAC to C:\Users\elgat\AppData\Roaming\firebase\elgatodeescayola_gmail_com_application_default_credentials.json {"metadata":{"emulator":{"name":"functions"},"message":"Setting GAC to C:\\Users\\elgat\\AppData\\Roaming\\firebase\\elgatodeescayola_gmail_com_application_default_credentials.json"}} [debug] [2025-04-30T17:05:17.049Z] Checked if tokens are valid: false, expires at: 1746032093805 [debug] [2025-04-30T17:05:17.049Z] Checked if tokens are valid: false, expires at: 1746032093805 [debug] [2025-04-30T17:05:17.049Z] > refreshing access token with scopes: [] [debug] [2025-04-30T17:05:17.050Z] >>> [apiv2][query] POST https://www.googleapis.com/oauth2/v3/token [none] [debug] [2025-04-30T17:05:17.050Z] >>> [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted] [debug] [2025-04-30T17:05:17.194Z] <<< [apiv2][status] POST https://www.googleapis.com/oauth2/v3/token 200 [debug] [2025-04-30T17:05:17.194Z] <<< [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted] [debug] [2025-04-30T17:05:17.199Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/beelifesocialpost/adminSdkConfig [none] [debug] [2025-04-30T17:05:17.551Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/beelifesocialpost/adminSdkConfig 403 [debug] [2025-04-30T17:05:17.551Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/beelifesocialpost/adminSdkConfig {"error":{"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"}} [debug] [2025-04-30T17:05:17.551Z] Failed to get Admin SDK config for beelifesocialpost, falling back to cache Failed to get Admin SDK for Firebase project beelifesocialpost. Please make sure the project exists and your account has permission to access it. {"name":"FirebaseError","children":[],"exit":2,"message":"Failed to get Admin SDK for Firebase project beelifesocialpost. Please make sure the project exists and your account has permission to access it.","original":{"name":"FirebaseError","children":[],"context":{"body":{"error":{"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"}},"response":{"statusCode":403}},"exit":1,"message":"Request to https://firebase.googleapis.com/v1beta1/projects/beelifesocialpost/adminSdkConfig had HTTP Error: 403, The caller does not have permission","status":403},"status":500} [warn] ! functions: Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect. {"metadata":{"emulator":{"name":"functions"},"message":"Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect."}} [info] i functions: Watching "C:\Users\elgat\Desktop\TRABAJOS_NUEVO_PC\socialpost\socialpost-panel\functions" for Cloud Functions... {"metadata":{"emulator":{"name":"functions"},"message":"Watching \"C:\\Users\\elgat\\Desktop\\TRABAJOS_NUEVO_PC\\socialpost\\socialpost-panel\\functions\" for Cloud Functions..."}} [debug] [2025-04-30T17:05:17.567Z] Validating nodejs source [debug] [2025-04-30T17:05:18.057Z] > [functions] package.json contents: { "name": "functions", "description": "Cloud Functions for Firebase", "scripts": { "lint": "eslint .", "serve": "firebase emulators:start --only functions", "shell": "firebase functions:shell", "start": "npm run shell", "deploy": "firebase deploy --only functions", "logs": "firebase functions:log" }, "engines": { "node": "22" }, "main": "index.js", "dependencies": { "axios": "^1.8.4", "firebase-admin": "^12.6.0", "firebase-functions": "^6.0.1", "rss-parser": "^3.13.0" }, "devDependencies": { "eslint": "^8.15.0", "eslint-config-google": "^0.14.0", "firebase-functions-test": "^3.1.0" }, "private": true } [debug] [2025-04-30T17:05:18.057Z] Building nodejs source [debug] [2025-04-30T17:05:18.058Z] Failed to find version of module node: reached end of search path C:\Users\elgat\Desktop\TRABAJOS_NUEVO_PC\socialpost\socialpost-panel\functions\node_modules [info] + functions: Using node@22 from host. [debug] [2025-04-30T17:05:18.059Z] Could not find functions.yaml. Must use http discovery [debug] [2025-04-30T17:05:18.062Z] Found firebase-functions binary at 'C:\Users\elgat\Desktop\TRABAJOS_NUEVO_PC\socialpost\socialpost-panel\functions\node_modules\.bin\firebase-functions' [info] Serving at port 8590 [error] TypeError: functions.region is not a function at Object. (C:\Users\elgat\Desktop\TRABAJOS_NUEVO_PC\socialpost\socialpost-panel\functions\index.js:16:32) at Module._compile (node:internal/modules/cjs/loader:1554:14) at Object..js (node:internal/modules/cjs/loader:1706:10) at Module.load (node:internal/modules/cjs/loader:1289:32) at Function._load (node:internal/modules/cjs/loader:1108:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:220:24) at Module.require (node:internal/modules/cjs/loader:1311:12) at require (node:internal/modules/helpers:136:16) at loadModule (C:\Users\elgat\Desktop\TRABAJOS_NUEVO_PC\socialpost\socialpost-panel\functions\node_modules\firebase-functions\lib\runtime\loader.js:40:16) [debug] [2025-04-30T17:05:18.403Z] Got response code 400; body Failed to generate manifest from function source: TypeError: functions.region is not a function [error] !! functions: Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error {"metadata":{"emulator":{"name":"functions"},"message":"Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error"}} [debug] [2025-04-30T17:05:22.433Z] Could not find VSCode notification endpoint: FetchError: request to http://localhost:40001/vscode/notify failed, reason: . If you are not running the Firebase Data Connect VSCode extension, this is expected and not an issue. [info] ┌─────────────────────────────────────────────────────────────┐ │ ✔ All emulators ready! It is now safe to connect your app. │ │ i View Emulator UI at http://127.0.0.1:4000/ │ └─────────────────────────────────────────────────────────────┘ ┌───────────┬────────────────┬─────────────────────────────────┐ │ Emulator │ Host:Port │ View in Emulator UI │ ├───────────┼────────────────┼─────────────────────────────────┤ │ Functions │ 127.0.0.1:5001 │ http://127.0.0.1:4000/functions │ └───────────┴────────────────┴─────────────────────────────────┘ Emulator Hub host: 127.0.0.1 port: 4400 Other reserved ports: 4500 Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.