Area code not set

Take a look here:

Magento\Framework\ObjectManager\ObjectManager->get() at /opt/bitnami/apps/magento/htdocs/app/code/J2t/Rewardpoints/Observer/ProcessSaveModel.php:21

Looks like this module is trying to grab the Object Manager which might be triggering the error if that area code is not set. In my comment, i linked to a solution i found to this error for an extension i was using. Might help you out here as the call to the Object Manager is happening in an Observer.

Here is that link again: Magento 2 "Area code not set" warning in 3rd party module


I just experienced this issue running bin/magento setup:upgrade, and the exception was thrown by module-config.

Area code is not set {"exception":"[object] (Magento\\Framework\\Exception\\State\\InvalidTransitionException(code: 0): Area code is not set at /magento/htdocs/vendor/magento/module-config/Model/Config/Importer.php:137

It turned out that I had some settings in app/etc/env.php that the configuration importer did not like. Setting a breakpoint on that line showed me which data was trying to be updated, and removing that from app/etc/env.php fixed the issue for me.

Hope this helps someone!