Troubleshooting failed chocolatey packages
As explained in the previous section, a chocolatey package installation consists of several stages:
Initialization of the chocolatey environment and variables
Checking for existing installations of the software to be installed
Possible uninstallation of existing installations
Downloading binary files
Actual installation using the downloaded setup binaries.
Post actions to be executed after installation
Even though every stage has a chance to fail and cause the installation to abort, the highest probability for failures are in stage 3, 4 and 5.
Finding the correct error message
It is important to know that every failed installation will return standard chocolatey error stack messages, which will look similar to this:
The Access is denied
message belongs to the standard error stack of chocolatey and must be ignored. The actual error which is causing the package installation to fail is located somewhere in the previous lines of the log file. Searching for the tag [ERROR]
will help in finding the correct messages.
See how in this example the actual error happens at the top (404 for the download), but the chocolatey error stack prints some misleading 'Access is denied' messages later on.
Examples for failed installations
Errors happening during initialization
During the initialization phase, errors can happen for the following reasons:
Problem with the chocolatey installation itself (broken config, missing files):
Be careful, as this (slightly similar) message may occur in the chocolatey.log
as well, but this is safe to ignore and requires no action!
Problem with missing mandatory package arguments:
Errors happening during download
For errors involving the download of the binaries, the error message will usually include the download url containing cdn.realmjoin.com
, examples:
Errors happening during (un-)installation process
Errors occuring during the actual (un-)installation process using the downloaded binary file can best be troubleshooted using two things:
The exit code returned by the setup process.
The logfile written by the setup process, found inside
C:\WINDOWS\Logs\RealmJoin\Packages\<package-id>\
, if possibility to write log is provided by the installer.
When an MSI installer was used, the exit codes are standardized and can be looked up here. Additionally MSI installers will always write log files to the folder mentioned above. Especially when exit code 1603
was returned (generic MSI error), the MSI log file will be mandatory for troubleshooting.
Last updated