Cli: Heroku cli issues - behind corporate proxy

Created on 29 Jan 2018  路  7Comments  路  Source: heroku/cli

Noticing issues with running commands like heroku logs behind our corporate proxy lately.
I set the environment variable and enabled debug for the log below.

If I curl the URL in the 201 response (logplex_url) I am able to retrieve the logs.. but the heroku cli is throwing an error.

proxy set to https://10.10.5.18:8080
--> POST /apps/t/log-sessions
--> {"lines":100}
<-- 201 Created
<-- {"created_at":"2018-01-29T21:02:45Z","id":"someidhere","logplex_url":"removed for posting here","updated_at":"2018-01-29T21:02:45Z"}
ERROR: TypeError: Cannot read property 'once' of null
at EventEmitter.ee.once.req (/home/username/.local/share/heroku/client/6.15.18-fdf2097/node_modules/heroku-cli-util/node_modules/got/index.js:229:20)
at Object.onceWrapper (events.js:255:19)
at EventEmitter.emit (events.js:165:20)
at Immediate.setImmediate (/home/username/.local/share/heroku/client/6.15.18-fdf2097/node_modules/heroku-cli-util/node_modules/got/index.js:264:8)
at runCallback (timers.js:756:18)
at tryOnImmediate (timers.js:717:5)
at processImmediate [as _immediateCallback] (timers.js:697:5)
Exiting with code: 1

Most helpful comment

Hi,
I am facing the same issue with heroku logs command. I am behind firewall and able to login via "heroku login" command after setting HTTP_PROXY environment variable. I am able to execute other commands as well but whenever I am trying "heroku logs" command it is not giving any result.

The same command work when I login from network without proxy restriction. Is there anything in Heroku CLI which needs to be set to make "heroku logs" run behind corporate firewall?

Thanks for your help.

All 7 comments

we use got as a dependency which is also out of date, I might need to bump it

Hi,
I am facing the same issue with heroku logs command. I am behind firewall and able to login via "heroku login" command after setting HTTP_PROXY environment variable. I am able to execute other commands as well but whenever I am trying "heroku logs" command it is not giving any result.

The same command work when I login from network without proxy restriction. Is there anything in Heroku CLI which needs to be set to make "heroku logs" run behind corporate firewall?

Thanks for your help.

I think I found the issue. We started using SSE for logs and it wasn't setup to look at the proxy. I just pushed a potential fix. Would you mind updating to the beta with heroku update beta and trying again?

I tried updating but i have the same problem.

when i type heroku version i get:

heroku/7.4.1-beta.b93fad7 win32-x64 node-v10.4.1

Still no chance to get heroku logs --tail working via proxy?

heroku/7.27.1 win32-x64 node-v11.14.0

Same issue with heroku logs under proxy here. Any perspective for a solution?

heroku/7.35.0 win32-x64 node-v12.13.0

Same here.

heroku/7.42.13 linux-x64 node-v12.16.2
Was this page helpful?
0 / 5 - 0 ratings