ChocolateyGUI icon indicating copy to clipboard operation
ChocolateyGUI copied to clipboard

Multiple duplicate lines in choco console UI (but not log file)

Open opusforlife2 opened this issue 2 years ago • 13 comments

What You Are Seeing?

When installing or updating a package, the console often shows multiple (2 or 3) duplicates of the log messages that show after the Exporting function, Importing function, and Importing alias lines.

One example:

[INFO ] - VERBOSE: Refreshing environment variables from the registry.
[INFO ] - VERBOSE: Refreshing environment variables from the registry.
[INFO ] - VERBOSE: Refreshing environment variables from the registry.
[INFO ] - VERBOSE: Refreshing environment variables from the registry.
[INFO ] - Restricting write permissions to Administrators
[INFO ] - Restricting write permissions to Administrators
[INFO ] - Restricting write permissions to Administrators
[INFO ] - Restricting write permissions to Administrators
[INFO ] - We are setting up the Chocolatey package repository.
[INFO ] - We are setting up the Chocolatey package repository.
[INFO ] - We are setting up the Chocolatey package repository.
[INFO ] - We are setting up the Chocolatey package repository.

What is Expected?

Each line should only show up once.

How Did You Get This To Happen? (Steps to Reproduce)

  1. Turn on "Show console output".
  2. Install or update any package.
  3. Notice the ongoing log, especially after the "Exporting/Importing function" messages.

System Details

  • OS Build: Windows 7
  • Windows PowerShell version: The ChocolateyGUI inbuilt one
  • Chocolatey version: The example I used above happened when upgrading from 1.0.1 to 1.1.0

Output Log

N/A - The log file correctly shows only one line for each message. This seems to be a UI problem only.

opusforlife2 avatar Apr 01 '22 20:04 opusforlife2

I've been seeing this a lot in recent weeks. I'm using Windows 10, with Chocolatey 1.10 and ChocolateyGUI 1.0.0.0.

It worries me when I see things like the below, as it looks like it's downloading and installing twice:

Downloading libreoffice-fresh 64 bit
  from 'https://download.documentfoundation.org/libreoffice/stable/7.3.2/win/x86_64/LibreOffice_7.3.2_Win_x64.msi'
Downloading libreoffice-fresh 64 bit
  from 'https://download.documentfoundation.org/libreoffice/stable/7.3.2/win/x86_64/LibreOffice_7.3.2_Win_x64.msi'


Download of LibreOffice_7.3.2_Win_x64.msi (332.01 MB) completed.
Download of LibreOffice_7.3.2_Win_x64.msi (332.01 MB) completed.
Installing libreoffice-fresh...
Installing libreoffice-fresh...

JohnVeness avatar Apr 14 '22 16:04 JohnVeness

It worries me when I see things like the below, as it looks like it's downloading and installing twice:

Indeed. That was the very reason my attention was grabbed by this bug. Downloading 600+ MB instead of 300+ MB would have been a huge waste of data. It was only after browsing the log that I realised this was not the case.

opusforlife2 avatar Apr 14 '22 20:04 opusforlife2

I can reproduce this issue as well

chocolatey-double-console-output

ShowMeBillyJo avatar Aug 05 '22 15:08 ShowMeBillyJo

I hit this the other day while testing some things.

image

@gep13 want me to do anything here to bring this issue up?

steviecoaster avatar Aug 11 '22 13:08 steviecoaster

Has this been fixed yet? Here's some more info on this bug: The duplicate lines increase every time you install Chocolatey GUI. I got 3 lines after the latest update, uninstalled the GUI, reinstalled the GUI, now I have 4 lines duplicated. This perhaps isn't just a bug with the program, but possibly some resident config setting that doesn't get cleaned, and duplicates itself every time you install the GUI. I don't know where these settings are hidden, so I have no idea how to clean them myself.

DefectiveByDesign avatar Sep 12 '22 03:09 DefectiveByDesign

