Aborted request to mini-profiler-resources/results


#1

Hi, I have issue with miniprofiler. Firebug console shows that requests to mini-profiler-resources/results are aborted.

My rails version is 3.2.1 and my ruby version is 1.9.3p125.

Error from log:

!! Unexpected error while processing request: undefined method `has_key?' for nil:NilClass

Screenshots:

alt text


#2

any way you can get me a full stack trace? sometimes you need thin or mongrel if passenger is aborting stuff.


#3

Here is backtrace from mongrel:

2012-08-01 12:51:13 +0300: Read error: #<NoMethodError: undefined method `has_key?' for nil:NilClass>
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl/json_gem/encoding.rb:23:in `generate'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/timer_struct.rb:25:in `to_json'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl.rb:72:in `encode'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl.rb:72:in `encode'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl/json_gem/encoding.rb:27:in `generate'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/page_timer_struct.rb:48:in `to_json'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/profiler.rb:127:in `serve_results'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/profiler.rb:149:in `serve_html'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/profiler.rb:201:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/mongrel.rb:77:in `process'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:165:in `block in process_client'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:164:in `each'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:164:in `process_client'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:291:in `block (2 levels) in run'

#4

aha … I never tested with yajl (the super fast json serializer) will add a few tests for that. could be an incompatibility


#5

aha … I never tested with yajl (the super fast json serializer) will add a few tests for that. could be an incompatibility


#6

Can you test this with the latest release, it should be fixed


#7

Thanks, it works now!


#8

can you test on latest?


#9

@sam

╰─➤ bundle show rack-mini-profiler
vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9

same issue, log:

!! Unexpected error while processing request: undefined method `has_key?’ for nil:NilClass


#10

Is this still the case in latest?


#11

I don’t have any appropriate environment to test that. Sorry.