Information for: DEVELOPERS   PARTNERS   SUPPORT

FAQs and troubleshooting

Important

EOL notice! Drupal 9 reached end-of-life on November 1, 2023 and Drupal 8 reached end-of-life on November 2, 2021. Therefore, Acquia will not be performing any testing related to Drupal 9 or Drupal 8 to ensure compatibility. Acquia recommends upgrading to Drupal 10 or later. For more information, see Frequently Asked Questions.

Common error messages

Composer memory limit error - Build Code

Description

Build stage

Job

Error message

Category

Responsibility

Build Drupal

Build Code

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/ Composer/DependencyResolver/Solver.php on line 201.

Application

Customer

Potential cause

The application uses an older version of the Acquia CMS project template, which causes a Composer memory limit error.

Solution

Confirm that your application meets the following best practices:

  • From composer.json, remove the lines that point to the old Acquia CMS project template. Acquia CMS utilizes the Acquia Drupal recommended project.

  • Commit composer.lock.

  • Use Composer 2.

  • Analyze the delta between a working composer.lock and the failing composer.lock.


Code push error

Description

Build stage

Job

Error message

Category

Responsibility

Deploy Drupal

Deploy Branch to Acquia & Deploy Tag to Acquia jobs

In PushArtifactCommand.php line 100: [Acquia\Cli\Exception\AcquiaCliException] Pushing code was aborted because your local Git repository has uncommitted changes. Please either commit, reset, or stash your changes via git.

Application

Customer

Potential cause

Directories are committed in the codebase. Git must ignore the directories so that Composer can add them during the build.

Solution

Update the .gitignore file in the root of your project so that Git ignores the proper directories. The recommended .gitignore file is located in this location.

Description

Build stage

Job

Error message

Category

Responsibility

N/A

N/A

git@gitcode.acquia.com: Permission denied (publickey,keyboard-interactive). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

N/A

Customer

Potential cause

If you cannot push code from your Cloud IDE or local development environment to your Code Studio repository due to this error, you must update your git remote to use the HTTPS URL instead of the SSH URL.

Solution

Update your git remote to use the HTTPS URL of your repository.

To find the HTTPS URL:

  1. Navigate to your Code Studio project.

  2. Click Clone.

  3. Click the Copy icon to copy the value specified in the Clone with HTTPS field.

    The Clone button is at the top-right and the Copy icon is next to the Clone with HTTPS field.

To update your git remote:

  1. Remove the current git remote from your Cloud IDE or local development environment.

    If your remote name is origin, run the following:

    git remote remove origin
    
  2. Add the new remote using the copied HTTPS URL.

    If you want your remote name to be origin, run the following:

    git remote add origin <URL>
    

Missing Test Drupal job error

Description

Build stage

Job

Error message

Category

Responsibility

Test Drupal

Test Drupal

'Create artifact from branch' job needs 'Test Drupal' job, but 'Test Drupal' is not in any previous stage.

Application

Customer

Potential cause

The Acquia Auto DevOps template is copied incorrectly in the entire codebase.

Solution

Remove everything in the file and add any necessary customization back in the before_script and after_script parameters.


Missing Test Drupal job error - gitlab-ci.yml

Description

Build stage

Job

Error message

Category

Responsibility

All

N/A

Found errors in your .gitlab-ci.yml: 'Create artifact from branch' job needs 'Test Drupal' job, but 'Test Drupal' is not in any previous stage.

Applications

Customer

Potential cause

One job requires another job to complete the stage, but the required dependent job is currently not running. This can occur from a number of situations, such as the job not being defined in the template or mismatching conditions for when jobs are scheduled to run.

Solution

The following are the ways to resolve this error:

  • Revert to default Auto DevOps job.

  • Test your .gitlab-ci.yml in CI Lint.


$rector_bin process error

Description

Build stage

Job

Error message

Category

Responsibility

Automatic Updates

Deprecated Code Update

Command [$rector_bin process ${ACQUIA_CUSTOM_CODE_DIRS} --ansi] exited with code [1]

Application

Customer

Potential cause

The existing Drupal code is deprecated.

Solution

Identify the files with deprecated Drupal code and update the code.


PHPStan error

Description

Build stage

Job

Error message

Category

Responsibility

Test Drupal

PHP Stan

Command ["$CI_PROJECT_DIR"/vendor/bin/phpstan] exited with code [1]

Application

Customer

Potential cause

The existing code does not follow the proper coding standards.

Solution

Identify the files with code standards errors and update the code.


BLT Tests error

Description

Build stage

Job

Error message

Category

Responsibility

Test Drupal

BLT Tests Drupal

