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

not work hosting.stop() function #1134

k2wanko opened this issue Feb 3, 2019 · 2 comments


None yet
2 participants
Copy link

commented Feb 3, 2019

[REQUIRED] Environment info

firebase-tools: 6.1.1

Platform: macos

[REQUIRED] Test case

const Config = require('firebase-tools/lib/config');
const requirePermissions = require('firebase-tools/lib/requirePermissions');
const hosting = require('firebase-tools/lib/serve/hosting');

const config = Config.load({}, true);
const rcfile = config.readProjectFile('.firebaserc', {
  json: true,
  fallback: {},
const options = {
  port: 55000,
  project: rcfile.projects.default,

await requirePermissions(options);

await hosting.start()

// e2e test

await hosting.stop() // <-- not work hosting.stop() function!

function _stop() {
return Promise.resolve();

I'm in trouble that jest has not finish.
Please fix it.

Probably like this

var server;

function _startServer(options, config, port, init) {
  server = superstatic({

function _stop() {
  if (server) {
  return Promise.resolve();

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

[REQUIRED] Actual behavior

@k2wanko k2wanko added the type: bug label Feb 3, 2019

k2wanko added a commit to k2wanko/firebase-tools that referenced this issue Feb 3, 2019


This comment has been minimized.

Copy link

commented Feb 4, 2019

Hey @k2wanko, thanks for reporting this. I chatted with some devs on the Firebase hosting team, and they think that the fix you implemented on your branch looks good. Could you open a PR onto this repo for it?


This comment has been minimized.

Copy link
Contributor Author

commented Feb 5, 2019

Hi @joehan
I was PR created. Please check.

@mbleigh mbleigh closed this in #1135 Feb 6, 2019

mbleigh added a commit that referenced this issue Feb 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.