When i installed latest version of library module. I am getting below error
TypeError: Drupal\Component\DependencyInjection\ReverseContainer::generateServiceIdHash(): Argument #1 ($object) must be of type object, null given in Drupal\Component\DependencyInjection\ReverseContainer->generateServiceIdHash() (line 87 of /home/vsts/work/1/s/docroot/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php) #0 [internal function]: Drupal\Component\DependencyInjection\ReverseContainer->generateServiceIdHash(
My environment config is below
Drupal version : 10.0.9
libraries module version : 4.0.4
PHP version: 8.1
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3367706-15.patch | 2.33 KB | abhinesh |
Issue fork libraries-3367706
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tolstoydotcomI was able to install it without error on Drupal 10.0.9. That's using PHP 8.2 so it could be that, but the more likely explanation is something else you already have installed. Try disabling other things and clearing cache afterwards to pin it down.
Comment #3
alfattal commented@TolstoyDotCom Like, what otherings?
Comment #4
tolstoydotcomWithout a full stack trace and without OP trying what I suggested it's hard to tell what it could be.
Comment #5
joseph.olstadWhat you can do is use this debugging technique and look at the stack of calls, look for module names and library names involved.
look at the comments on this page, explains a bit , put the debug right in the file that is throwing the error.
https://www.php.net/manual/en/function.debug-print-backtrace.php
Comment #6
joseph.olstadComment #7
alfattal commented@joseph.olstad Here is the full backtrace for the error I'm getting:
Comment #8
joseph.olstad@alfattal, thanks for that however it doesn't say "which" dependency or module or library or theme is causing the problem, the default core exception in this case is not helpful.
I suggest having a look at the debug technique shown in the link I mentioned here (mentioned above also):
https://www.php.net/manual/en/function.debug-print-backtrace.php
I had some good luck with the last example mentioned in the comments , the A, B and C class.
With that said, the others may be simpler if you have issues try the others. I was able to get the last example working and it was very helpful.
Comment #9
trigve hagen commentedYou may need to have HAL installed. That fixed mine.
Comment #10
rakshith.thotada commentedI think if you have exported libraries config to default folder -> libraries.settings.yml - Delete it and setup in CI should work fine.
This I tried after a lot of iteration. Finally it worked
Also after libraries module installation - reexport the config
Comment #11
edvanleeuwenI have the same error. If I install libraries last, it is okay.
Comment #12
danrodI am having the same issue if I list the libraries module as a dependency in my custom module *.info.yml file.
Comment #15
abhineshIt seems there is an error with the "libraries.settings.yml" configuration. I moved it to the optional directory as a temporary solution.
Comment #16
joseph.olstadComment #17
joseph.olstadCuriously, the pipeline has several failures with this change.
Comment #18
realityloop commentedI can confirm this issue was causing test fails for toggle_editable_fields module, I had to add the following to the ci task so that it would pass:
Comment #20
joseph.olstadComment #23
joseph.olstadThis change breaks automated test.
Comment #24
dak5859 commentedAny other movement on this issue? I'm still seeing this same error on fresh installs. Not seeing any fixes in this thread.
Drupal version : 10.0.9
Libraries module version : 4.1.1
PHP version: 8.1
Comment #25
ejanus commentedI'm running into this on my build step as well.
Drupal: 10.5.4
libraries: 4.1.1
PHP: 8.3.27
Using patch #15 in this issue for some time and it works on other env. Odd will report back if I have an exact reason some environments (local) build and my new macbook setup does not.
Since I'm still using BLT, I added libraries under
As a temp fix.