Frontastic sandbox error: component initialize failed

If your 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. doesn't come up properly due to a component not being initialized properly, don't worry, we'll show you how you can look into the issue.

Component initialization takes place after the server is prepared with all required infrastructure and configuration. For a unified build flow, Frontastic uses a pipeline based on Ant. The command ant prepare is executed for all components that are required to be initialized (see our commands list article for more helpful Ant commands).

Among other things, running ant prepare:

  • Installs PHP dependencies by executing composer install
  • Installs JavaScript dependencies by executing yarn install
  • Clears caches

So, if you're running into trouble with ant prepare, chances are high that 1 of these steps failed.

In the Frontastic studioFrontastic studio - The interface you use to manage, build, and edit all areas of your project and commerce sites. Previously known as `backstage`., you can find a structured log of all the tasks performed during ant prepare and expands the initialization log of failed components for you (to access this log, go to Sandboxes in the Developer area, find your sandbox, and click the bug icon). For example, if the common component failed, the initialization log will be expanded like this:

Scrolling down to the end of this log snippet reveals the failing initialization step:

In this case, the composer install process failed due to an invalid composer.json file in your source code.

In many cases, the resulting error should already give you a good indicator of the problem and how to fix it (for example, fix the composer.json). If this isn't the case, you can manually inspect the situation on the 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. by following these steps:

  1. SSH into the sandbox (ssh [email protected]<your-machine-host>)
  2. cd into the directory of the failing component (for example, cd <customer>_<project>)
  3. Execute ant prepare and see what it does

You can now attempt to fix the issue and then re-run ant prepare to see if your fix worked. For this, we recommend that you use the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. to synchronize your local files to the sandbox.

❗️

While you can access 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. with a failed initialization through SSH, it shouldn't be worked with and should only be used for debugging.

Once you've identified and fixed the issue, you can destroy the failed machine in the Frontastic studioFrontastic studio - The interface you use to manage, build, and edit all areas of your project and commerce sites. Previously known as `backstage`. and bring up a new sandbox.


Did this page help you?