> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/troubleshooting-and-faq/troubleshooting/package-installation-issues/fixes-for-common-issues.md).

# Fixes for common issues

Targeted fixes for common RealmJoin package installation problems, such as BranchCache errors, for specific scenarios.

{% hint style="danger" %}
**Only use these fixes in the described scenarios!**

**These are not intended to be applied blindly as they may do more harm if applied unnecessarily.**
{% endhint %}

## BranchCache issues

* Error message `There is not enough space on the disk` (may also occur localized, depending on Windows OS language) in download phase, chocolatey exit code `404`:
  1. Open an elevated PowerShell
  2. Run `Clear-BCCache -Force`
* Error message `The supplied object has not been initialized` (may also occur localized, depending on Windows OS language) in download phase, chocolatey exit code `404`:
  1. Open an elevated PowerShell
  2. Run `Reset-BC -Force`
* Error message `Error - hashes do not match. Actual value was '123abcd'`:
  1. Open an elevated PowerShell
  2. Run `Reset-BC -Force`

{% hint style="warning" %}
We strongly recommend deploying the **Reset or Clear BranchCache** Remediation Script with a daily schedule. It can be found in the [Remediation Scripts](/automation/remediation-scripts.md) section of the RealmJoin Portal.

By using this method the above mentioned BranchCache issues will proactively be detected and automatically remediated (if possible).
{% endhint %}

## Chocolatey temp folder growing

Installer files for Chocolatey packages are downloaded to `C:\Windows\Temp\chocolatey\<package-id>\<version>\` and are not removed after the installation. This applies to both the classic Chocolatey engine and the [Native Choco Runtime](/realmjoin-agent/realmjoin-client/native-choco-runtime.md). Over time, the folder can take up a considerable amount of disk space.

If you want this folder cleaned up automatically, deploy the **Chocolatey temp folder clean-up** Remediation Script from the [Remediation Scripts](/automation/remediation-scripts.md) section of the RealmJoin Portal. It removes package version folders older than 7 days.

## Missing / wrong Package arguments <a href="#user-content-missing-wrong-package-arguments" id="user-content-missing-wrong-package-arguments"></a>

1. Check the `chocolatey.log` file for the value(s) of `packageParameters` in the section `RJAppDeployToolkit: Resulting Variables`
   * These are the actual value(s) used for the installation and passed by the RealmJoin backend.
2. If they are not the value(s) you would expect, check the package assingment in the RealmJoin portal for group / user override values.

## Corrupt .nupkg file

If you see the following error in the `chocolatey.log` the .nupkg file got corrupted:

`[ERROR] - Unable to read package from path 'generic-package-id\generic-package-id.nupkg'.`

Often it can also be observed that the .nupkg file is 0 bytes in size.

Steps to fix this issue:

1. Navigate to `C:\ProgramData\chocolatey\lib`
2. Delete folder `generic-package-id`

## Broken chocolatey config <a href="#user-content-broken-chocolatey-config" id="user-content-broken-chocolatey-config"></a>

1. Delete contents of folder `C:\ProgramData\chocolatey\config`
2. Delete System Variable `ChocolateyInstall` :
   * Use GUI: Run `sysdm.cpl` -> Tab `Advanced` -> `Environment Variables...`
   * Use (admin) cmd, run: `REG delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V ChocolateyInstall`
3. Reboot
4. RealmJoin tray will reinstall chocolatey, let the system settle for 5-10 minutes.
5. If you experience missing items in the RealmJoin tray menu, reboot again.

## General Setup issues <a href="#user-content-general-setup-issues" id="user-content-general-setup-issues"></a>

**As these are very individual, this is just a collection of general troubleshooting steps to help narrow down the issue.**

* Check for log file(s) in `C:\WINDOWS\Logs\RealmJoin\Packages\<package-id>\`.
  * Try to analyze the log file(s) and find the issue.
* If no log file is present, or not helpful, try manually running the setup in GUI mode, to see possible error messages.
  * IMPORTANT: RealmJoin system packages are always installed using the built-in `NT AUTHORITY\SYSTEM` account, so it is best to use a tool like `psexec` to run the installation from that account.
  * Most of the time running the installation using a standard local admin account will provide the same error so running from `NT AUTHORITY\SYSTEM` may not be necessary.

### Package not available to install / not showing in RealmJoin tray menu <a href="#user-content-package-not-available-to-install-not-showing-in-realmjoin-tray-menu" id="user-content-package-not-available-to-install-not-showing-in-realmjoin-tray-menu"></a>

* Check if package is correctly assigned to user or user is member of assigned group
* Check if package is not assigned hidden (use Debug Mode to see hidden assigned packages)
* Check if user is primary user of the client, alternatively check if package is configured to be available to secondary users


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/troubleshooting-and-faq/troubleshooting/package-installation-issues/fixes-for-common-issues.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