@DefectiveByDesign unfortunately although we had hoped to get this fix into 1.1.0, the change I made in PR #954 introduced an even bigger and worse bug (in a certain scenario you lost all logging and all console output). However, knowing that the number of duplicate lines increases is good information. As for where the config is stored, we don't currently have it documented officially, but some of them are captured in a docs issue here: https://github.com/chocolatey/docs/issues/303

corbob avatar Sep 12 '22 21:09 corbob

@DefectiveByDesign You might be onto something. I'm 85–90% certain I've also un/reinstalled ChocolateyGUI in the past. It would've been a while back, though, hence the uncertainty.

ShowMeBillyJo avatar Sep 12 '22 21:09 ShowMeBillyJo

It isn't just reinstalling, billyjo, simply updating to a new version will do it. As for the config files, is it safe to delete them? What would be the protocol for a clean uninstall / reinstall? I don't really understand the reasoning behind chocolatey not having a clean uninstall. This behavior is well known to be problematic with various software. Drivers for instance, created a need for DDU, and there are various uninstall tools, which some charge money for, that will monitor software installation to do "true" uninstallation. Some other programs I've known to need special cleaning has been various DRM, virtual CD software with drivers, motherboard utilities like Asus, Dell bloatware. There used to be stuff like PC decrapifier, which I think is no longer supported, but the need still exists. I shouldn't have to wipe the OS to fix software that doesn't uninstall properly.

Recently, updates in general seem to be a problem with chocolately, more than years ago. Many programs refuse to update. I have to uninstall them and reinstall, instead of using the update function. Sometimes the update function breaks the program even if it installs, like LibreOffice, which would load the writer then crash, which I fixed by uninstalling / reinstall. These problems don't exist with the old fashioned update process, just when using chocolatey, and it isn't with all updates either, so maybe the majority updates, but you're always left with a couple that don't. Kinda defeats the purpose.

DefectiveByDesign avatar Sep 13 '22 02:09 DefectiveByDesign

The duplicate lines increase every time you install Chocolatey GUI.

I'm not denying whether or not the above is true, but for interest I have just installed Chocolatey and Chocolatey-GUI onto a brand-new Windows 11 laptop, used Chocolatey-GUI to install Firefox and saw duplicate lines (2 lines) immediately.

JohnVeness avatar Oct 11 '22 17:10 JohnVeness

The duplicate lines increase every time you install Chocolatey GUI.

I'm not denying whether or not the above is true, but for interest I have just installed Chocolatey and Chocolatey-GUI onto a brand-new Windows 11 laptop, used Chocolatey-GUI to install Firefox and saw duplicate lines (2 lines) immediately.

This has been going on for years - duplicate output lines....

image

274188A avatar Jun 01 '23 06:06 274188A

I was bulk installing packages using choco CLI (not GUI) just now, and I encountered a similar problem, which may or may not be connected: the Progress: Download... 100% log line kept increasing by one with each successive package being installed. So when the 25th package was finished downloading, there were 25 duplicate download log lines shown.

This only happened after the download reached 100%. While it was ongoing, there was only one log line present on screen. Also, the line kept flickering rapidly while the progress was being updated.

Moreover, this only occurred for the bulk install process when using packages.config. Despite being in the same Powershell session, installing a single package by name did not cause this bug.

If this is a separate bug, I can open an issue in the main choco repo.

opusforlife2 avatar Jul 15 '23 04:07 opusforlife2

duplicate lines still exist with current versions of chocolatey and GUI on win10

darealdemayo avatar Feb 14 '24 02:02 darealdemayo

I'm running on chocolatey 2.2.2 and chocolateygui 2.1.0 and also have this multiple line output issue. Is there a time-frame when this bug is solved, or for the first response, are only the log messages multyplied or are even the downloads and install proccesses multyplied?

oasesoftware avatar Mar 13 '24 10:03 oasesoftware