Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors are not displayed immediately after upgrading to 0.6.0 #136

Open
michelzanini opened this issue Nov 16, 2018 · 9 comments

Comments

Projects
None yet
10 participants
@michelzanini
Copy link

commented Nov 16, 2018

Test environment

  • Jenkins Version: 2.151
  • AnsiColor Version: 0.6.0
  • Hostsystem: Linux

Expected behavior

When a pipeline build is triggered, if I immediately open the logs as soon as I trigger Build Now, the colors for that build won't appear while I am tailing the logs on Jenkins.
If I press back on the browser, open the same build logs again, the logs appear in colors.
I am using a declarative pipeline and using ansiColor('xterm') inside options.

Actual behavior

The colors should appear always. Reverting the plugin to 0.5.3 fixes the issue.

Steps to reproduce the behavior

Create a pipeline with ansiColor('xterm') inside options.
Press build now and go fast to Console output. I believe you need to get there before the ansiColor option is executed.
The logs won't display colors anymore. It will display again if you go back and open logs a second time.

@jglick

This comment has been minimized.

Copy link
Member

commented Nov 19, 2018

Presumably related to #132. I had not observed anything like this.

@reinholdfuereder

This comment has been minimized.

Copy link

commented Nov 22, 2018

I have to confirm this issue: refreshing the console log (in classic UI) e.g. via pressing F5 is necessary.

@kapoorlakshya

This comment has been minimized.

Copy link

commented Feb 4, 2019

Hi, I am also experiencing this when using Cucumber and plugin version 0.6.2 (latest). I see the control characters and no colors in the console output as the text shows up. However, when I refresh the page the control characters disappear and the text shows up in color.

This behavior is not experienced in v0.5.3. Also, this only happens in the classic console output and not in the Blue Ocean view.

Before refresh:

image

After page refresh:

image

Raw output:

�[32mAnd I access the '�[32m�[1mSearch�[0m�[0m�[32m' �[32m�[1mtab�[0m�[0m�[32m�[90m

Pipeline code:

steps {
  ansiColor('xterm') {
    dir(path: 'cucumber-watir') {
      bat(script: 'bundle exec cucumber -t %tags% -f json -o cucumber.json -f pretty --color --expand')
    }
  }
}
@tlvu

This comment has been minimized.

Copy link

commented Mar 1, 2019

I have current latest Jenkins LTS 2.150.3 with AnsiColor 0.6.2 and I also observe same behavior as @kapoorlakshya . Before refresh I see control characters and no colors. After refresh the colors are displayed properly, no garbage control character. In classic console output. Preferred classic console to the new blue ocean so did not even install the blue ocean.

@e-moshaya

This comment has been minimized.

Copy link

commented Apr 30, 2019

any update on this issue?

@dblock

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

Waiting for your fix @e-moshaya!

@J00MZ

This comment has been minimized.

Copy link

commented May 1, 2019

Still occuring.

  • Jenkins v2.174
  • AnsiColor v0.6.2
@pietervogelaar

This comment has been minimized.

Copy link

commented Jun 12, 2019

If a job starts and I reload the page before about 5 seconds, the page is still not colorized. If I wait about 10 seconds before reload, than it's indeed colorized. So it looks like a race condition or a problem with the timing of the ansi color plugin initialization.

@vishmegh88

This comment has been minimized.

Copy link

commented Jun 17, 2019

We are still seeing the issue with 0.6.2 version of plugin and CloudBees Jenkins Enterprise 2.164.3.2-rolling.

Steps to Repro are same as above. After refreshing the page colors appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.