[error]  Command `tests:security-drupal ` exited with code [1]

Application

Customer

Potential cause

One or more packages require security updates.

Solution

Run composer update <package> and commit the changes.


Invalid commit error

Description

Build stage

Job

Error message

Category

Responsibility

Automatic Updates

Composer Update

[error]  Invalid commit message! Commit messages must conform to the regex /(^CHANGEME-[0-9]+(: )[^ ].{15,}\.)|(Merge branch (.)+)/ The commit message should include your project prefix, followed by a hyphen and ticket number, followed by a colon and a space, fifteen characters or more describing the commit, and end with a period. Example: CHANGEME-123: Update module configuration.

Application

Customer

Potential cause

Your application uses BLT, and BLT is placing limitations on the commit message syntax.

Solution

You must add the following to blt/blt.yml for Code Studio to work:

git:
    hooks:
         pre-commit: false
         pre-push: false
         commit-msg: false

For more information, see Using BLT with Code Studio.


Acquia CDE creation error

Description

Build stage

Job

Error message

Category

Responsibility

Deploy Drupal

Create Acquia CDE

Customer experiences issues with creating CDEs. The Create Acquia CDE job is not completing.

Application

Customer

Potential cause

You reached your CDE entitlement limit or you do not have a CDE entitlement.

Solution

To resolve this error, do one of the following:

  • In CI/CD variables, set the ACQUIA_JOBS_CREATE_CDE variable to false.

  • Contact your Acquia account manager to get information about your subscription.


XdebugHandler error

Description

Build stage

Job

Error message

Category

Responsibility

Deploy Drupal

Creating Artifact

Fatal error: Uncaught Error: Call to undefined method Composer\XdebugHandler\XdebugHandler::isXdebugActive() in /builds/<project>/vendor/acquia/blt/ src/Robo/Inspector/Inspector.php:603

Application

Customer

Potential cause

Your application is on BLT 13.5.

Solution

Update to BLT 13.6.0.


Access denied error

Description

Build stage

Job

Error message

Category

Responsibility

Deploy Drupal

Creating Artifact

glab auth git-credential: "erase" is an invalid operation remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://code.acquia.com/help/topics/git/troubleshooting_git #error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'https://code.acquia.com/<USERNAME>/<PROJECT-NAME>.git/'

Application

Customer

Potential cause

Your token has expired.

Solution

Use glab auth login to configure the token again.


PHP version error - Build Code

Description

Build stage

Job

Error message

Category

Responsibility

Build Code

Build Code

Your lock file does not contain a compatible set of packages. Please run composer update.

symfony/string vx.x.x requires php >=8.2 -> your php version (8.1) does not satisfy that requirement.

Application

Customer

Potential cause

The PHP version of the project is not set correctly.

Solution

Add the PHP_VERSION environment variable to your project through the UI, and set its value to the PHP version that your project uses. This value accepts major and minor versions only, for example, 8.2. For more information, see Modifying environment variables.

Note

Setting the PHP_VERSION variable in the .gitlab-ci.yml file might not work as expected. Acquia recommends you to set variable values through the Code Studio UI.

The composer.json file in your project, Cloud IDE, Code Studio, and Cloud Platform must use the same PHP version.


Missing build branch error

Description

Build stage

Job

Error message

Category

Responsibility

Deploy Drupal

Create Acquia CDE

The build branch '<BRANCH_NAME>' is missing from Acquia Cloud Platform

Application

Customer

Potential cause

This error occurs during merge requests if one of the following is true:

  • The ACQUIA_JOBS_CREATE_BRANCH_ARTIFACT environment variable is not set to true. The branch artifact must be created so that it can be pushed to Cloud Platform.

  • The source branch exists on a fork instead of the main repository.

Solution

  • To create the branch artifact:

    1. Add the ACQUIA_JOBS_CREATE_BRANCH_ARTIFACT environment variable to your project.

    2. Set the value of ACQUIA_JOBS_CREATE_BRANCH_ARTIFACT to true.

      For more information, see Adding environment variables.

  • If the source branch does not exist in the main repository:

    1. Push the source branch to the main Code Studio project repository.

    2. Create the merge request without using a forked repository.


Error in uploading artifacts

Description

Build stage

Job

Error message

Category

Responsibility

Varies

Varies

ERROR: Uploading artifacts. 413 Request Entity Too Large.

Platform

Customer

Potential cause

If you customize your pipeline to implement artifact-producing jobs, and your artifacts are larger than 100 MB, you might see this error. Common custom jobs that result in large artifacts are front-end tests, such as Nightwatch.js or BackstopJS.

Solution

Contact your Technical Account Manager or Acquia Support to increase the maximum artifact size.


