Frontastic CLI troubleshooting

macOS refuses to start Frontastic CLI

If you get a message saying that the application can't be started because the developer can't be verified, you have to allow the application in the General tab of the Security and Privacy settings in your System Preferences. See here for more info.

Yarn has errors on installation

Make sure you've done a fresh checkout after using a Frontastic sandboxFrontastic sandbox - A virtual machine hosted in the cloud that you can use for backend and some frontend development. They're provisioned from the developer area of the Frontastic studio.. Or you can remove all node_modules folders (even those in paas/...) and try again. You can clean up your entire code base to the state of a fresh clone using git clean -f -d -x.

Frontastic CLI claims ports are in use

You might have a Frontastic container/VM running in another directory. Make sure this is shut down properly using vagrant halt in the directory in question. Another reason might be that you have a webserver running locally on port 80 please shut this down before starting the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development..

In rare cases, there might also be a dangling process of a utility used by Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development.. To check this see if there are processes running named mutagen or traefik. If so, terminate those and try again. If that does still not help, restarting your computer to release the ports from zombie processes might help.

SSH key not recognized

If you get the below error:

Already copied the SSH key to the server but SSH still complains with Pseudo-terminal will not be allocated because stdin is not a terminal

You'll need to check which keys are loaded into your ssh-agent by using ssh-add -L.

If your key isn't in that list, then you'll need to follow the instructions in this article.

If you're using macOS and your passphrase isn't caching and you have to keep re-entering it, you can use the below in your /.ssh/config, which is also explained in more detail in the GitHub article link above.

UseKeychain yes

Host key is unknown

If you get the below error:

WARN 2021/02/01 16:56:02 Host key is unknown, have to add it to known_hosts
ERROR 2021/02/01 16:56:02 Already updated known_hosts but SSH still complains with Pseudo-terminal will not be allocated because stdin is not a terminal.

You'll need to remove the key from known_hosts. To do this run the below command:

ssh-keygen -R your-machine-hostname

If this doesn't fix the issue or if you have keys conflicts, you may need to use the command with IP instead:

ssh-keygen -R your-machine-ip

As an alternative solution, open your local known_hosts file, delete the lines related to the sandbox hostname or IP, and save.

Then run frontastic run and it will be added automatically.

SSH-agent not running

If you're on macOS and the CLI shows you the message ssh-agent doesn't seem to be running, you'll need to make sure your ssh-agent is running. To make sure that it's started at system startup, you can use the command:

sudo launchctl enable system/com.openssh.ssh-agent

Error: Project already running

If you see the error Project already running, this means that there's a .frontastic/mutagen.yml.lock file still running from an unclean stopped filesync process or from one currently running.

Check if a Mutagen process is running by using ps ax | grep mutagen and then kill the process. You can then remove the lock file and try the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. again.

Restart

If there's a problem with node_modules (error in Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. or Yarn containing ENOENT), or if you want to start over, you can first run the below command:

git clean -fdxn -e .idea

This will do a dry run of the command and print all the files that will be removed. Once you've checked you're happy that the files can be removed, then you can run the below:

git clean -fdx -e .idea

This will throw away all files which aren't tracked by Git and will bring you back to a clean state. You'll need to start with frontastic init again.

client/daemon version mismatch

If you get this filesync error, after upgrading to a recent CLI version:

Err! could not connect to daemon: client/daemon version mismatch (daemon restart recommended)

Delete the whole .frontastic folder and run frontastic init to solve it.

Unable to connect to daemon: connection timed out (is the daemon running?)

If you get the below error:

Attempting to start Mutagen daemon...
Error: unable to connect to daemon: connection timed out (is the daemon running?)
Error: project not running
Error: unable to connect to daemon: connection timed out (is the daemon running?)
INFO 2021/05/05 09:54:00 You may need to provide your sudo password.
INFO 2021/05/05 09:54:00 Updating your hostsfile...
INFO 2021/05/05 09:54:00 Updated hostsfile.
could not terminate mutagen daemon: exit status 1

You can run the below to avoid this issue:

frontastic run --defaultMutagenDataDir

This lets Mutagen store its data under the default directory, which is .mutagen in your home directory instead of inside the .frontastic directory.

Only 1 Mutagen instance can run at the same time and the Mutagen cache can cause problems. So, if you're using the --defaultMutagenDataDir flag and run into issues, try to delete the .mutagen directory in your home directory.

SSH connection doesn't close

If you're using Windows, doesn't always work to close the Frontastic CLI. To close the connection, you'll need to type exit. If it doesn't work the first time, type exit again and this should close the connection.


Did this page help you?