heroku / cli

Heroku CLI
https://devcenter.heroku.com/articles/heroku-cli
ISC License
851 stars 218 forks source link

heroku local web: [DONE] Killing all processes with signal SIGINT #1440

Open marcolino opened 4 years ago

marcolino commented 4 years ago

I want to report what I think is a BUG.

Current behavior: I type heroku local web in my project base folder, and, after one second or so, I get:

$ heroku local web
[DONE] Killing all processes with signal  SIGINT
12:14:08 PM web.1 Exited Successfully

using strace to show heroku cli system calls, I see:

$ strace heroku local web
[ ... REMOVED SOME LINES HERE ... ]
chdir("/")                              = 0
getresuid([1000], [1000], [1000])       = 0
getresgid([1000], [1000], [1000])       = 0
geteuid()                               = 1000
write(2, "need to run as root or suid", 27need to run as root or suid) = 27
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
+++ exited with 1 +++

The expected behavior: to start a local server to be reachable on http://localhost.

Note that:

  1. git push heroku master just works, starting the app on heroku
  2. before I did push to heroku (or made some other config change), the local server was running correctly...

I did just run heroku update, so I have the latest heroku version:

$ heroku --version
heroku/7.37.0 linux-x64 node-v12.13.0

$ uname -a
Linux me 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I am not behind an HTTP proxy nor company firewall.

Please give a hint how to check my configuration for local development...

coiti commented 4 years ago

The same thing was happening to me on both the snap (v7.39.0) and apt (v7.39.2) versions of the CLI. Turns out it only happens when I run it from VSCode installed via snap. On a terminal, or even in VSCode installed via dpkg it runs fine. I guess this could be a VSCode or a snap issue more than a Heroku issue.

Just in case, this is my environment:

$ heroku --version
heroku/7.39.2 linux-x64 node-v12.13.0
$ uname -srvm
Linux 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64
$ lsb_release -ds
Ubuntu 19.10
Konstantin-Ushakov commented 2 years ago

Get same error on windows 10 with:

heroku --version
heroku/7.53.0 win32-x64 node-v12.21.0
JamesEarle commented 2 years ago

I can confirm that I receive the same error even after running heroku update but even when I get that error I am still able to hit the endpoints made available by my webserver, just heroku uses a different port.

cli-screenshot

svpease commented 2 years ago

I ran into this issue while using this guide on how to prepare a codebase for Heroku deployment, where it uses an example Procfile web: node app.js and later describes how to creating a Heroku remote using the Heroku CLI: heroku create -a example-app.

If you did something similar, then instead of your Procfile using:

web: node app.js

..it should be using:

web: node ./bin/www

..to match what is in your package.json: "scripts": { "start": "node ./bin/www" }.