cancel
Showing results for 
Search instead for 
Did you mean: 

Segment::init() requires secret in ...

Highlighted
Occasional Visitor

Segment::init() requires secret in ...

Hi Forum

I have a problem with for example adding products to cart or to compare. The frontend only reloads and I get back to the product but it is not in the cart.

I get the following in the exeption logs:

 

==> log/exception.log <==
[2017-03-20 12:24:55] main.CRITICAL: Exception: Segment::init() requires secret in /home/www-data/ecom.datonus.ch/vendor/segmentio/analytics-php/lib/Segment.php:142
Stack trace:
#0 /home/www-data/ecom.datonus.ch/vendor/segmentio/analytics-php/lib/Segment.php(20): Segment::assert(NULL, 'Segment::init()...')
#1 /home/www-data/ecom.datonus.ch/vendor/windsorcircle/segment/Observer/AddedProduct.php(43): Segment::init(NULL)
#2 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): WindsorCircle\Segment\Observer\AddedProduct->execute(Object(Magento\Framework\Event\Observer))
#3 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(WindsorCircle\Segment\Observer\AddedProduct), Object(Magento\Framework\Event\Observer))
#4 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#5 /home/www-data/ecom.datonus.ch/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('checkout_cart_p...', Array)
#6 /home/www-data/ecom.datonus.ch/vendor/magento/module-checkout/Model/Cart.php(402): Magento\Framework\Event\Manager\Proxy->dispatch('checkout_cart_p...', Array)
#7 /home/www-data/ecom.datonus.ch/var/generation/Magento/Checkout/Model/Cart/Interceptor.php(115): Magento\Checkout\Model\Cart->addProduct(Object(Magento\Catalog\Model\Product\Interceptor), Array)
#8 /home/www-data/ecom.datonus.ch/vendor/magento/module-checkout/Controller/Cart/Add.php(103): Magento\Checkout\Model\Cart\Interceptor->addProduct(Object(Magento\Catalog\Model\Product\Interceptor), Array)
#9 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Checkout\Controller\Cart\Add->execute()
#10 /home/www-data/ecom.datonus.ch/var/generation/Magento/Checkout/Controller/Cart/Add/Interceptor.php(26): Magento\Checkout\Controller\Cart\Add\Interceptor->___callPlugins('execute', Array, Array)
#11 /home/www-data/ecom.datonus.ch/vendor/magento/framework/App/Action/Action.php(102): Magento\Checkout\Controller\Cart\Add\Interceptor->execute()
#12 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#13 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Checkout\Controller\Cart\Add\Interceptor->___callParent('dispatch', Array)
#14 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Array, 'contextPlugin')
#15 /home/www-data/ecom.datonus.ch/vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#16 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Array, 'customer-app-ac...')
#18 /home/www-data/ecom.datonus.ch/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#19 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Array, 'storeCheck')
#21 /home/www-data/ecom.datonus.ch/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#22 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#23 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Array, 'weee-app-action...')
#24 /home/www-data/ecom.datonus.ch/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#25 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Array, 'tax-app-action-...')
#27 /home/www-data/ecom.datonus.ch/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(110): Magento\Checkout\Controller\Cart\Add\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#28 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Add\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#29 /home/www-data/ecom.datonus.ch/var/generation/Magento/Checkout/Controller/Cart/Add/Interceptor.php(39): Magento\Checkout\Controller\Cart\Add\Interceptor->___callPlugins('dispatch', Array, Array)
#30 /home/www-data/ecom.datonus.ch/vendor/magento/framework/App/FrontController.php(55): Magento\Checkout\Controller\Cart\Add\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#31 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#33 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#34 /home/www-data/ecom.datonus.ch/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#35 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#37 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#38 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#39 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#40 /home/www-data/ecom.datonus.ch/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#41 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#42 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#43 /home/www-data/ecom.datonus.ch/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#44 /home/www-data/ecom.datonus.ch/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#45 /home/www-data/ecom.datonus.ch/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#46 /home/www-data/ecom.datonus.ch/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#47 /home/www-data/ecom.datonus.ch/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#48 /home/www-data/ecom.datonus.ch/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#49 {main} [] []

I have no idea what this error could cause Smiley Sad

 

I hope someone knows anything about this problem.

 

If you need more information about it, please ask! Smiley Happy

 

Best

Martin

1 REPLY
3 x Certified

Re: Segment::init() requires secret in ...

It seems like Segment.Io related extension from windsorcircle is causing the issues to you. As first aid, you can just disable that module.

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue