Loading...


Related Products


How can I fix user configuration errors in Code Assembly?

In certain scenarios, Code Assembly tasks might fail to produce the hosting artifact. In such cases, task log contains details about these user application configuration issues. The following table includes all such issues and their solutions:

ErrorDescriptionError messageSolution
PHP version is not set in composer.jsonYou must define the PHP version in the composer.json file to ensure that Code Assembly creates the hosting artifact.
{"level":"ERROR",
"ts":"2023-09-22T10:05:51.644Z",
"logger":"cloud-innovation",
"caller":"[email protected]/command.go:940",
"msg":"SKIPPING BUILD: encountered an application configuration error",
"error":"unable to set version from composer.json: configuration error: PHP version is not set in composer.json"}

To add the desired PHP version to the composer.json file, run the following command:

composer config extra.acquia.code-assembly.php_version 8.2

This command adds the following lines to the composer.json file:

…
 },
    "extra": {
       "acquia": {
          "code-assembly.php_version": "8.2"
       }
    }
}
Branch contains a “vendor” directoryIf you enable Code Assembly, and the source branch or the working branch of a PHP application already contains a vendor directory, this branch does not create a hosting artifact.
{"level":"ERROR",
"ts":"2023-09-22T10:05:51.644Z",
"logger":"cloud-innovation",
"caller":"[email protected]/command.go:940",
"msg":"SKIPPING BUILD: encountered an application configuration error",
"error":"configuration error: hosting artifact is already pushed to this branch"}
If you do not want to use this branch for deployments, delete the vendor directory from the repository. If you do not delete the vendor directory, you must manually manage the build process for this branch, as the system considers the branch to be a hosting artifact. When you enable Code Assembly, the branches that automatically deploy to environments are the branches that Code Assembly built, and have the naming convention, CODE-ASSEMBLY-BUILD-<BRANCHNAME>. To deploy branches that do not follow this naming convention, you must deploy them manually.
Vendor directory is renamed in composer.jsonFor PHP applications, Code Assembly only supports vendor as the vendor directory for Composer. If you rename the vendor directory in the composer.json file, the system generates a user configuration error, and prevents Code Assembly from creating a hosting artifact.
{"level":"ERROR",
"ts":"2023-09-22T10:05:51.644Z",
"logger":"cloud-innovation",
"caller":"[email protected]/command.go:940",
"msg":"SKIPPING BUILD: encountered an application configuration error",
"error":"configuration error: found '<vendorDir>' as vendor. Code Assembly expects your Composer dependencies to be located in the 'vendor' directory at the root of your codebase. Please remove the 'vendor-dir' definition from your composer.json file and try again"}
Remove the vendor-dir definition from the composer.json file.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation