I'm working on an order updater and got everything working except for the shipment notifier (sending the email on order completion).
The log below shows looping over three orders and the errors being thrown when $this->ShipmentNotifier->notify($shipment);
is being called.
I already load configuration using $objectManager->configure($configLoader->load('frontend'));
My log is as follows:
[2016-12-23 09:02:48] main.INFO: Company\Plugin\Cron\Orders::update [] []
[2016-12-23 09:02:48] main.INFO: Updating 000000006 [] []
[2016-12-23 09:02:49] main.ERROR: Required parameter 'theme_dir' was not passed [] []
[2016-12-23 09:02:49] main.INFO: Updating 000000013 [] []
[2016-12-23 09:02:49] main.ERROR: Environment emulation nesting is not allowed. [] []
[2016-12-23 09:02:49] main.ERROR: From Header set twice [] []
[2016-12-23 09:02:49] main.INFO: Updating 000000015 [] []
[2016-12-23 09:02:49] main.ERROR: From Header set twice [] []
Even with the errors being thrown ShipmentNotifier is still returning true.
What am I missing?
ps: The code I'm using is largely following this tutorial: http://www.magestore.com/magento-2-tutorial/how-to-create-shipment-programmatically-in-magento-2/ Only difference being that I am using dependency injection instead of the object manager.