Skip to content

Error 500 on GET trace.json?state=undefined on build with: ArgumentError (invalid base64)

Summary

Get Error 500 when looking at a build, with "something went wrong on our end." in browser.

Steps to reproduce

Retry a build job and look at it. Job state is pending, i have a "blank" console output embedded in pipeline page and some seconds later "something went wrong on our end."

If i reload the page i can see outpout console normaly.

Expected behavior

See the output console of build

Actual behavior

Get Error 500 when looking at a build, with "something went wrong on our end." in browser.

Relevant logs and/or screenshots

Started POST "/ci/api/v1/builds/register.json" for 127.0.0.1 at 2016-11-18 14:28:32 +0100
Started POST "/ci/api/v1/builds/register.json" for 127.0.0.1 at 2016-11-18 14:28:35 +0100
Started GET "/ansible/apache24-php7-fpm/builds/35/trace.json?state=undefined" for 193.252.149.198 at 2016-11-18 14:28:35 +0100
Processing by Projects::BuildsController#trace as JSON
  Parameters: {"state"=>"undefined", "namespace_id"=>"ansible", "project_id"=>"apache24-php7-fpm", "id"=>"35"}
Completed 500 Internal Server Error in 70ms (ActiveRecord: 6.2ms)

ArgumentError (invalid base64):
  lib/ci/ansi2html.rb:200:in `restore_state'
  lib/ci/ansi2html.rb:93:in `convert'
  lib/ci/ansi2html.rb:27:in `convert'
  app/models/ci/build.rb:143:in `trace_with_state'
  app/controllers/projects/builds_controller.rb:51:in `block (2 levels) in trace'
  app/controllers/projects/builds_controller.rb:48:in `trace'
  lib/gitlab/request_profiler/middleware.rb:15:in `call'
  lib/gitlab/middleware/go.rb:16:in `call' 

Output of checks

Results of GitLab application Check

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
(in /home/git/gitlab)
Checking GitLab Shell ...

GitLab Shell version >= 4.0.0 ? ... OK (4.0.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
4/1 ... ok
3/2 ... repository is empty
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /home/git/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
Init script exists? ... yes
Init script up-to-date? ... no
  Try fixing it:
  Redownload the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
projects have namespace: ...
4/1 ... yes
3/2 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/usr/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 2

Checking GitLab ... Finished

Results of GitLab environment info

System information
System:         Ubuntu 16.04
Current User:   git
Using RVM:      no
Ruby Version:   2.3.1p112
Gem Version:    2.5.1
Bundler Version:1.13.6
Rake Version:   10.5.0
Sidekiq Version:4.2.1

GitLab information
Version:        8.14.0-rc2
Revision:       e3e9cab
Directory:      /home/git/gitlab
DB Adapter:     postgresql
URL:            http://gitlab.lea-linux.com
HTTP Clone URL: http://gitlab.lea-linux.com/some-group/some-project.git
SSH Clone URL:  git@gitlab.lea-linux.com:some-group/some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        4.0.0
Repository storage paths:
- default:      /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git