Невозможно запустить firebase локально. Незаконный отражающий доступ со стороны io.netty.util.internal.ReflectionUtil

#javascript #reactjs #firebase #google-cloud-firestore #firebase-cli

# #javascript #reactjs #firebase #google-облако-firestore #firebase-cli

Вопрос:

Я не могу запустить локальную версию своего серверной части с firebase. Я бегу npm run dev , как всегда. Но я получаю эти ошибки. Я ничего не сделал, чтобы изменить способ запуска, и он просто остановился несколько дней назад.

Если мне нужно обновить какие-либо детали, пожалуйста, сообщите мне, и я смогу.

   emulators: Starting emulators: functions, firestore, database, hosting
i  firestore: Detected non-emulator Database export at /Users/davidjamesmitten/Dev_2020/apixel/functions
⚠  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: auth, pubsub
✔  functions: Using node@12 from host.
⚠  firestore: Did not find a Cloud Firestore rules file specified in a firebase.json config file.
⚠  firestore: The emulator will default to allowing all reads and writes. Learn more about this option: https://firebase.google.com/docs/emulator-suite/install_and_configure#security_rules_configuration.
i  firestore: Firestore Emulator logging to firestore-debug.log
i  database: Database Emulator logging to database-debug.log
events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:156:25)
    at writeGeneric (internal/stream_base_commons.js:147:3)
    at Socket._writeGeneric (net.js:788:11)
    at Socket._write (net.js:800:8)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)
    at Socket.Writable.write (_stream_writable.js:318:11)
    at Object.write (/Users/<user>/<dir>/<backend>/functions/node_modules/typescript/lib/tsc.js:3234:36)
    at Object.onWatchStatusChange (/Users/<user>/<dir>/<backend>/functions/node_modules/typescript/lib/tsc.js:86680:24)
    at /Users/<user>/<dir>/<backend>/functions/node_modules/typescript/lib/tsc.js:86895:125
Emitted 'error' event on Socket instance at:
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:418:5)
    at onwrite (_stream_writable.js:445:5)
    at internal/streams/destroy.js:50:7
    at Socket.dummyDestroy [as _destroy] (internal/bootstrap/switches/is_main_thread.js:97:3)
    at Socket.destroy (internal/streams/destroy.js:38:8)
    at afterWriteDispatched (internal/stream_base_commons.js:156:17)
    at writeGeneric (internal/stream_base_commons.js:147:3)
    at Socket._writeGeneric (net.js:788:11)
    at Socket._write (net.js:800:8) {
  errno: 'EPIPE',
  code: 'EPIPE',
  syscall: 'write'
}
i  database: Importing data from /Users/<user>/<dir>/<backend>/functions/.runtimeconfig.json
i  emulators: Shutting down emulators.
i  functions: Stopping Functions Emulator
i  database: Stopping Database Emulator
i  firestore: Stopping Firestore Emulator
i  hub: Stopping emulator hub

Error: Error during database import.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ dev: `tsc -w | firebase functions:config:get > .runtimeconfig.json | firebase emulators:start --import=. --export-on-exit`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the functions@ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/<user>/.npm/_logs/2020-12-09T15_35_53_304Z-debug.log

 

Вот журналы:

 **database-debug.log**

NING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/Users/davidjamesmitten/.cache/firebase/emulators/firebase-database-emulator-v4.7.1.jar) to field sun.nio.ch.SelectorImpl.selectedKeys
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
15:35:51.955 [NamespaceSystem-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
15:35:52.195 [main] INFO com.firebase.server.forge.App$ - Listening at localhost:9000
15:35:52.593 [Thread-0] INFO com.firebase.server.forge.App$ - Attempting graceful shutdown.
15:35:52.606 [Thread-0] INFO com.firebase.server.forge.App$ - Graceful shutdown complete.
 
 **firestore-debug.log**

API endpoint: http://localhost:8080
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

   export FIRESTORE_EMULATOR_HOST=localhost:8080

Dev App Server is now running.

*** shutting down gRPC server since JVM is shutting down
*** server shut down
 

package.json

   "name": "functions",
  "scripts": {
    "lint": "tslint --project tsconfig.json",
    "build": "tsc",
    "serve": "GOOGLE_APPLICATION_CREDENTIALS='../apixel.json' tsc -w | firebase serve --only functions",
    "dev": "tsc -w | firebase functions:config:get > .runtimeconfig.json | firebase emulators:start --import=. --export-on-exit",
    "dev:public": "tsc -w | firebase emulators:start --import=. --export-on-exit",
    "shell": "npm run build amp;amp; firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log",
    "test": "ts-mocha --reporter spec --require @babel/register",
    "test:watch": "GOOGLE_APPLICATION_CREDENTIALS='apixel-test.json' ts-mocha -w --reporter spec --require @babel/register --watch"
  },
  "engines": {
    "node": "12"
  },
  "main": "lib/index.js",
  "dependencies": {
    "@types/cors": "^2.8.6",
    "@types/express": "^4.17.6",
    "chai": "^4.2.0",
    "cors": "^2.8.5",
    "ejs": "^3.1.3",
    "express": "^4.17.1",
    "firebase": "^8.1.2",
    "firebase-admin": "^9.4.1",
    "firebase-functions": "^3.6.1",
    "firebase-tools": "^8.18.0",
    "jsdom": "^16.4.0",
    "node-fetch": "^2.6.1",
    "stripe": "^8.15.0"
  },
  "devDependencies": {
    "@babel/cli": "^7.10.5",
    "@babel/core": "^7.10.5",
    "@babel/node": "^7.10.5",
    "@babel/preset-env": "^7.10.4",
    "@babel/register": "^7.10.5",
    "firebase-functions-test": "^0.2.1",
    "mocha": "^8.0.1",
    "sinon": "^9.0.2",
    "supertest": "^4.0.2",
    "ts-mocha": "^7.0.0",
    "tslint": "^6.1.1",
    "typescript": "^3.8.0"
  },
  "private": true
}
 

Перепробовал все источники, которые я могу придумать, чтобы решить эту проблему.

Комментарии:

1. После проведения некоторых исследований я ничего не нашел об этом или любом подобном с моей стороны, как вы уже сделали. В этом случае я бы рекомендовал открыть проблему непосредственно в репозитории инструментов firebase

2. @davidmitten ошибка, вероятно, описана firebase-debug.log не в этих других файлах, которые вы опубликовали.

3. Я получаю ту же проблему, пожалуйста, обновите здесь, если найдете решение