Defect #4292

NoMethodError (undefined method `length' for nil:NilClass) after upgrading

Added by Tiago Alves almost 10 years ago. Updated almost 8 years ago.

Status:ClosedStart date:2009-11-25
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Fixed Affected version:

Description

As described by Stefan Kesberg at http://www.redmine.org/boards/2/topics/9757, after upgrading to the latest revision in the trunk (r3092 in my case) you get an error when trying to open redmine in the browser if you had a valid session of a previous redmine version (0.8.7 in my case).

As Phil Hord explains in the same thread, the error goes away if you clear your redmine cookies in your browser. Anyway, this situation should not occur.

The stacktrace follows:

Processing WelcomeController#index (for x.x.x.x at 2009-11-25 18:27:09) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}

NoMethodError (undefined method `length' for nil:NilClass):
app/controllers/application_controller.rb:48:in `find_current_user'
app/controllers/application_controller.rb:42:in `user_setup'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering /opt/redmine_trunk/public/500.html (500 Internal Server Error)

Associated revisions

Revision 3093
Added by Jean-Philippe Lang almost 10 years ago

Remove broken cookies after upgrade from 0.8.x to prevent an error from Rails (#4292).

History

#1 Updated by Jean-Philippe Lang almost 10 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Actually, it's a Rails defect:
https://rails.lighthouseapp.com/projects/8994/tickets/3360

Workaround added in r3093...

#2 Updated by Clement Bailey almost 8 years ago

SPAM

Also available in: Atom PDF