Choco: Choco output says "See logs for details" but doesn't indicate where those logs are located

Created on 2 Oct 2017  路  13Comments  路  Source: chocolatey/choco

I'm posting this issue mostly as grounds for a PR that I can contribute to adjust it.

I searched around but couldn't find any issues that currently exist for this.

Reproduction Steps

  • Run choco upgrade on a package that fails (my current example is RDCMan, which is failing for me with error 1603 -- irrelevant here though.
  • See the error message in the log
  • See a message that says "See log for details".

Expected behavior: See the location of the log files
Actual Behavior: Only see the generic "see log for details" message.

Example of Error Encountered

Error while running 'C:\ProgramData\chocolatey\lib\rdcman\tools\chocolateyInstall.ps1'. See log for details.

Source of Message

https://github.com/chocolatey/choco/blob/0906be845e938b5deb610800f248fffabd9feca0/src/chocolatey/infrastructure.app/services/PowershellService.cs#L316

Fix Steps (I think)

This is what I'll be planning for my PR:

  • Understand how to obtain the log locations for chocolatey itself
  • Understand how to detect MSI or other logs emitted from packages, in case those logs would help.
  • Updating the format of the chocolatey error message to provide the log location(s) identified.
  • Tests to go along with it.
0 - Backlog

Most helpful comment

this is still hapening

All 13 comments

  • Understand how to obtain the log locations for chocolatey itself

That message is captured at that location, but it shows up at the end summary right next to the location of the Chocolatey log file in the summary:

https://github.com/chocolatey/choco/blob/0906be845e938b5deb610800f248fffabd9feca0/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs#L821-L830

  • Understand how to detect MSI or other logs emitted from packages, in case those logs would help.
  • Updating the format of the chocolatey error message to provide the log location(s) identified.

These could be helpful!

I'm having the same problem, but then during automated validation. The chocolatey package installs fine when run from file and when running the MSI. But automated validation reports:

/norestart /l*v "C:\Users\Administrator\AppData\Local\Temp\chocolatey\invantive-estate-for-outlook-17.10.7-msi-install.log" ] exited with '1603'. 2017-10-11 17:57:56,300 2716 [ERROR] - ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\Administrator\AppData\Local\Temp\chocolatey\invantive-estate-for-outlook\17.10.7\Invantive Estate for Outlook-17.10.7.msi" /qn /norestart /l*v "C:\Users\Administrator\AppData\Local\Temp\chocolatey\invantive-estate-for-outlook-17.10.7-msi-install.log" ] was not successful. Exit code was '1603'. See log for possible error messages. at Start-ChocolateyProcessAsAdmin, C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1: line 276 at Install-ChocolateyInstallPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyInstallPackage.ps1: line 271 at Install-ChocolateyPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyPackage.ps1: line 336 at <ScriptBlock>, C:\ProgramData\chocolatey\lib\invantive-estate-for-outlook\tools\chocolateyinstall.ps1: line 19 at <ScriptBlock>, C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1: line 48 at <ScriptBlock>, <No file>: line 1

After that it reports:
Chocolatey installed 4/6 packages. 2 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

I've tried adding dotnet4.7 as dependency (which is correct), but didn't help.

I think the contents of C:\ProgramData\chocolatey\logs\chocolatey.log might easily be inserted into the logging of the automatic validation (not volunteering, just getting started with chocolatey).

Or even better that you could instruct the ps1 to output what log files itself created and that these would get inserted too.

For now, I will have to change our MSIs to log directly to a mother ship their problems.

@monty241 1603 - generic error (many times it is a pending restart).

@ferventcoder I am aware of the very generic nature of 1603, but how can I get it automated tested / resolved when not sure?

@monty241 well one way would be to install what you think is the dependency, reboot, then install the software/package.

Other than that, it would be just trial and error (unless the MSI logs mention something else, which I doubt)

@AdmiringWorm The installation on internal test devices across a range of Windows platforms (server and desktop editions) run fine (no 1603, silent mode). Only the automated tests when you upload a package are giving me a headache in terms of debugging what the issue is.

Now I would have to add an comment based upon this:

If the verifier is incompatible with the package, please log in and leave a review comment if the package needs to bypass testing (e.g. package installs specific drivers).

But that introduces extra work for the moderators. I prefer to be only once the famous pain during initial problem solving, instead of hindering the moderators with every new version.

Exemption from testing is a once thing.

Ah great, that saves time for the moderators. I will have them skip now the tests. Maybe some day the chocolatey.log can be added to the gist :-)

Suggestion to change the following text:

`If the verifier is incompatible with the package, please log in and leave a review comment if the package needs to bypass testing (e.g. package installs specific drivers).

to

Please log in and leave a review comment requesting to have automatic testing skipped If the verifier is known to be incompatible with the package (e.g. package installs specific drivers). Once automatic testing is skipped, this also applies to new versions of the same package.

@SeanKilleen is there a reason that you closed this issue?

this is still hapening

Just reopened this since this has not yet been implemented.

c.f. https://github.com/chocolatey/choco/issues/187 also about the same request, and has people say it is still happening. Perhaps it has been done in some parts of the codebase and not others.

Was this page helpful?
0 / 5 - 0 ratings