Missing token error

Description

Build stage

Job

Error message

Category

Responsibility

Varies

Varies

Error writing data to auth/jwt/login: Error making API request. Code: 400. Errors: * missing token

Application

Customer

Potential cause

This error occurs if you customize your pipeline to use the CI_JOB_JWT variable or a similar token. The CI_JOB_JWT variable is deprecated in GitLab.

Solution

If you use the CI_JOB_JWT variable, then remove it. Add the following script to the stage or the job that you customized:

id_tokens:
 VAULT_ID_TOKEN:
   aud: $VAULT_ADDR

For example, if a custom job in the Test Drupal stage is Build artifact and deploy to CI Server, you must update the .gitlab-ci.yml file as follows:

"Build artifact and deploy to CI Server":
stage: "Build Drupal"
id_tokens:
  VAULT_ID_TOKEN:
   aud: $VAULT_ADDR

PHPUnit error

Description

Build stage

Job

Error message

Category

Responsibility

Test Drupal

Test Drupal

Class "Behat\Mink\Element\TraversableElement" not found

Application

Customer

Potential cause

Certain packages are missing from your project.

Solution

  • If your application runs on Drupal 9, add the behat/mink package to your project:

    composer require behat/mink
    
  • If your application runs on Drupal 10, add the core-dev package to your project:

    composer require --dev drupal/core-dev
    

How do I enable Code Studio for my Acquia subscription?

For information about enabling Code Studio for your subscription, see Enabling a Code Studio subscription.

What versions of Drupal does Code Studio support?

Code Studio supports Drupal 9.x and later.

What versions of Node.js does Code Studio support?

For information about the versions of Node.js that Code Studio supports, see Changing the Node.js version.

Why am I seeing a lot of SAST jobs in my Pipeline?

It is likely that you committed contributed dependencies to your repository. Acquia does not recommend this.

git rm -r --cached vendor docroot/core docroot/libraries
docroot/modules/contrib docroot/themes/contrib
docroot/profiles/contrib node_modules

Add these to your .gitignore. For an example, see acquia/drupal-recommended-project.

How do I install private packages through Composer?

Composer provides multiple mechanisms for downloading private packages. Acquia recommends that you store authentication credentials in a project auth.json. For more information, see Authentication in auth.json per project.

This works in Code Studio CI/CD jobs.

I cannot sudo and add packages, move binaries, etc. Why?

This is a security restriction on application containers running in the Acquia Kubernetes service.

  • If you’re downloading a binary, such as composer.phar or acli.phar (which Acquia has already done for you), you can place it in '$HOME/bin'. The bin folder in the CI user’s home directory is already added to $PATH. It works as long as your binary has an execute permissions set.

  • To download a package through `apt` or similar, create a Support ticket.

CDE already exists. What can I do?

Error message:

CDE environment with name CDE-xxxx already exists

Resolution 1:

If a merge request cannot be declined/merged immediately for some reason, one way is to stop the CDE environment:

  1. Log in to Code Studio.

  2. Navigate to Environments.

  3. Determine the respective environment with the same feature branch name, and stop the environment.

  4. Wait for a few minutes for the current pipeline to succeed, and to delete the existing CDE with the same name.

  5. Make some minor changes to the current feature’s merge request to re-initiate the pipeline with the CDE creation job.

Resolution 2:

  1. Rename the existing CD environment that is pointing to the same source branch from Acquia Cloud.

  2. Make some minor changes to the current feature’s merge request to re-initiate the pipeline with CDE creation job.

Is there a limit to the number of projects I can have in Code Studio?

No. You can have unlimited projects in Code Studio. However, the Code Studio AutoDevOps pipeline requires your Code Studio project to be linked to an Acquia Cloud application. You can link only one Code Studio project to a given Cloud application.

Does Code Studio work with Cloud IDE?

Yes. For instructions on how to set up Code Studio with Cloud IDE, see Setting up a Code Studio project.

For more information, see the following tutorials on dev.acquia.com:

Can I use an existing application with Code Studio?

Yes. Code Studio is compatible with existing applications running Acquia CMS, Drupal 9 or later.

Code Studio makes assumptions about how projects are formatted and which tools are used with it. Existing projects may need to make alterations based on these assumptions to take full advantage of Code Studio.

Can I use a third-party repository with Code Studio?

Yes. You can use a third-party repository with Code Studio. For instructions on how to integrate your private repository with Code Studio, see Configuring repository mirroring in Code Studio.

Does Code Studio work with Jira?

Jira integration works with Code Studio with the exception of Jira panel. For information about how to configure Code Studio with Jira, see How to achieve a Gitlab Jira integration.

