Installing Finsemble

Install

To install Finsemble, clone it from GitHub and install it with yarn. You can also use the npm CLI v7.x or later. Type these commands:

git clone https://github.com/chartiq/finsemble-seed
cd finsemble-seed
yarn install
yarn start

You're now ready for a new smart desktop, advanced window management, inter-app communications, and a toolbar from which to orchestrate it all. Go ahead and take it for a spin!

What to do when your org blocks GitHub, Electron, or npm

Many organizations block access to GitHub, Electron, and npm in an effort to mitigate security risks. Your org might also block Amazon AWS for the same reason. This makes it impossible to install Finsemble in the way we just looked at. Here’s why.

When you run yarn install, npm install, or create a Finsemble installer, behind the scenes we use @electron/get to fetch the prebuilt binary Electron files and a shasum file. When you try to retrieve these files from GitHub by using a link such as https://www.electronjs.org/releases/stable?version=12, it redirects to an Amazon AWS S3 bucket that looks similar to this link: [https://github-production-release-asset-2e65be.s3.amazonaws.com/9384267/425a5f80-0aec-11ea-9585-8506be0d72e5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200403%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200403T162331Z&X-Amz-Expires=300&X-Amz-Signature=012c0026221565d325cc330b9c597273cb29d0b4fd26e878f66d3f7c21f25b14&X-Amz-SignedHeaders=host&actor_id=1701764&response-content-disposition=attachment%3B%20filename%3Delectron-v7.1.2-win32-x64.zip&response-content-type=application%2Foctet-stream](https://github-production-release-asset-2e65be.s3.amazonaws.com/9384267/425a5f80-0aec-11ea-9585-8506be0d72e5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200403%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200403T162331Z&X-Amz-Expires=300&X-Amz-Signature=012c0026221565d325cc330b9c597273cb29d0b4fd26e878f66d3f7c21f25b14&X-Amz-SignedHeaders=host&actor_id=1701764&response-content-disposition=attachment%3B filename%3Delectron-v7.1.2-win32-x64.zip&response-content-type=application%2Foctet-stream). (This specific link is an example and has expired by now. Yours will be similar but not exactly the same.)

If your org has blocked access to any of the resources you need for the installation, the yarn install or npm install command fails.

Note Note: This installation issue affects only your development environment. When you’re ready to roll out Finsemble to production, the installer generator embeds the Electron binaries in a custom named binary that it produces. You can sign this binary with your org’s own code signing certificate as usual. There is no downloading involved, so you don’t need access to the blocked sites.

You have several options to resolve the access issue. Try them in order, starting with the simplest option.

1. Whitelist GitHub.com and the release assets S3 bucket

The simplest way is to lift the access ban, even if it’s only temporarily. Your IT department may be willing to whitelist the relevant domains just long enough to allow you to download what you need. The hosts you need to access are:

2. Configure @electron/get to use your proxy server

If you use a proxy server on your network, you need to configure @electron/get before you can use it. Specifically, you must set environment variables that enable the proxy and to provide its address. Type this in the Windows command prompt:

set ELECTRON_GET_USE_PROXY=true&& set GLOBAL_AGENT_HTTPS_PROXY=<YOUR PROXY URL>&& set ELECTRON_MIRROR=https://assets.finsemble.com/electron/&& npm install

or in PowerShell:

set ELECTRON_GET_USE_PROXY=true; set GLOBAL_AGENT_HTTPS_PROXY=<YOUR PROXY URL>; set ELECTRON_MIRROR=https://assets.finsemble.com/electron/; npm install

Using the proxy variables alone might be enough to get you up and running. If this doesn’t work, the next step is to use a mirror.

3. Use the Finsemble Electron releases mirror

At Cosaic we host our own Electron release. You can use it to bypass the blocked access. In the command line of Windows command prompt run:

set ELECTRON_MIRROR=[https://assets.finsemble.com/electron/](https://assets.finsemble.com/electron/&&)&& npm install
=======
```bash
set ELECTRON_GET_USE_PROXY=true; set GLOBAL_AGENT_HTTPS_PROXY=<YOUR PROXY URL>; set ELECTRON_MIRROR=https://assets.finsemble.com/electron/; npm install

Using the proxy variables alone might be enough to get you up and running. If this doesn’t work, the next step is to use a mirror.

3. Use the Finsemble Electron releases mirror

At Cosaic we host our own Electron release. You can use it to bypass the blocked access. In the command line of Windows command prompt run:

set ELECTRON_MIRROR=https://assets.finsemble.com/electron/&& yarn install

or for PowerShell:

set ELECTRON_MIRROR=[https://assets.finsemble.com/electron/](https://assets.finsemble.com/electron/&&); npm install 

You can add the above command to the npm scripts section of the package.json instead:

"install:mirror":"set ELECTRON_MIRROR=https://assets.finsemble.com/electron/&& npm install"

To use this mirror when running an installer (which again pulls down the Electron binaries), add this to /configs/other/installer.json:

"download": 

   {    "mirror": "https://assets.finsemble.com/electron/"  

}

4. Create your own mirror of releases via GitHub manual download

The final thing to try is to create your own mirror. Because this is the most complex option, use it only when the options described earlier don’t work for you.

Our simplified instructions are taken from the Electron documentation. Try these steps in order. After each step, check to see if it fixed the issue.

  1. Download the Electron binary and shasum for the correct version according to Finsemble from here: https://github.com/electron/electron/releases

  2. Change the cache folder by using the command line

    set electron_config_cache=c:\local\path
    

    The file name must remain the same as the one downloaded from the previous step. It must match exactly the file it is trying to download.

  3. Create a mirror. Follow the instructions in the Custom Mirrors and Caches.

  4. In the command line run set ELECTRON_MIRROR=https://YOUR-MIRROR/electron/&& npm install or ELECTRON_MIRROR=https://YOUR-MIRROR/electron/; npm install

For more details, see the Electron documentation site.

If these steps don’t work

If none of these steps work for you, contact support@finsemble.com.