"firebase emulator:start" will not run
See original GitHub issueEnvironment info
firebase-tools: 8.4.1 Platform: Mac OS Sierra
Test case
When I run firebase emulators:start
, an error is thrown and the emulators are not run.
If I run firebase emulators:start
additional times after this, the same errors are thrown in addition to this warning:
It seems that you are running multiple instances of the emulator suite for project fir-emulator-issue2. This may result in unexpected behavior.
I haven’t been able to get the emulators to run successfully yet.
Steps to reproduce
Create a new public directory and init a newly created firebase project into it. Add emulators to the init: include firestore, hosting and functions. Then, in the console, run: firebase emulators:start
.
Here is a github repo of a minimal reproduction
In the readme of the github repo I included the logs for the firebase init
configuration just in case.
Expected behavior
I would expect the emulators to start instead of running an error and crashing. I would also expect to see a line saying that the ‘processes shut down’ with each additional run of firebase emulators:start
instead of the console telling me that the emulator is already running.
Actual behavior
Elijahs-Air:emulator-issue jah$ firebase emulators:start --debug
[2020-05-29T15:50:10.413Z] > 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-29T15:50:10.416Z] > authorizing via signed-in user
i emulators: Starting emulators: functions, firestore, hosting {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: functions, firestore, hosting"}}
[2020-05-29T15:50:10.483Z] [hub] writing locator at /var/folders/s1/kxm01zy17v59z003d47wf0200000gn/T/hub-emulator-issue-49c9f.json
⚠ Your requested "node" version "8" doesn't match your global version "12" {"metadata":{"emulator":{"name":"functions"},"message":"Your requested \"node\" version \"8\" doesn't match your global version \"12\""}}
[2020-05-29T15:50:10.522Z] Ignoring unsupported arg: projectId {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: projectId"}}
[2020-05-29T15:50:10.523Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: auto_download"}}
[2020-05-29T15:50:10.523Z] Starting Firestore Emulator with command {"binary":"java","args":["-Duser.language=en","-jar","/Users/jah/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.4.jar","--host","localhost","--port",8080,"--rules","/Users/jah/Desktop/Firebase Projects/emulator-issue/firestore.rules","--functions_emulator","localhost:5001"],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator","seed_from_export"],"joinArgs":false} {"metadata":{"emulator":{"name":"firestore"},"message":"Starting Firestore Emulator with command {\"binary\":\"java\",\"args\":[\"-Duser.language=en\",\"-jar\",\"/Users/jah/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.4.jar\",\"--host\",\"localhost\",\"--port\",8080,\"--rules\",\"/Users/jah/Desktop/Firebase Projects/emulator-issue/firestore.rules\",\"--functions_emulator\",\"localhost:5001\"],\"optionalArgs\":[\"port\",\"webchannel_port\",\"host\",\"rules\",\"functions_emulator\",\"seed_from_export\"],\"joinArgs\":false}"}}
i firestore: Firestore Emulator logging to firestore-debug.log {"metadata":{"emulator":{"name":"firestore"},"message":"Firestore Emulator logging to \u001b[1mfirestore-debug.log\u001b[22m"}}
[2020-05-29T15:50:11.057Z] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/cloud/datastore/emulator/firestore/CloudFirestore : Unsupported major.minor version 52.0
{"metadata":{"emulator":{"name":"firestore"},"message":"Exception in thread \"main\" java.lang.UnsupportedClassVersionError: com/google/cloud/datastore/emulator/firestore/CloudFirestore : Unsupported major.minor version 52.0\n"}}
[2020-05-29T15:50:11.058Z] at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58) {"metadata":{"emulator":{"name":"firestore"},"message":"\tat java.lang.ClassLoader.defineClass1(Native Method)\n\tat java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:621)\n\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\n\tat java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\n\tat java.net.URLClassLoader.access$000(URLClassLoader.java:58)"}}
[2020-05-29T15:50:11.059Z]
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
{"metadata":{"emulator":{"name":"firestore"},"message":"\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:197)\n\tat java.security.AccessController.doPrivileged(Native Method)\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n"}}
[2020-05-29T15:50:11.060Z] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
{"metadata":{"emulator":{"name":"firestore"},"message":"\tat java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:247)\n"}}
Error: firestore: Firestore Emulator has exited with code: 1
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
This is where the download is - https://www.oracle.com/java/technologies/javase-downloads.html
@samtstern however when I updated it I still am getting the error. How do I resolve the issue?
@Elijer thanks! Looks like we check for the existence of
java
but don’t check for the version. It would be good if we could surface a clearer error here.