Gitlab Oauth crashed after upgrade to `10.1.3`
Summary
I use jenkins with gitlab oauth plugin: https://wiki.jenkins.io/display/JENKINS/GitLab+OAuth+Plugin
And it works very well. But when I upgrade to 10.1.3
, it's failed(Also, the older version 10.1.2
works). Here is what I see:
- jenkins redirect the url to
http://my_gitlab/oauth/authorize?redirect_uri=https%3A%2F%2Fmy_jenkins%2FsecurityRealm%2FfinishLogin&response_type=code&client_id=my_clientid
- The gitlab page show 500 error.
Here is the production.log
:
Started GET "/oauth/authorize?redirect_uri=https%3A%2F%2Fmy_jenkins%2FsecurityRealm%2FfinishLogin&response_type=code&client_id=my_client_id" for hide_ip at 2017-11-14 16:28:51 +0800
Processing by Oauth::AuthorizationsController#new as HTML
Parameters: {"redirect_uri"=>"https://my_jenkins/securityRealm/finishLogin", "response_type"=>"code", "client_id"=>"my_clientid"}
Completed 500 Internal Server Error in 12ms (ActiveRecord: 1.3ms)
ActionView::Template::Error (undefined method `name' for nil:NilClass):
22: = link_to @pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer'
23: is requesting access to your GitLab account. This application was created by
24: = succeed "." do
25: = link_to auth_app_owner.name, user_path(auth_app_owner)
26: Please note that this application is not provided by GitLab and you should verify its authenticity before
27: allowing access.
28: - if @pre_auth.scopes
app/views/doorkeeper/authorizations/new.html.haml:25:in `block in _app_views_doorkeeper_authorizations_new_html_haml___266956722584813441_703178
81092900'
app/views/doorkeeper/authorizations/new.html.haml:24:in `_app_views_doorkeeper_authorizations_new_html_haml___266956722584813441_70317881092900'
app/controllers/oauth/authorizations_controller.rb:13:in `new'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
What is the current bug behavior?
Gitlab-CE Oauth crashed after upgrade to 10.1.3
.
What is the expected correct behavior?
Gitlab-CE 10.1.2
works very well.
Relevant logs and/or screenshots
Started GET "/oauth/authorize?redirect_uri=https%3A%2F%2Fmy_jenkins%2FsecurityRealm%2FfinishLogin&response_type=code&client_id=my_client_id" for hide_ip at 2017-11-14 16:28:51 +0800
Processing by Oauth::AuthorizationsController#new as HTML
Parameters: {"redirect_uri"=>"https://my_jenkins/securityRealm/finishLogin", "response_type"=>"code", "client_id"=>"my_clientid"}
Completed 500 Internal Server Error in 12ms (ActiveRecord: 1.3ms)
ActionView::Template::Error (undefined method `name' for nil:NilClass):
22: = link_to @pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer'
23: is requesting access to your GitLab account. This application was created by
24: = succeed "." do
25: = link_to auth_app_owner.name, user_path(auth_app_owner)
26: Please note that this application is not provided by GitLab and you should verify its authenticity before
27: allowing access.
28: - if @pre_auth.scopes
app/views/doorkeeper/authorizations/new.html.haml:25:in `block in _app_views_doorkeeper_authorizations_new_html_haml___266956722584813441_703178
81092900'
app/views/doorkeeper/authorizations/new.html.haml:24:in `_app_views_doorkeeper_authorizations_new_html_haml___266956722584813441_70317881092900'
app/controllers/oauth/authorizations_controller.rb:13:in `new'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
Results of GitLab environment info
System information
System: Ubuntu 16.04
Current User: git
Using RVM: no
Ruby Version: 2.3.5p376
Gem Version: 2.6.13
Bundler Version:1.13.7
Rake Version: 12.1.0
Redis Version: 3.2.5
Git Version: 2.13.6
Sidekiq Version:5.0.4
Go Version: unknown
GitLab information
Version: 10.1.2
Revision: af60a6c
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: hide
HTTP Clone URL: http://hide/some-group/some-project.git
SSH Clone URL: git@hide:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 5.9.3
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
Edited by Feng Yu (abcfy2)