Immediately after updating to RC1, on two separate sites, I received the following error:
Recoverable fatal error: Argument 1 passed to Drupal\diff\VisualDiffThemeNegotiator::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of Drupal\Core\Session\AccountProxy given, called in core\lib\Drupal\Component\DependencyInjection\Container.php on line 280 and defined in Drupal\diff\VisualDiffThemeNegotiator->__construct() (line 29 of modules\diff\src\VisualDiffThemeNegotiator.php)
#0 core\includes\bootstrap.inc(548): _drupal_error_handler_real(4096, 'Argument 1 pass...', 'G:\\cws\\osud8bas...', 29, Array)
#1 modules\diff\src\VisualDiffThemeNegotiator.php(29): _drupal_error_handler(4096, 'Argument 1 pass...', 'G:\\cws\\osud8bas...', 29, Array)
#2 core\lib\Drupal\Component\DependencyInjection\Container.php(280): Drupal\diff\VisualDiffThemeNegotiator->__construct(Object(Drupal\Core\Session\AccountProxy), Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\Core\Entity\EntityManager), Object(Drupal\Core\Routing\AdminContext))
#3 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'theme.negotiato...')
#4 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('theme.negotiato...', 1)
#5 core\lib\Drupal\Component\DependencyInjection\Container.php(329): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#6 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'theme.negotiato...')
#7 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('theme.negotiato...', 1)
#8 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#9 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'theme.manager')
#10 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('theme.manager', 1)
#11 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#12 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'library.discove...')
#13 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('library.discove...', 1)
#14 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#15 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'library.discove...')
#16 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('library.discove...', 1)
#17 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#18 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'library.discove...')
#19 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('library.discove...', 1)
#20 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass)) #21 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'asset.resolver')
#22 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('asset.resolver', 1)
#23 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#24 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'ajax_response.a...')
#25 core\lib\Drupal\Component\DependencyInjection\Container.php(494): Drupal\Component\DependencyInjection\Container->get('ajax_response.a...', 1)
#26 core\lib\Drupal\Component\DependencyInjection\Container.php(236): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Object(stdClass))
#27 core\lib\Drupal\Component\DependencyInjection\Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'ajax_response.s...')
#28 core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(108): Drupal\Component\DependencyInjection\Container->get('ajax_response.s...')
#29 vendor\symfony\http-kernel\HttpKernel.php(120): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent))
#30 vendor\symfony\http-kernel\HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#31 core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 core\modules\page_cache\src\StackMiddleware\PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 core\modules\page_cache\src\StackMiddleware\PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 core\lib\Drupal\Core\DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#40 {main}.
Reverting back to 1.0-beta2 cleared the issue up for me in both instances.
Comments
Comment #2
Mark Isherwood CreditAttribution: Mark Isherwood commentedI also recieved this error on a default 8.2 Acquia Lightning install after updating the diff module. I hadn't done any configuration to the site except for installing the ECK module. Reverting the module to 1.0.0-beta2 removed the error for me too.
Comment #3
Alan D. CreditAttribution: Alan D. commentedIn case it matters, which core version?
Comment #4
Jonah Fenn CreditAttribution: Jonah Fenn commentedWhoops, sorry about that. Both sites are using 8.2.5.
Comment #5
Alan D. CreditAttribution: Alan D. commentedActually, this could be due to a stale cache here, it's complaining that AccountProxy was given rather than ConfigFactory, from this change:
#2825032: VisualDiffThemeNegotiator has a needless dependency on user.module (2016-11-04)
http://cgit.drupalcode.org/diff/commit/?id=375edf800d40998f97705cd38e745...
Did you run updates? And if those didn't clear the caching, drush or similar help here? (i.e. drush cr).
Was /admin/config/development/performance accessible to clear from there? Like was you entire site dead with the update, or just the Diff pages?
Comment #6
Jonah Fenn CreditAttribution: Jonah Fenn commentedWhen the incident happened, I just received the standard "The website encountered an unexpected error. Please try again later" message on a white screen - the site was completely down. The detailed message I provided came from my logs after I reverted back to the beta2 version.
I typically run drush updb after a module update. I had my hands in a couple of different things yesterday morning so it could have possibly been overlooked.
I updated to rc1 again this morning and ran drush cr. This fixed the issue. Thanks for the prompt response!
Comment #7
Alan D. CreditAttribution: Alan D. commented(sorry, nothing set up to test myself)
For the second site, if the issue still happens after drush updb, ping the queue to let us know some manual cache clearing could be required.
Comment #8
Jonah Fenn CreditAttribution: Jonah Fenn commentedIt looks as if I did miss updating my db on the first go around. There was an update from another module lurking in there that probably contributed to the failure.
Thanks for your help with this. I've closed this ticket out.
Comment #9
Alan D. CreditAttribution: Alan D. commentedNp. glad I could help :)
Comment #10
rtackett CreditAttribution: rtackett as a volunteer commentedI received the same error, although I'm still on 8.2.3. I had cleared cache a few minutes prior to running the update. As the prev poster, I did have a couple db updates pending for other modules. Any way to insert a check for pending updates if the module update process is going to blow up each time this module is up'd?
Recoverable fatal error: Argument 1 passed to Drupal\diff\VisualDiffThemeNegotiator::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of Drupal\Core\Session\AccountProxy given, called in /Applications/MAMP/htdocs/site_name/core/lib/Drupal/Component/DependencyInjection/Container.php on line 280 and defined in Drupal\diff\VisualDiffThemeNegotiator->__construct() (line 29 of /Applications/MAMP/htdocs/site_name/modules/diff/src/VisualDiffThemeNegotiator.php)
Comment #11
Alan D. CreditAttribution: Alan D. commentedThis would be a core issue I believe.
Bit hard to understand exact steps to replicate.
i.e. something like this?
Update the code
Try to do something and site breaks
Run update.php
Site is fine
OR
Update the code
Try to run update.php but site breaks
Have to drush cr or similar (clear the caches)
Site is fine
#1 is works by design and core issue if you don't like that response
#2 is really a core issue too, but some way to prevent via the module should be considered (if possible).
Assuming this does not cause issues.
Update the code
Run update.php
Site is fine