===============
Troubleshooting
===============

* :ref:`fusion_no_load`
* :ref:`fusion_valid_license`
* :ref:`fusion_no_notebooks`
* :ref:`fusion_notebooks_copy`
* :ref:`fusion_install_win_manually`
* :ref:`fusion_register_catalog_win`
* :ref:`fusion_firsttime_filenotfound`

.. _fusion_no_load:

Fusion loading issue after activation
=====================================

.. figure:: /img/fusion_not_running_page.png
    :width: 50%

|

If you encounter a loading issue after activating Fusion, it is most likely
because the Fusion service server cannot be reached at the time that the Add-in
is activated.

In order to resolve this issue, please check that the Fusion service has started
and is running correctly.

.. _fusion_valid_license:

Fusion asks for a valid license every time the Add-in is loaded
===============================================================

MS Excel has a strong web cache policy that can sometimes redirect Add-ins
requests to its own cache. It does not send the Add-in activation request to
Fusion to serve the Add-in service, but instead loads the last Add-in page that
was available when it was activated.

To fix this behavior on a macOS:

#. In a Finder window, go to ``~/Library/Containers/com.Microsoft.OsfWebHost/Data/Library/Caches``.

#. In the Caches folder, delete the ``com.Microsoft.OsfWebHost`` folder.

`Source  <http://stackoverflow.com/questions/38248350/how-to-clear-client-side-browser-cache-for-excel-2016-task-pane-add-in-on-mac>`_

.. _fusion_no_notebooks:

No notebooks are displayed in your notebooks list
=================================================

If your Notebooks are not being displayed in your notebooks list:

#. Verify that the notebooks files are in the Fusion notebooks folder--by default, the user home folder is ``~/AnacondaFusion/notebooks``.

#. Verify that the notebooks are correctly being served at https://localhost:9888/.

#. If both of the folders mentioned in the steps above contain the correct notebook files, please check your Fusion and Notebooks versions.

NOTE: Fusion version 0.9.0, and earlier, has a default configuration that will
not work with notebook version 0.4.3, or later, due to a major change in the
security policy of the Jupyter notebook server.

.. _fusion_notebooks_copy:

Notebooks added to the Fusion folder will not run
=================================================

If you have added notebooks to the Fusion folder and they will not run:

#. Upload the notebooks with the Fusion User Interface (UI).

#. Run the notebooks in Jupyter before running them inside Excel with Fusion.

   NOTE: A notebook copied directly into the Fusion folder will not be trusted by Fusion and will not be able to run in Fusion.

.. _fusion_install_win_manually:

Fusion on Windows is unavailable due to missing Add-ins
=======================================================

If, for some reason, Fusion was not granted administrator rights during installation and was not able to fully install all assets, Fusion will be unavailable on your local system.

To register the missing assets manually, take the following steps.

Sharing the folder containing the Fusion manifest
-------------------------------------------------

Excel Add-ins must be registered from either a Microsoft certificate store or
from a network shared folder.

#. Find the folder containing the ``manifest-anacondafusion.xml`` file.

#. Open Windows Explorer and go to your home directory.

   EXAMPLE: A user with the account name "jsmith" would have a home directory of ``C:\Users\jsmith``.

#. In your home directory, locate the ``AnacondaFusion\ExcelPlugins`` folder and verify that it contains a file named "manifest-anacondafusion.xml".

#. Right-click the ``AnacondaFusion\ExcelPlugins`` folder, and select Properties.

#. In the Properties window, click the **Sharing** tab.

#. Click the Share... button.

#. Verify that your user name is on the people to share with list.

#. In the Name field type ``FusionShare``.

#. Click the Share button.

#. Copy the network address of the folder, which you will use in a later step.

   EXAMPLE: ``\\DESKTOP-KC88P6N\FusionShare``.

#. Click the Done button.

#. Close the Windows Explorer window.

Registering Fusion secure connection certificates
-------------------------------------------------

The Fusion Add-in is served through a local secure connection. This requires
installing the security certificate:

#. Click Start, and select Fusion to start the local Fusion server and display a command prompt that shows the server log.

