cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Upgrade: Cannot Cannot use object of type Closure as array in - Installer.php:1288

SOLVED

Cannot Upgrade: Cannot Cannot use object of type Closure as array in - Installer.php:1288

When I attempt to upgrade modules I keep getting this error:

 

----------------------

 

PHP Fatal error:  Uncaught Error: Cannot use object of type Closure as array in /chroot/home/sticker1/stickershark.com/html/setup/src/Magento/Setup/Model/Installer.php:1288

Stack trace:

#0 /chroot/home/sticker1/stickershark.com/html/setup/src/Magento/Setup/Model/Installer.php(1013): Magento\Setup\Model\Installer->cleanupGeneratedFiles()

#1 /chroot/home/sticker1/stickershark.com/html/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php(72): Magento\Setup\Model\Installer->updateModulesSequence(false)

#2 /chroot/home/sticker1/stickershark.com/html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Magento\Setup\Console\Command\UpgradeCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#3 /chroot/home/sticker1/stickershark.com/html/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\ in /chroot/home/sticker1/stickershark.com/html/setup/src/Magento/Setup/Model/Installer.php on line 1288

 

---------------

 

The only thing I can find online is it must be a custom module. I've uninstalled quite a few unused ones. I've disabled a few others. Will disabling a plugin help solve this or will I have to uninstall the entire plugin? Every new extension I introduced has been removed, so I'm not sure why any existing one would cause the issue. Also there are quite a few modules I am unsure of considering I jumped into this project after completion. Here is a list of modules using module:status:

 

Magento_Store

Magento_Directory

MGS_Blog

MGS_Brand

MGS_Mmegamenu

MGS_Mpanel

MGS_Portfolio

MGS_Promobanners

Magento_Eav

MGS_Social

MGS_StoreLocator

MGS_Testimonial

Magento_Config

Magento_AdvancedPricingImportExport

Magento_Backend

Magento_Theme

Magento_Authorization

Magento_Backup

Magento_Customer

Magento_AdminNotification

Magento_BundleImportExport

Magento_CacheInvalidate

Magento_Indexer

Magento_Cms

Magento_CatalogImportExport

Magento_Catalog

Magento_Rule

Magento_Payment

Magento_Search

Magento_CatalogUrlRewrite

Magento_Widget

Magento_Quote

Magento_CheckoutAgreements

MGS_QuickView

Magento_CmsUrlRewrite

Magento_ConfigurableImportExport

Magento_Msrp

Magento_Contact

Magento_Cookie

Magento_Cron

Magento_CurrencySymbol

Magento_SalesSequence

Magento_CustomerImportExport

Magento_Deploy

Magento_Developer

Magento_Dhl

Magento_Sales

Magento_Downloadable

Magento_ImportExport

Magento_Bundle

Magento_Email

Magento_User

Magento_Fedex

Magento_GiftMessage

Magento_CatalogInventory

Magento_GoogleAnalytics

Magento_Ui

Magento_GroupedImportExport

Magento_GroupedProduct

Magento_DownloadableImportExport

Magento_Checkout

Magento_Security

Magento_LayeredNavigation

Magento_Marketplace

Magento_MediaStorage

Magento_CatalogRule

Magento_Multishipping

Magento_ConfigurableProduct

Magento_Newsletter

Magento_OfflinePayments

Magento_SalesRule

Magento_PageCache

Magento_Vault

Magento_Paypal

Magento_Persistent

Magento_ProductAlert

Magento_ProductVideo

Magento_Captcha

Magento_Reports

Magento_RequireJs

Magento_Review

Magento_Rss

Magento_CatalogRuleConfigurable

Magento_Authorizenet

Magento_SalesInventory

Magento_OfflineShipping

Magento_GoogleAdwords

Magento_SampleData

Magento_CatalogSearch

Magento_Integration

Magento_SendFriend

Magento_Shipping

Magento_Sitemap

Magento_Swagger

Magento_Swatches

Magento_SwatchesLayeredNavigation

Magento_Tax

Magento_TaxImportExport

Magento_NewRelicReporting

Magento_Translation

Magento_GoogleOptimizer

Magento_Ups

Magento_UrlRewrite

Magento_EncryptionKey

Magento_Usps

Magento_Variable

Magento_Braintree

Magento_Version

Magento_Webapi

Magento_WebapiSecurity

Magento_Weee

Magento_CatalogWidget

Magento_Wishlist

 

List of disabled modules:

Itoris_ProductPriceFormula

MGS_Acm

Itoris_Core

Itoris_DynamicProductOptions

WebShopApps_MatrixRate

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cannot Upgrade: Cannot Cannot use object of type Closure as array in - Installer.php:1288

Found something from a removed module in root/Lib/Internal and it seems to be resolved.

View solution in original post

3 REPLIES 3

Re: Cannot Upgrade: Cannot Cannot use object of type Closure as array in - Installer.php:1288

Hello @travis_bunn

 

It must be issue in any custom extension, Please try to remove your custom extension and try to install them one by one.

 

Or

 

recursively delete the folder var/cache and generation/ . In the generation folder, what is created when run the bin/magento setup:di:compile.

sudo rm -rf var/ generation/

Grant the rights to the current directory

sudo chmod -R 0777 .sudo bin/magento setup:di:compile

sudo bin/magento setup:upgrade
Manish Mittal
https://www.manishmittal.com/

Re: Cannot Upgrade: Cannot Cannot use object of type Closure as array in - Installer.php:1288

As I noted in my original problem I've been taking down extensions in an attempt to fix the issue. I'm coming into this project in the middle. I have taken down most extensions I added or were not being used that I could figure out. There is still a huge list, but nothing seems to be resolving the issue.

 

I also have no sudo access per Nexcess standards. This does not resolve my issue.

Re: Cannot Upgrade: Cannot Cannot use object of type Closure as array in - Installer.php:1288

Found something from a removed module in root/Lib/Internal and it seems to be resolved.