I created a custom column using my custom module after that
I removed that custom column manually from table mg_catalog_category_flat_store_1 magento 2 phpmyadmin
after that this error accur in frontend and backend in magento 2
1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid entity_type specified: catalog_category
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid entity_type specified: catalog_category
#0 /var/www/html/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(309): Magento\Eav\Model\Config->getEntityType('catalog_categor...')
#1 /var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(453): Magento\Eav\Model\Entity\AbstractEntity->setType('catalog_categor...')
#2 /var/www/html/vendor/magento/module-catalog/Model/ResourceModel/Category.php(129): Magento\Catalog\Model\ResourceModel\Category\Interceptor->setType('catalog_categor...')
#3 /var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(24): Magento\Catalog\Model\ResourceModel\Category->getEntityType()
#4 /var/www/html/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(803): Magento\Catalog\Model\ResourceModel\Category\Interceptor->getEntityType()
#5 /var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(674): Magento\Eav\Model\Entity\AbstractEntity->getEntityIdField()
#6 /var/www/html/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(284): Magento\Catalog\Model\ResourceModel\Category\Interceptor->getEntityIdField()
#7 /var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(427): Magento\Eav\Model\Entity\AbstractEntity->getIdFieldName()
#8 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(215): Magento\Catalog\Model\ResourceModel\Category\Interceptor->getIdFieldName()
#9 /var/www/html/vendor/magento/module-catalog/Model/Category.php(319): Magento\Framework\Model\AbstractModel->_init('Magento\\Catalog...')
#10 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(194): Magento\Catalog\Model\Category->_construct()
#11 /var/www/html/vendor/magento/framework/Model/AbstractExtensibleModel.php(68): Magento\Framework\Model\AbstractModel->__construct(Object(Magento\Framework\Model\Context), Object(Magento\Framework\Registry), NULL, NULL, Array)
#12 /var/www/html/vendor/magento/module-catalog/Model/AbstractModel.php(97): Magento\Framework\Model\AbstractExtensibleModel->__construct(Object(Magento\Framework\Model\Context), Object(Magento\Framework\Registry), Object(Magento\Framework\Api\ExtensionAttributesFactory), Object(Magento\Framework\Api\AttributeValueFactory), NULL, NULL, Array)
#13 /var/www/html/vendor/magento/module-catalog/Model/Category.php(303): Magento\Catalog\Model\AbstractModel->__construct(Object(Magento\Framework\Model\Context), Object(Magento\Framework\Registry), Object(Magento\Framework\Api\ExtensionAttributesFactory), Object(Magento\Framework\Api\AttributeValueFactory), Object(Magento\Store\Model\StoreManager), NULL, NULL, Array)
#14 /var/www/html/generated/code/Magento/Catalog/Model/Category/Interceptor.php(14): Magento\Catalog\Model\Category->__construct(Object(Magento\Framework\Model\Context), Object(Magento\Framework\Registry), Object(Magento\Framework\Api\ExtensionAttributesFactory), Object(Magento\Framework\Api\AttributeValueFactory), Object(Magento\Store\Model\StoreManager), Object(Magento\Catalog\Model\Category\AttributeRepository), Object(Magento\Catalog\Model\ResourceModel\Category\Tree), Object(Magento\Catalog\Model\ResourceModel\Category\TreeFactory), Object(Magento\Store\Model\ResourceModel\Store\CollectionFactory), Object(Magento\Framework\Url), Object(Magento\Catalog\Model\ResourceModel\Product\CollectionFactory), Object(Magento\Catalog\Model\Config\Interceptor), Object(Magento\Framework\Filter\FilterManager), Object(Magento\Catalog\Model\Indexer\Category\Flat\State), Object(OlegKoval\RegenerateUrlRewrites\Model\CategoryUrlPathGenerator), Object(Magento\UrlRewrite\Model\Storage\DbStorage\Interceptor), Object(Magento\Framework\Indexer\IndexerRegistry), Object(Magento\Catalog\Model\CategoryRepository), NULL, NULL, Array)
#15 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Catalog\Model\Category\Interceptor->__construct(Object(Magento\Framework\Model\Context), Object(Magento\Framework\Registry), Object(Magento\Framework\Api\ExtensionAttributesFactory), Object(Magento\Framework\Api\AttributeValueFactory), Object(Magento\Store\Model\StoreManager), Object(Magento\Catalog\Model\Category\AttributeRepository), Object(Magento\Catalog\Model\ResourceModel\Category\Tree), Object(Magento\Catalog\Model\ResourceModel\Category\TreeFactory), Object(Magento\Store\Model\ResourceModel\Store\CollectionFactory), Object(Magento\Framework\Url), Object(Magento\Catalog\Model\ResourceModel\Product\CollectionFactory), Object(Magento\Catalog\Model\Config\Interceptor), Object(Magento\Framework\Filter\FilterManager), Object(Magento\Catalog\Model\Indexer\Category\Flat\State), Object(OlegKoval\RegenerateUrlRewrites\Model\CategoryUrlPathGenerator), Object(Magento\UrlRewrite\Model\Storage\DbStorage\Interceptor), Object(Magento\Framework\Indexer\IndexerRegistry), Object(Magento\Catalog\Model\CategoryRepository), NULL, NULL, Array)
#16 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Catalog...', Array)
#17 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...', Array)
#18 /var/www/html/generated/code/Magento/Catalog/Model/CategoryFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create('\\Magento\\Catalo...', Array)
#19 /var/www/html/vendor/magento/module-catalog/Helper/Category.php(99): Magento\Catalog\Model\CategoryFactory->create()
#20 /var/www/html/generated/code/Magento/Catalog/Helper/Category/Interceptor.php(24): Magento\Catalog\Helper\Category->getStoreCategories(true, false, true)
#21 /var/www/html/app/code/Phppoets/Megamenu/Block/Topmenu.php(60): Magento\Catalog\Helper\Category\Interceptor->getStoreCategories(true, false, true)
#22 /var/www/html/app/code/Phppoets/Megamenu/Block/Topmenu.php(192): Phppoets\Megamenu\Block\Topmenu->getStoreCategories(true, false, true)
#23 /var/www/html/app/design/frontend/Emthemes/everything/default/Phppoets_Megamenu/templates/topmenu.phtml(20): Phppoets\Megamenu\Block\Topmenu->getMegamenuHtml()
#24 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/html/a...')
#25 /var/www/html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Phppoets\Megamenu\Block\Topmenu), '/var/www/html/a...', Array)
#26 /var/www/html/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/html/a...')
#27 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#28 /var/www/html/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#29 /var/www/html/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('sw.topnav')
#30 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('sw.topnav')
#31 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sw.topnav')
#32 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('sw.topnav', true)
#33 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(511): Magento\Framework\View\Layout\Interceptor->renderElement('sw.topnav', true)
#34 /var/www/html/vendor/magento/module-theme/view/frontend/templates/html/container.phtml(10): Magento\Framework\View\Element\AbstractBlock->getChildHtml()
#35 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/html/v...')
#36 /var/www/html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template), '/var/www/html/v...', Array)
#37 /var/www/html/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...')
#38 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#39 /var/www/html/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#40 /var/www/html/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('store.menu')
#41 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('store.menu')
#42 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('store.menu')
#43 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('store.menu', true)
#44 /var/www/html/app/design/frontend/Emthemes/everything/default/Magento_Theme/templates/html/em_sections.phtml(26): Magento\Framework\View\Layout\Interceptor->renderElement('store.menu')
#45 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/html/a...')
#46 /var/www/html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template), '/var/www/html/a...', Array)
#47 /var/www/html/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/html/a...')
#48 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#49 /var/www/html/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#50 /var/www/html/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('navigation.sect...')
#51 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('navigation.sect...')
#52 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('navigation.sect...')
#53 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('navigation.sect...', false)
#54 /var/www/html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('navigation.sect...', false)
#55 /var/www/html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('header-wrapper-...', false)
#56 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('header-wrapper-...')
#57 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header-wrapper-...')
#58 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('header-wrapper-...', false)
#59 /var/www/html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('header-wrapper-...', false)
#60 /var/www/html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('header-wrapper', false)
#61 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('header-wrapper')
#62 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header-wrapper')
#63 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('header-wrapper', false)
#64 /var/www/html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('header-wrapper', false)
#65 /var/www/html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('header.bottom', false)
#66 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('header.bottom')
#67 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.bottom')
#68 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('header.bottom', false)
#69 /var/www/html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('header.bottom', false)
#70 /var/www/html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('header.containe...', false)
#71 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('header.containe...')
#72 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.containe...')
#73 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('header.containe...', false)
#74 /var/www/html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('header.containe...', false)
#75 /var/www/html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#76 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#77 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#78 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#79 /var/www/html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false)
#80 /var/www/html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('root', false)
#81 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#82 /var/www/html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#83 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#84 /var/www/html/vendor/magento/framework/View/Layout.php(955): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#85 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#86 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#87 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}()
#88 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#89 /var/www/html/vendor/magento/framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#90 /var/www/html/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#91 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#92 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#93 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#94 /var/www/html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#95 /var/www/html/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#96 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#97 /var/www/html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#98 /var/www/html/pub/index.php(38): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#99 {main}**