Problem/Motivation
When updating to 2.6 we notice this error (You have requested a non-existent parameter "app.root".)
Steps to reproduce
- Run composer update
- After update all my websites went down. (503 Service Temporarily Unavailable)
- After investigation we notice blazy module was updated
- blazy module will be updated from 2.5 to 2.6 (2.6 was released on 7 Feb 2022)
- Even on drush cr and drush updb the below errir was showing up:
You have requested a non-existent parameter "app.root".
Symfony\Component\DependencyInjection\Definition Object
(
[class:Symfony\Component\DependencyInjection\Definition:private] => Drupal\blazy\BlazyManager
[file:Symfony\Component\DependencyInjection\Definition:private] =>
[factory:Symfony\Component\DependencyInjection\Definition:private] =>
[shared:Symfony\Component\DependencyInjection\Definition:private] => 1
[deprecated:Symfony\Component\DependencyInjection\Definition:private] =>
[deprecationTemplate:Symfony\Component\DependencyInjection\Definition:private] =>
[properties:Symfony\Component\DependencyInjection\Definition:private] => Array
(
[_serviceId] => blazy.manager
)
[calls:Symfony\Component\DependencyInjection\Definition:private] => Array
(
[0] => Array
(
[0] => setRoot
[1] => Array
(
[0] =>
)
)
[1] => Array
(
[0] => setLanguageManager
[1] => Array
(
[0] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => language_manager
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
)
)
)
[instanceof:Symfony\Component\DependencyInjection\Definition:private] => Array
(
)
[autoconfigured:Symfony\Component\DependencyInjection\Definition:private] =>
[configurator:Symfony\Component\DependencyInjection\Definition:private] =>
[tags:Symfony\Component\DependencyInjection\Definition:private] => Array
(
[_provider] => Array
(
[0] => Array
(
[provider] => blazy
)
)
)
[public:Symfony\Component\DependencyInjection\Definition:private] => 1
[private:Symfony\Component\DependencyInjection\Definition:private] =>
[synthetic:Symfony\Component\DependencyInjection\Definition:private] =>
[abstract:Symfony\Component\DependencyInjection\Definition:private] =>
[lazy:Symfony\Component\DependencyInjection\Definition:private] =>
[decoratedService:Symfony\Component\DependencyInjection\Definition:private] =>
[autowired:Symfony\Component\DependencyInjection\Definition:private] =>
[autowiringTypes:Symfony\Component\DependencyInjection\Definition:private] => Array
(
)
[changes:Symfony\Component\DependencyInjection\Definition:private] => Array
(
[class] => 1
[autoconfigured] => 1
)
[bindings:Symfony\Component\DependencyInjection\Definition:private] => Array
(
)
[errors:Symfony\Component\DependencyInjection\Definition:private] => Array
(
[0] => You have requested a non-existent parameter "app.root".
)
[arguments:protected] => Array
(
[0] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => entity.repository
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
[1] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => entity_type.manager
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
[2] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => module_handler
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
[3] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => renderer
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
[4] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => config.factory
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
[5] => Symfony\Component\DependencyInjection\Reference Object
(
[id:Symfony\Component\DependencyInjection\Reference:private] => cache.default
[invalidBehavior:Symfony\Component\DependencyInjection\Reference:private] => 1
)
)
)
Proposed resolution
- Only solution i could find is to lock blazy on 2.5
- run composer update completed and the error disappeared
- All websites started to work again.
- Root cause of the issue is still unknown. Any assistance on this topic will be helpful.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3263027-app-root-10.patch | 10.31 KB | gausarts |
Comments
Comment #2
gausarts commentedThank you.
What is your Drupal version?
The `
app.root` service won't be gone till D10:https://www.drupal.org/node/3080612
The only leftover of `
app.root` was in the test which was just fixed 5 hours ago:https://git.drupalcode.org/project/blazy/-/commit/c57bfaff00ee7b421799b5...
I doubt tests cause issues on updates :)
The only sub-modules which still held this service were Slick and Splide which were also just fixed.
Comment #3
gausarts commented> You have requested a non-existent parameter
Ah, not service, but parameter. That message was pretty similar.
Your Drupal must be below D9, then :)
Try upgrading Drupal first till we provide BC layer.
Comment #4
gausarts commentedComment #5
gausarts commentedFWIW, D8 had EOL for months :)
TBD, two possible solutions:
#3254668: Replace builtin once with core once.
Like here: https://www.drupal.org/project/blazy/issues/3254668#comment-14341006
The only thing that reverted the first was sub-modules haven't been all updated to remove D8.
Comment #6
mably commentedSame here, our D8 instances crashed on update.
This latest version should definitely indicate that it requires Drupal 9+.
Lost a few hours on this.
Comment #7
gausarts commented@mably, sorry for inconvenience :)
Next time, please understand one thing:
If I release modules after weekend, it means:
If you want to help, you are welcome to test them out. If not ready for breakages, please follow weekend warriors path.
This also helps me laser-focus my bug-buster instinct due to nearing weekend, normally where hot fix releases are.
If I release a day or on weekend, I am being confident to welcome weekend warriors.
As far as my experiences, whenever I want to update or upgrade things, I always do two things:
Back to the OP, I am still thinking about the two options mentioned above.
If anyone are willing to help, I currently don't have D8 to test it out, see the link above for sample from CDN module.
Patches are welcome. Thanks.
Comment #8
bogdog400 commentedJust wanted to say that this new version is crashing my Drupal 8 site after composer upgrade too.
To debug it, I put in a print_r command in the Symfony injection code to print out the $value in DefinitionErrorExceptionPass.
Any thoughts or suggestions, let me know.
Thx for the upgrade.
Comment #9
gausarts commentedImmediate solution till a new hot fix is as the OP said:
> Only solution i could find is to lock blazy on 2.5
Comment #10
gausarts commentedLet's see if any misses.
Be sure to run update or clear cache in the least due to changing service arguments.
Let me know if this works for your D8. Thanks.
Comment #12
gausarts commentedWe got a new hot fix release to catch up this weekend.
Feel free to re-open if the issue still stands.
Committed. Thank you for contribution.
Comment #13
bogdog400 commentedI just ran "composer upgrade" and it brought Blazy from 2.5 to 2.6 on my Drupal 8.9.20 site without a problem.
Thx.
Comment #14
bogdog400 commentedWait. I spoke too soon. A few pages that broke before are now fine. But then I discovered that some other pages were still broken. And asking drush to updb wasn't working either.
So I tried to apply the patch and got this response:
And here's the error after applying the patch. The main content pages are still failing:
Comment #15
gausarts commentedLooks like you have different Blazy codebase than the expected patch?
The patch in #10 wouldn't apply if it were the same as yours. But it did.
To avoid that, try requiring @dev, not applying the patch.
Let me know.
Comment #16
bogdog400 commentedWell, I solved my problem by stripping out the last few modules that were preventing me from upgrading this site to 9.3.5. Sorry I can't help debug this any more. Thanks for the attention and for continuing to support the module.
Comment #17
drp_distruptorApplying patch #10 solved my problem, and saved my day.
PS. As the comment #15, also my instance return the error on the test:
Comment #18
gausarts commentedHm, not sure about that failing patch, then :)
As per https://www.drupal.org/node/2663268/qa:
> PHP 7.3 & MySQL 5.7, D8.9.20 run-tests.sh fatal error disabled, testing configuration no longer available
Looks like a won't fix for D8, but not D9+.
IMHO, we shouldn't worry about D8 tests unless anyone have compelling reasons to re-enact EOLed D8 test bot :)
Comment #19
sershevchykI have the same problem with Drupal 8.9.20. I can't apply patch #10.
Comment #20
drp_distruptor@sershevchyk why can't you apply the patch? What is the problem?
Comment #21
tanmaykI too got the error while applying the patch. But blazy module seems updated with the changes in patch. Odd.
Could be composer issue? Never seen such behavior before though.
Comment #22
liberatrLocking to 2.5 is the only thing I was able to do to get Drupal to bootstrap - I am upgrading a site from an old 8.7.x codebase to 8.9.20 -- once database update is complete, then site can bootstrap with no issues.
Comment #23
thirstysix commentedIt's fixed with
composer require 'drupal/blazy:2.x-dev@dev'Drupal 8.9.20
Blazy 2.x-dev
I faced the same issue. When i run the composer update..
vendor/bin/drush cr
I have removed vendor folder & removed composer.lock file also.. ran again the composer update. but it shows the below error.
In DefinitionErrorExceptionPass.php line 37:
You have requested a non-existent parameter "app.root".
And I tried /vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
& print the value a print_r($value) right above the error
& the error is related to Blazy as they mentioned one of the other forums
I have updated the DEV blazy module.. It works, Cheers :)
Comment #24
logeshvaran commented@ThirstySix Thanks!
I updated the Blazy Dev Module. Its working fine
Comment #25
dd 85 commentedHello!
Drupal core 8.9.20
Encountered this error when upgrading from Blazy 8.x-2.5 to Blazy 8.x-2.6
Dev version of Blazy 8.x-2.6+15-dev has fixed this bug perfectly.
Thanks.