# Troubleshooting applications

In certain cases, an application might become unresponsive, unstable or unable to start. This might be due to:

* An application-level problem (e.g. RStudio can freeze the browser if outputting too much information)
* A configuration issue
* A problem occurring after installing extensions or software packages

Nuvolos offers the following features to recover from such scenarios:

### Clearing user application settings <a href="#clearing-user-application-settings" id="clearing-user-application-settings"></a>

If an application is not launching, freezing or otherwise misbehaving (e.g. has wrong screen resolution), the first thing to try is to clear user application settings. Most applications store settings and configuration files in the **HOME area** of the user, which can be cleared in Nuvolos:

1. Navigate to the space containing the instance.
2. Navigate to the instance containing the application.
3. Make sure you are in the **Current state**.
4. On the sidebar click the Screen button (**Applications**), which shows you the Application list.
5. On the row of the application of interest, click **...** under **Actions**.
6. Click **CLEAR SETTINGS** from the dropdown.

### Factory reset the application

Sometimes an application won't launch due to changes in the application's files that clearing the settings folder in the **HOME area** cannot resolve. Examples:

* Updating Python packages to incompatible versions that prevent the core application libraries (e.g. jupyter) to function properly,
* corruption of file contents due to concurrent writes.

Nuvolos has a 'Factory reset' feature for applications. It clears the application's **LIBRARY area** clean, as if the application has been installed fresh. This can be particularly useful in a teaching scenario, where students cannot install new applications themselves, as a way to fix a broken environment.

1. Navigate to the space containing the instance.
2. Navigate to the instance containing the application.
3. Make sure you are in the **Current state**.
4. On the sidebar click the Screen button (**Applications**), which shows you the Application list.
5. On the row of the application of interest, click **...** under **Actions**.
6. Click **FACTORY RESET** from the dropdown.

{% hint style="info" %}
Note that **Clear settings** and **Factory reset** are complementary features. The former only affects files in the **HOME area** of the user triggering the action, while the latter affects the files in the application's LIB area, having impact on all users working in the instance.
{% endhint %}

### Restore application libraries <a href="#restore-application-libraries" id="restore-application-libraries"></a>

In certain cases, installing an application package / library / add-on can adversely impact the behavior of an application (e.g. not being able to execute a code or launch the application at all). In this case, try restoring the application from a snapshot that contains a still working version of the application:

1. Navigate to the space containing the instance.
2. Navigate to the instance containing the application.
3. Stop the application you wish to restore.
4. Open the [snapshot](/features/nuvolos-basic-concepts/snapshots.md) from the snapshot view.
5. On the sidebar click the Screen button (**Applications**), which shows you the Application list.
6. [Stage](/features/object-distribution.md#distributing-a-selected-list-of-items) the application for distribution.
7. Start a distribution to the same instance, which will overwrite the current state with the packages from the snapshotted version.
8. Once the distribution is complete, restart the application.

{% hint style="info" %}
In a **course space**, it is also possible to re-distribute an application from the Distributed instance to a student instance. This can be done by students themselves, with the same steps as above, except the application is staged in the Distributed instance, and the target is the student instance.\
\
This makes it possible to revert to the state shared by the instructor and to reinstall/rescue a deleted application in a student instance.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nuvolos.com/features/applications/troubleshooting-applications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
