FAQs - Working with the State Tool

Below are some commonly asked questions by ActiveState users. If you have additional questions, please check the online community forums. They are regularly maintained by ActiveState staff and are contributed to by other members of the ActiveState community. For questions related to your account, contact us here.

How to install the latest version of the State Tool?

Open your command prompt or terminal and type state update

How do I download a project to my machine?

To check out a project on your local machine enter state checkout <orgname>/<projectname> <path to folder> For example state checkout JohnSmith/Project1 C:\project

How do I download the bits from a project to a specific location on my machine?

To check out a project’s bits to your local machine enter state checkout <orgname>/<projectname> --runtime-path <path to folder> For example state checkout JohnSmith/Project1 --runtime-path C:\project

How do I show which projects are on my local machine?

To display all existing projects, their location on your system, and the location of their executable files enter state projects.

How do I update my project on my local machine?

Working from your project directory (the folder containing your activestate.yaml file) enter the command state pull.

How do I use the State Tool to check my project for vulnerabilities?

You can use the State Tool to check your current project for any potential vulnerabilities by activating the project and running state cve to view the vulnerabilities associated with that project.

For a more detailed explanation of the vulnerabilities associated with your project, enter state cve report. This will include an ID for each listed vulnerability so you can look them up to see how they may impact the security or performance of your project. To address the vulnerabilities found in your project see here.

How do I switch from one project to another?

  • While working from a project, enter state projects in your terminal to view a list of the projects that are installed locally on your machine.
  • After finding the project you want from the list, exit your currently activated project by typing exit into the command line. This will deactivate your project.
  • Enter state shell <orgname/projectname> to activate the project you want to switch to. If you want to set a new default project for your system enter state use <projectname>. This will be the default project until you set a new default using state use or unset a default by entering state use reset.

How do I end my State Tool session?

You can end your working session by typing exit into the command prompt or terminal window. Closing the command prompt or terminal window will also deactivate your project.

How do I compare projects using the State Tool?

Comparing different versions of the same project is a great way to make sure changes have been logged and to track the progress of your projects. To compare two separate projects (“project1” and “project2” in “organization1”)

  • Begin by activating your first project by typing state shell <organization1/project1> into your command prompt.
  • Run the script by entering state run <script1>.
  • Open a second terminal window and enter state shell <organization1/project2> into your command prompt.
  • Run the project2 script by entering state run <script2> in the newly created windows and wait for the script to stop.
  • Now you can view a side-by-side comparison of the projects.
  • Type exit into either or both terminal windows to end your working session(s).

How do I uninstall the State Tool and all cached data?

There are two separate commands to uninstall your activated project, each with unique characteristics.

  • state clean cache will remove all copies of cached versions of everything and reset the State Tool cache. This command will not uninstall the State Tool. This needs to be done from the main project directory, although it may work from other directories with newer language versions.
  • state clean uninstall gets rid of cached files, uninstalls the State Tool, installed language runtimes, and all configured information. It’s important to note that after confirming your choice to run this command, you will need to restore everything from the Platform. To find out more see here.

What can I do if my State tool update is taking longer than usual (more than a few minutes)?

If you are updating from a much older version it may have problems with runaway services that may be preventing the update. The State Tool Troubleshooting section has instructions on identifying and shutting down runaway services for Windows, macOS, and Linux. After running the script to stop ongoing processes, enter state update to resume your update.

What does “The State Tool could not figure out what path to use” mean?

Generally, the “could not figure out what path to use” means that the State Tool can’t find a suitable folder for your runtime. Unsuitable folders include program folders, system folders, or folders where restrictive permissions have been set. Your personal folders are more likely to be writable and are a better choice for your project. Follow the steps here to check out a project to a specific location on your system.

What does “State Tool could not install dependencies and/or the build failed” mean?

If you receive this error, you can try resolving the error in the Platform. The Platform provides more feedback and can see if (and when) the rebuild succeeds. That will show when the State Tool can find a working build of the module to download from your project.

The Platform will also allow you to specify the package version and see immediately if there are any vulnerabilities associated with it. Check here for more information about adding packages using the Platform and here for information about vulnerabilities.

Why does The State Tool show an error when trying to download my Tcl project?

The State Tool cannot download Tcl projects, you must go to the Platform and download the .msi or .tar file directly from the project page to install your Tcl project on your local machine.

How can I install the State Tool on a server?

To install the State Tool on a server you will need to checkout the project to a specific location on the server. To do so enter state checkout <orgname>/<projectname> <location>. This will place a project folder containing your project’s activestate.yaml file into the specific location. To checkout all of the bits associated with your project enter state check out <orgname>/<projectname> --runtime-path <location>. More information on state checkout can be found here.

What does “could not activate runtime environment” or “failure encountered in active subshell” mean?

This error may indicate that your current working directory is incompatible with the State Tool (for example a System32 or similar directory), or you are trying to deploy your project as an Admin on your local system. After checking out a project your runtime will be installed into a personal (or user) AppData folder. Only users can access the runtime. Try exiting as an Admin, logging in as a user, and re-deploying the runtime.

Why did I receive a “could not retrieve install package information” error?

This error may result from trying to install a package while being behind a proxy server. Click here for more details and potential solutions