heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 382 forks source link

`heroku local` truncating Rails backtrace #1815

Open dominic opened 9 years ago

dominic commented 9 years ago

Pretty standard exception in Rails is getting absolutely mangled by heroku local/forego:

web.1  | Started POST "/admin/phases/1/tracks/2/order" for ::1 at 2015-11-12 16:41:39 -0800
web.1  | Processing by Admin::TracksController#order as */*
web.1  |   AdminUser Load (0.4ms)  SELECT  "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = $1  ORDER BY "admin_users"."id" ASC LIMIT 1  [["id", 1]]
web.1  | Completed 500 Internal Server Error in 130ms (ActiveRecord: 0.4ms)
web.1  | 
web.1  | rer/renderer.rb:42:in `render_template'
web.1  | pack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
web.1  | le'
web.1  | ck (4.2.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
web.1  | b/action_dispatch/routing/route_set.rb:821:in `call'
web.1  | 377:in `call'
web.1  | 
web.1  | sers/dominic/.rubies/ruby-2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
web.1  |   Rendered /Users/dominic/.gem/ruby/2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb (0.8ms)
web.1  | Cannot render console with content type application/jsonAllowed content types: [#<Mime::Type:0x007fcc92b18f08 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html">, #<Mime::Type:0x007fcc92b18af8 @synonyms=[], @symbol=:text, @string="text/plain">, #<Mime::Type:0x007fcc92b710e0 @synonyms=[], @symbol=:url_encoded_form, @string="application/x-www-form-urlencoded">]

Using Rails 4.2.4 and not much else that could be weird. Outputs complete backtrace when run via rails s or foreman start.

Possibly related to https://github.com/ddollar/forego/issues/62 ? I didn't see a strong connection beyond output issues.

jdx commented 9 years ago

Very odd. I don't think it's related. This seems like rails might be looking at the terminal width or something? Can you try it with foreman?

dominic commented 9 years ago

Installing and running foreman from the gem works totally as expected.

creade commented 8 years ago

I'm seeing the same thing on a flask app:

forego | starting web.1 on port 5000
web.1  | [2016-01-27 10:22:34 -0800] [14241] [INFO] Starting gunicorn 19.3.0
web.1  | [2016-01-27 10:22:34 -0800] [14241] [INFO] Listening at: http://0.0.0.0:5000 (14241)
web.1  | [2016-01-27 10:22:34 -0800] [14241] [INFO] Using worker: sync
web.1  | [2016-01-27 10:22:34 -0800] [14244] [INFO] Booting worker with pid: 14244
web.1  | [2016-01-27 10:22:34 -0800] [14245] [INFO] Booting worker with pid: 14245
web.1  | [2016-01-27 10:22:35 -0800] [14246] [INFO] Booting worker with pid: 14246
web.1  | [2016-01-27 10:22:35 -0800] [14244] [ERROR] Exception in worker process:
web.1  | site-packages/gunicorn/app/wsgiapp.py", line 65, in load
web.1  | t/cpt/department/views.py", line 4, in <module>
web.1  | ate_constructor
web.1  | /Users/chrisreade/.virtualenvs/cpt/lib/python3.4/site-packages/sqlalchemy/orm/relationships.py", line 1573, in _process_dependent_arguments
web.1  |  'user_department_relationship_table' is not defined
web.1  | line 355, in import_app
web.1  | efaults:
web.1  | configure_mappers()
web.1  | f.arg, n.args[0], self.cls)
web.1  | [2016-01-27 10:22:35 -0800] [14244] [INFO] Worker exiting (pid: 14244)
web.1  | [2016-01-27 10:22:35 -0800] [14245] [ERROR] Exception in worker process:
web.1  | site-packages/gunicorn/app/wsgiapp.py", line 65, in load
web.1  | t/cpt/department/views.py", line 4, in <module>
web.1  | ate_constructor

foreman works as expected though.

NoxHarmonium commented 8 years ago

I am getting this with Node.js also.

worker.1 | Warning: a promise was created in a handler but was not returned from it
worker.1 | :77:13)

Very strange.