You can configure each GitLab project in Code Studio to connect to an entire Jira instance. After the configuration, the GitLab project can interact with all Jira projects in that instance. You do not have to associate a GitLab project with a single Jira project.

Can you integrate a Veracode Static analysis with the Code Studio AutoDevOps pipeline?

Yes. You can integrate a Veracode Static analysis by customizing the standard template for the Code Studio AutoDevOps pipeline.

To customize the AutoDevOps pipeline in Code Studio, see Adding a before_script or after_script to a Code Studio job.

For more information about implementing Veracode Static analysis as part of the pipeline, see GitLab Pipeline Scan Examples.

How many users can I add to Code Studio?

With Code Studio entitlements, seats are equivalent to users. The number of seats within your Code Studio subscription is equal to the number of users you can add to your Code Studio instance.

For more questions about Code Studio entitlements, contact your Acquia account team.

Can I use Code Studio with non-Drupal applications?

Yes. You can use Code Studio with non-Drupal applications. However, the AutoDevOps pipeline is optimized for Drupal.

When using non-Drupal applications, the Test Drupal stage jobs do not work.

Can I use Code Studio with a Node.js application?

Yes. You can use Code Studio with Node.js applications. However, the AutoDevOps pipeline is optimized for Drupal.

When using non-Drupal applications, the Test Drupal stage jobs do not work.

Can I customize Code Studio builds?

Yes. You can customize Code Studio builds. For instructions, see Customizing a default Code Studio pipeline.

Why am I seeing rector errors during scheduled jobs?

Error message:

Undefined constant Rector\Core\Configuration\Option::IMPORT_DOC_BLOCKS

This error is usually a result of an older version of rector being added in your project. Code Studio attempts to add the latest version of rector during the Pipeline. However, it uses your version if that is included in your project’s composer.lock.

Resolution 1:

  1. Run composer remove palantirnet/drupal-rector.

  2. Delete the rector.php file from the root of your project, allowing Code Studio to handle the rector going forward.

Resolution 2:

  1. Run composer update palantirnet/drupal-rector -W to upgrade your rector package to the latest rector version.

  2. Remove the rector.php file from the root of your project.

  3. Run cp vendor/palantirnet/drupal-rector/rector.php to recopy the rector.php file.

Error message:

Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::__construct(): Argument #1 ($container) must be of type
Symfony\Component\DependencyInjection\ContainerBuilder, RectorPrefix202208\Symfony\Component\DependencyInjection\ContainerBuilder given,
called in /home/codestudio/.config/composer/vendor/rector/rector/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php on line 67

This error indicates that your project’s rector.php file needs to be recreated. Newer versions of rector altered the configuration syntax, resulting in your rector.php file no longer being valid.

Resolution:

  1. Remove the rector.php file at the root of your project.

  2. Run cp vendor/palantirnet/drupal-rector/rector.php to recopy the rector.php file to your project.

Is there a limit to the build minutes for Code Studio?

Yes. Build time is limited to 10k minutes per Code Studio group.

Can I use my own container image in a Code Studio job?

No. With the AutoDevOps pipeline, Acquia maintains the container images used in Code Studio jobs. You can customize jobs, but the base images are selected by Acquia as secure, vetted options that remove overhead for our users.

Can I disable AutoDevOps?

Yes, you can disable AutoDevOps.

Note

Disabling AutoDevOps removes the Acquia-optimized steps needed to build, test, and deploy Drupal applications to Acquia Cloud.

To disable AutoDevOps:

  1. In the left navigation pane, click Settings > CI/CD.

  2. Expand the Auto DevOps section.

  3. Clear the Default to Auto DevOps pipeline checkbox.

Does Code Studio work with Acquia Site Factory?

Yes. The continuous integration (CI) feature of Code Studio is compatible with Acquia Site Factory. However, the continuous delivery (CD) feature of Code Studio is not compatible with Acquia Site Factory.

For more information, see the Code Studio product support scope.

Can I use my own GitLab license with Code Studio?

No. External licenses for Gitlab cannot be used with Acquia Code Studio.

Why am I seeing a warning during the Validate Code job?

It is likely that you committed files or directories that Acquia recommends to gitignore.

Ensure that you do not commit any of the following:

  • vendor

  • node_modules

  • docroot/composer.json

  • docroot/libraries

  • docroot/core

  • docroot/modules/contrib

  • docroot/themes/contrib

  • docroot/profiles/contrib

Package managers, such as Composer and npm, add these files and directories when the system creates a deploy artifact. For more information, see Sample .gitignore file.

If you did not commit the specified files or directories, and have a large codebase, see Known issues in Code Studio.