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

Closed
michelzanini opened this issue Nov 16, 2018 · 29 comments · Fixed by #171
Closed

Colors are not displayed immediately after upgrading to 0.6.0 #136

michelzanini opened this issue Nov 16, 2018 · 29 comments · Fixed by #171

Comments

@michelzanini
Copy link

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
Copy link
Member

jglick commented Nov 19, 2018

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

@reinholdfuereder
Copy link

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

@kapoorlakshya
Copy link

kapoorlakshya 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
Copy link

tlvu 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
Copy link

any update on this issue?

@dblock
Copy link
Member

dblock commented Apr 30, 2019

Waiting for your fix @e-moshaya!

@J00MZ
Copy link

J00MZ commented May 1, 2019

Still occuring.

  • Jenkins v2.174
  • AnsiColor v0.6.2

@pietervogelaar
Copy link

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
Copy link

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.

@jglick
Copy link
Member

jglick commented Jun 21, 2019

CloudBees Jenkins Enterprise 2.164.3.2-rolling

@vishmegh88 if you are a CloudBees customer, please open a support ticket.

@vishmegh88
Copy link

@jglick this plugin is a third party plugin, I opened a ticket with Cloudbees, but the best they can do is help us diagnose the problem and provide us with workarounds, which they say we can do by downgrading the plugin.

We are still facing this issue, and it hampers the our user experience and can lead to incorrect assumptions for our users.

Is there any timeline to fix this issue.

@pietervogelaar
Copy link

Downgrading the plugin doesn't work well for Blueocean.

@vishmegh88
Copy link

@pietervogelaar Haven't tried that, but what are the issues that you are seeing with blueocean after downgrading.

@JiffsMaverick
Copy link

I had same issue.

Jenkins 2.176.3
AnsiColor 0.6.2

@siwyd
Copy link

siwyd commented Sep 20, 2019

I'm experiencing the same behavior with the plugin. I regularly need to refresh the page for the colors to appear.

@DavidPerezIngeniero
Copy link

DavidPerezIngeniero commented Feb 17, 2020

I used to have version 0.5.2 and worked flawlessly.
Any workaround?

@DavidPerezIngeniero
Copy link

Reverted to version 0.5.2 and works ok. :-)

@reinholdfuereder
Copy link

@DavidPerezIngeniero IIRC the changes were necessary for (better?) support of colours in/by new/modern Blue Ocean UI; cf. @pietervogelaar's comment:

Downgrading the plugin doesn't work well for Blueocean.

@DavidPerezIngeniero
Copy link

Luckily I don't need Blue Ocean.

@jglick
Copy link
Member

jglick commented Feb 18, 2020

I can reproduce.

ColorizedAction action = ((Run) context).getAction(ColorizedAction.class);
if (action != null) {
return new ColorConsoleAnnotator(action.colorMapName);
}
return getGlobalConsoleAnnotator();
only works if you start displaying the log after the ansiColor block is entered.

@dwnusbaum
Copy link
Member

I just released 0.6.3, notably including #171, which should fix this issue, and #168 (should fix #151 and maybe some other issues that were lacking enough info to reproduce).

@Binternet
Copy link

Not working for me as well.

Jenkins 2.231
ansiColor 0.6.3

@Hello-Linux
Copy link

Me too
Jenkins 2.222
ansiColor 0.7.0

@branko77
Copy link

I have same problem
Jenkins 2.222.4
ansiColor 0.7.0

@knope
Copy link

knope commented Jun 25, 2020

Same problem
Jenkins 2.235.1
ansiColor 0.7.0

@krulls
Copy link

krulls commented Jul 2, 2020

seems like this issue should be reopened. is that even possible with github issues 🤔 ?

@dblock
Copy link
Member

dblock commented Jul 2, 2020

I reopened it since lots of people are having issues.

@dblock dblock reopened this Jul 2, 2020
@dblock
Copy link
Member

dblock commented Jul 2, 2020

Actually #193 supersedes it, please help debug the issue over there.

@dblock dblock closed this as completed Jul 2, 2020
@krulls
Copy link

krulls commented Jul 3, 2020

Actually #193 supersedes it, please help debug the issue over there.

From my POV it would be a better approach to mark #193 as a duplicate and leave #136 open since here you have a lot of participants who loose track otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet