cli icon indicating copy to clipboard operation
cli copied to clipboard

heroku container:push --recursive: improve error message

Open tbalthazar opened this issue 5 years ago • 2 comments

What is the current behavior?

$ heroku version
heroku/7.35.1 darwin-x64 node-v12.13.0
$ git clone https://github.com/heroku/alpinehelloworld.git
$ cd alpinehelloworld
$ heroku container:push web worker --recursive -a <app-name>
 ▸    Cannot read property 'length' of undefined

Error happens around here:

 ▸    Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at Function.Sanbashi.chooseJobs (/usr/local/Cellar/heroku/7.22.7/lib/client/7.35.1/node_modules/@heroku-cli/plugin-container-registry-v5/lib/sanbashi.js:59:15)
    at push (/usr/local/Cellar/heroku/7.22.7/lib/client/7.35.1/node_modules/@heroku-cli/plugin-container-registry-v5/commands/push.js:71:27)

Creating the 2 Dockerfile for the web and worker processes works as expected:

$ cp Dockerfile Dockerfile.web
$ cp Dockerfile Dockerfile.worker
$ heroku container:push web worker --recursive -a <app-name>
...
Your images have been successfully pushed. You can now release them with the 'container:release' command.

What is the expected behavior?

The error message should say something like:

Dockerfile.web and Dockerfile.worker not found.

tbalthazar avatar Jan 15 '20 10:01 tbalthazar

Still facing this in 2022 ^^

gondar00 avatar Jan 07 '22 21:01 gondar00

Looks like the error is thrown from this line

gondar00 avatar Jan 07 '22 21:01 gondar00