#. Open Internet Explorer and type ``https://localhost:5000`` in the address bar:

   NOTE: Be sure to use Microsoft Internet Explorer or Edge, and not any other browser.

   .. figure:: /img/fusion_cert_1.png
    :width: 50%

   |

#. Click Continue to this website (not recommended).

   NOTE: This is safe for your computer, the reason it is not recommended is because you have not yet installed the security certificate.

#. In the Security Alert, click the Yes button to proceed with the certificate installation:

   .. figure:: /img/fusion_cert_2.png
    :width: 50%

   |

#. In the browser address bar, click the the Fusion temporary certificate icon then click the Red Shield icon to view and install the certificate:

   .. figure:: /img/fusion_cert_3.png
    :width: 50%

   |

#. In the bottom of the Untrusted Certificate window, click View Certificates:

   .. figure:: /img/fusion_cert_4.png
    :width: 50%

   |

#. On the **General** tab, click the Install certificate button.

#. Click the OK button:

   .. figure:: /img/fusion_cert_5.png
    :width: 50%

   |

#. In the Certificate Import Wizard window, select Local Machine and then click the Next button:

   .. figure:: /img/fusion_cert_6.png
    :width: 50%

   |

#. Select the Place all certificates in the following store check-box, then click the Browse button:

   .. figure:: /img/fusion_cert_7.png
    :width: 50%

   |

#. Select the ``Trusted Root Certification Authorities`` folder and click the OK button:

   .. figure:: /img/fusion_cert_8.png
    :width: 50%

   |

#. On the confirmation screen, click the Next botton:

   .. figure:: /img/fusion_cert_9.png
    :width: 50%

   |

#. In the Completing the Certificate Import Wizard, click the Finish button:

   .. figure:: /img/fusion_cert_10.png
    :width: 50%

   |

#. In the certificate confirmation window, click the OK button:

   .. figure:: /img/fusion_cert_11.png
    :width: 50%

   |

Once complete, see :ref:`fusion_register_catalog_win`.

.. _fusion_register_catalog_win:

Fusion is not displayed in the Windows Excel Add-ins view
===========================================================

If Fusion is not displayed in the Windows Excel Add-ins view, the most likely
issue is that the registration of the Fusion Excel Add-in manifest is missing.

To verify, and register, the Fusion Excel Add-in manifest:

#. Open Excel.

#. In the Excel toolbar, click File and select Options:

   .. figure:: /img/fusion_addin_1.png
    :width: 50%

   |

#. At the bottom left of the Excel Options window, select the Trust Center check-box.

#. Click the Trust Center Settings button:

   .. figure:: /img/fusion_addin_2.png
    :width: 50%

   |

#. Select the Trusted Add-in Catalogs: field.

#. In the Trusted Catalogs list, verify that the address of the network shared folder is listed and selected:

   NOTE: If it is not listed, type the address in the New Catalog Text field and click the Add Catalog button:

   .. figure:: /img/fusion_addin_3.png
    :width: 50%

   |

   The following window is displayed:

   .. figure:: /img/fusion_addin_4.png
    :width: 50%

   |

#. Verify that the Show in Menu check-box is selected.

#. Click the OK button.

#. In the displayed notification that your settings are saved and will be applied when Office is restarted, click the OK button.

#. Click the OK button to close the Excel Options window.

#. Close and restart Excel to load the new Add-in.

#. In the Excel ribbon, click the **Insert** tab then select My Add-ins:

   .. figure:: /img/fusion_addin_5.png
    :width: 50%

   |

#. In the ``Shared Folder`` section, select the Fusion Add-in--labeled as AnacondaExcel and click the OK button:

   .. figure:: /img/fusion_addin_6.png
    :width: 50%

   |

.. _fusion_firsttime_filenotfound:

Starting Fusion for the first time displays a FileNotFoundError
===============================================================

If, when you start fusion for the first time, you see a FileNotFoundError, you
most likely did not restart Excel after your Fusion installation was complete.

NOTE: Excel must be opened at least once before starting Fusion.

To resolve this issue:

#. Open Excel.

#. Close Excel.

#. Restart Fusion.

Other Issues
============

If you have any questions or problems with Fusion, and you are a current
Enterprise subscriber, please contact your support representative.
