jbbarth / redmine_omniauth_cas

CAS authentication plugin for Redmine through OmniAuth
MIT License
19 stars 14 forks source link

NoMethodError raise Error 500 #8

Closed mmackiew closed 11 years ago

mmackiew commented 11 years ago

Here's Redmine Log:

Started GET "/login?back_url=https%3A%2F%2Fdi.wsb.poznan.pl%2F" for 150.254.194.88 at Fri Mar 01 03:41:40 -0500 2013 Processing by AccountController#login as HTML Parameters: {"back_url"=>"https://di.wsb.poznan.pl/"} Current user: anonymous Redirected to https://di.wsb.poznan.pl/auth/cas?origin=https%3A%2F%2Fdi.wsb.poznan.pl%2F Completed 302 Found in 38ms (ActiveRecord: 1.8ms) Started GET "/auth/cas?origin=https%3A%2F%2Fdi.wsb.poznan.pl%2F" for 150.254.194.88 at Fri Mar 01 03:41:40 -0500 2013 Started GET "/auth/cas/callback?origin=https%3A%2F%2Fdi.wsb.poznan.pl%2F&ticket=ST-1901879-1BFUaiUNKIxWtaojgzsg-cas" for 150.254.194.88 at Fri Mar 01 03:41:48 -0500 2013 Processing by AccountController#login_with_cas_callback as HTML Parameters: {"origin"=>"https://di.wsb.poznan.pl/", "provider"=>"cas", "ticket"=>"ST-1901879-1BFUaiUNKIxWtaojgzsg-cas"} Current user: anonymous Successful authentication for 'a_poznan' from 150.254.194.88 at Fri Mar 01 08:41:49 UTC 2013 Redirected to https://di.wsb.poznan.pl/ Completed 302 Found in 59ms (ActiveRecord: 22.3ms)

NoMethodError (undefined method options' for #<Hash:0x7fcfe626cbf0>): rack (1.5.2) lib/rack/session/abstract/id.rb:329:incommit_session' rack (1.5.2) lib/rack/session/abstract/id.rb:226:in context' rack (1.5.2) lib/rack/session/abstract/id.rb:220:incall' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/cookies.rb:341:in call' /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:64:incall' /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:479:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/callbacks.rb:28:incall' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in _run__1252210014__call__4__callbacks' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:insend' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in __run_callback' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:385:in_run_call_callbacks' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:in send' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:inrun_callbacks' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/callbacks.rb:27:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/remote_ip.rb:31:incall' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/debug_exceptions.rb:16:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/show_exceptions.rb:56:incall' /usr/lib/ruby/vendor_ruby/rails/rack/logger.rb:32:in call_app' /usr/lib/ruby/vendor_ruby/rails/rack/logger.rb:16:incall' /usr/lib/ruby/vendor_ruby/active_support/tagged_logging.rb:22:in tagged' /usr/lib/ruby/vendor_ruby/rails/rack/logger.rb:16:incall' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/request_id.rb:22:in call' rack (1.5.2) lib/rack/methodoverride.rb:21:incall' rack (1.5.2) lib/rack/runtime.rb:17:in call' /usr/lib/ruby/vendor_ruby/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.5.2) lib/rack/lock.rb:17:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/static.rb:62:incall' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:136:in forward' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:245:infetch' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:185:in lookup' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:66:incall!' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:51:in call' /usr/lib/ruby/vendor_ruby/rails/engine.rb:479:incall' /usr/lib/ruby/vendor_ruby/rails/application.rb:223:in call' /usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:insend' /usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in method_missing' /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/request_handler.rb:96:inprocess_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:516:in accept_and_process_next_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:274:inmain_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:321:in start_request_handler' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:275:insend' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:275:in handle_spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:479:insafe_fork' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:270:in handle_spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:insend' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in server_main_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:instart_synchronously' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:180:in start' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:149:instart' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:219:in spawn_rails_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:132:inlookup_or_add' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:214:in spawn_rails_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:82:insynchronize' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:79:in synchronize' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:213:inspawn_rails_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:132:in spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in __send__' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:inserver_main_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99

Serwer url: https://portal.wsb.pl/cas Validate link: blank CAS version 2

Environment: Redmine version 2.2.3.stable Ruby version 1.8.7 (x86_64-linux) Rails version 3.2.12 Environment production Database adapter PostgreSQL Redmine plugins: redmine_omniauth_cas 0.1.1

Everything's fine except Redmine throws NoMethodError options... How fix it?

jbbarth commented 11 years ago

Is there any chance you create me a test account on your CAS server so I can investigate on a test platform ? I won't be at home til next thursday but I can work on it next week-end. If you can, please email me credentials at jeanbaptiste.barth (at) gmail (dot) com. Thanks!

mmackiew commented 11 years ago

Thank's for respond. Test user access sended from marcin.mackiewicz (at) wsb (dot) poznan (dot) pl

jbbarth commented 11 years ago

Hi, sorry I didn't come back here before.

Thanks a lot for the test account, but unfortunately, I wasn't able to reproduce the bug either on Redmine 2.1.6 or Redmine 2.2.3. Both on Postgresql, latest version of redmine_omniauth_cas.

However, there's something strange in the log you provided: your rails version is 3.2.12, which comes with actionpack v3.2.12, which depends on rack "~> 1.4.5". If I'm not mistaken, it means you cannot run this version of rails with rack 1.5.2, which is the version that pops up in your stack trace. As the error is thrown by rack directly, you might want to downgrade rack to 1.4.5 (gem install rack -v=1.4.5 and then gem uninstall rack -v=1.5.2). The recommended way to run a rails app nowadays is to prefix commands with "bundle exec", which ensures you only run compatible version of the gems. Maybe you did that right, but it's worth a check I think.

If the problem persists, the problem is probably on my plugin side. I'm not very good at version numbers so "0.1.1" just means you have a version after a certain commit. I bumped to "0.1.2", could you try to reinstall the plugin and tell me if the problem persists ?

Thanks for your time

jbbarth commented 11 years ago

(oh and make sure to do a bundle check or bundle install after you made the changes to your gems..)

mmackiew commented 11 years ago

Thank u so much. It's working just fine now. You've right about rack version. I installed app from debian package using guide published on redmine.org wiki (because don't know anything about ruby) so cat miss that.