After I have updated my Drupal core version from 8.6.2 to 8.7.14, I have got below error at the time of cache clear and db update.

composer update drupal/core webflo/drupal-core-require-dev --with-dependencies

Below error occurs while running update.php

An AJAX HTTP error has occurred. HTTP result code: 200 Debug information follows. 
Path: /update.php/start?id=55&op=do_nojs&op=do 
Status text: OK 
Answer text: ArgumentCountError: Too few arguments to function Drupal\Core\Entity\EntityTypeManager :: __ construct(), 
5 passed and exactly 6 expected in Drupal\Core\Entity\EntityTypeManager->__construct()
(line 92 of C:\myproject\html\core\lib\Drupal\Core\Entity\EntityTypeManager.php).

This error occured at the time of cache rebuilt (Drush cr)

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\Core\Entity\EntityTypeManager::
__construct(), 5 passed in C:\myproject\html\core\lib\Drupal\Component\DependencyInjection\Container.php on line 285 
and exactly 6 expected in C:\myproject\html\core\lib\Drupal\Core\Entity\EntityTypeManager.php:92

I couldn't able to proceed my update process.

PHP version 7.3.12
Windows OS
Drush version 9.3

Comments

kalidasan created an issue. See original summary.

kalidasan’s picture

Issue summary: View changes
longwave’s picture

This almost certainly relates to the change in #2554235: Make the content entity storage and entity query use the last installed definitions instead of the ones living in code where an extra argument was added to EntityTypeManager but this should be detected when caches are rebuilt.

cilefen’s picture

Version: 8.7.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

catch’s picture

Can you try setting:

$settings['deployment_identifier'] = 'something_random';

In settings.php - then re-run the update?

kalidasan’s picture

Hello @catch,

Thanks for your suggestion.

I have tried both the below suggestions, but no luck. Getting same error.

$settings['deployment_identifier'] = \Drupal::VERSION; // I have got new version name here which is 8.7.14
$settings['deployment_identifier'] = 'security_update';
kalidasan’s picture

As my current Drupal version is 8.6.2, I have followed this entire steps https://www.drupal.org/docs/updating-drupal/migrating-the-composer-proje...

When I reach drush updb or drush cr, I'm getting below error.

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\Core\Entity\EntityTypeManager::
__construct(), 5 passed in C:\myproject\html\core\lib\Drupal\Component\DependencyInjection\Container.php on line 285
and exactly 6 expected in C:\myproject\html\core\lib\Drupal\Core\Entity\EntityTypeManager.php:92

I have tried below links, but no luck

https://www.codebales.com/drupal-update-87x-880

I have followed below issues too

https://www.drupal.org/project/drupal/issues/3099746
https://drupal.stackexchange.com/questions/289673/route-entity-path-alia... - Tried this solution https://drupal.stackexchange.com/questions/289673/route-entity-path-alia..., but again same problem

I have faced below issues when I tried with fresh Drupal 8.9.3 installation and imported D8.6.2 config on top of it

https://www.drupal.org/project/drupal/issues/3038085
https://www.drupal.org/project/drupal/issues/3002532

Finally tried path_alias issues

https://www.drupal.org/project/drupal/issues/2336597
https://www.drupal.org/project/drupal/issues/3101423#comment-13503583

Tried this solution as well, as mentioned in https://www.drupal.org/project/drupal/issues/3101423 and https://drupal.stackexchange.com/questions/289673/route-entity-path-alia...

  • Update pathauto to the latest version. composer require 'drupal/pathauto:^1.6'
  • Run the database updates.
  • Update again to Drupal 8.9.3
  • Run the database updates.
  • Ensure the path alias module is installed/enabled.

In all the cases, when I reach drush cr/updb, finally I end-up with same issue.

Note:

Currently I'm upgrading to Drupal 8.9.3 from Drupal 8.6.2

kalidasan’s picture

Issue tags: -8.7.0 update +8.9.0 update
catch’s picture

@kalidasan please try deleting you sites/default/files/php directory to see if that helps? (Also please ensure you're running the update on a copy of your Drupal 8 database).

kalidasan’s picture

Assigned: Unassigned » kalidasan
Status: Active » Closed (works as designed)

Issue is with one of our custom service file which missed necessary arguments(few of the custom module delivered by third part vendor).

Thanks @catch for your input any way.

2yellowdots’s picture

Thanks for posting this issue @kalidsan. I was able to use one of the links you posted to help me out.