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

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

Open
opusforlife2 opened this issue Apr 1, 2022 · 13 comments · May be fixed by #954
Open

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

opusforlife2 opened this issue Apr 1, 2022 · 13 comments · May be fixed by #954
Labels
3 - Review Code has been added, and is available for review as a pull request Bug Issues where something has happened which was not expected or intended

Comments

@opusforlife2
Copy link
Contributor

opusforlife2 commented Apr 1, 2022

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.

@JohnVeness
Copy link

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...

@opusforlife2
Copy link
Contributor Author

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.

@ShowMeBillyJo
Copy link

I can reproduce this issue as well

chocolatey-double-console-output

@steviecoaster
Copy link
Contributor

I hit this the other day while testing some things.

image

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

@pauby pauby added 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue Bug Issues where something has happened which was not expected or intended 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint and removed 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue labels Aug 24, 2022
@pauby pauby added this to the 1.1.0 milestone Aug 24, 2022
@corbob corbob added 2 - Working A user or team member has started working on the issue and removed 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint labels Aug 25, 2022
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Aug 26, 2022
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Aug 26, 2022
We can't just tell it not to append the logger. If we do that, we cause a regression of 697. But we can use the instance we already have, and just backup and restore the config.
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Aug 26, 2022
@corbob corbob linked a pull request Aug 26, 2022 that will close this issue
9 tasks
@corbob corbob added 3 - Review Code has been added, and is available for review as a pull request and removed 2 - Working A user or team member has started working on the issue labels Aug 29, 2022
@gep13 gep13 modified the milestones: 1.1.0, 1.2.0 Sep 7, 2022
@DefectiveByDesign
Copy link

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.

@corbob
Copy link
Member

corbob commented Sep 12, 2022

@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: chocolatey/docs#303

@ShowMeBillyJo
Copy link

@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.

@DefectiveByDesign
Copy link

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.

@JohnVeness
Copy link

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.

@gep13 gep13 removed this from the 1.2.0 milestone Jan 25, 2023
@274188A
Copy link

274188A commented Jun 1, 2023

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

@opusforlife2
Copy link
Contributor Author

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.

@darealdemayo
Copy link

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

@oasesoftware
Copy link

oasesoftware commented Mar 13, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Review Code has been added, and is available for review as a pull request Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.