Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No JDK causes emulators:exec to immediately exit with a success code #7974

Closed
jamesdaniels opened this issue Nov 20, 2024 · 2 comments · Fixed by #7976
Closed

No JDK causes emulators:exec to immediately exit with a success code #7974

jamesdaniels opened this issue Nov 20, 2024 · 2 comments · Fixed by #7976

Comments

@jamesdaniels
Copy link
Member

jamesdaniels commented Nov 20, 2024

I was seeing unexpected success on a test suite, it turns out I did not have the JDK installed correctly on my new machine.

When failures such as this occur firebase emulators:exec "exit 1" returns a success code and only i emulators: Shutting down emulators.

I didn't see I what the issue was until I used --debug. This could be a footgun for those using the emulators for integration tests. Having seen this I expect there may be similar classes of errors.

@jamesdaniels jamesdaniels changed the title No JDK causes emulators:exec to immediately exit with a successful error code & no useful error No JDK causes emulators:exec to immediately exit with a successful error code Nov 20, 2024
@jamesdaniels jamesdaniels changed the title No JDK causes emulators:exec to immediately exit with a successful error code No JDK causes emulators:exec to immediately exit with a success code Nov 20, 2024
@aalej
Copy link
Contributor

aalej commented Nov 20, 2024

Thanks for raising this @jamesdaniels. I'm able to reproduce the issue. As you mentioned, this would cause a false positive on integration tests if the user doesn't have JDK installed, or if it was incorrectly installed in their machine.

I'll mark this as reproducible and discuss this with some of our colleagues.

@joehan
Copy link
Contributor

joehan commented Nov 20, 2024

Thanks for catching this James - looks like we broke this while trying to fix a different issue that was breaking error reporting in the VSCode extension - https://github.com/firebase/firebase-tools/blob/master/src/emulator/commandUtils.ts#L471 is catching the error so it can message the extension, but it never rethrows it.

PR incoming shortly to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants