cancel
Showing results for 
Search instead for 
Did you mean: 

Zend_Json_Exception: Decoding failed: Syntax error in ..lib/Zend/Json.php:97

Zend_Json_Exception: Decoding failed: Syntax error in ..lib/Zend/Json.php:97

We have faced a JSON Syntax Error on our Magento CE v1.9.3.6 site when uploading product image in admin. When we upload the image the page gets error page and in error log it shows following error message

 

Zend_Json_Exception: Decoding failed: Syntax error in /var/www/vhosts/savannah.fr/httpdocs/lib/Zend/Json.php:97
Stack trace:
#0 /httpdocs/app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php(570): Zend_Json::decode('<!DOCTYPE html>...')
#1 /httpdocs/app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php(317): Idev_OneStepCheckout_Model_Observers_PresetDefaults->_getGeoIp2Online('80.214.117.104', Object(Idev_OneStepCheckout_Model_Sales_Quote))
#2/httpdocs/app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php(261): Idev_OneStepCheckout_Model_Observers_PresetDefaults->getAddressGeoIP(Object(Idev_OneStepCheckout_Model_Sales_Quote))
#3 /httpdocs/app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php(200): Idev_OneStepCheckout_Model_Observers_PresetDefaults->getAddressDefaults(Object(Idev_OneStepCheckout_Model_Sales_Quote))
#4 /httpdocs/app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php(73): Idev_OneStepCheckout_Model_Observers_PresetDefaults->setAddressDefaults(Object(Varien_Event_Observer))
#5

/httpdocs/app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php(59): Idev_OneStepCheckout_Model_Observers_PresetDefaults->callDefaults(Object(Varien_Event_Observer))
#6

/httpdocs/app/code/core/Mage/Core/Model/App.php(1358): Idev_OneStepCheckout_Model_Observers_PresetDefaults->setDefaults(Object(Varien_Event_Observer))
#7

/httpdocs/app/code/core/Mage/Core/Model/App.php(1331): Mage_Core_Model_App->_callObserverMethod(Object(Idev_OneStepCheckout_Model_Observers_PresetDefaults), 'setDefaults', Object(Varien_Event_Observer))
#8 /httpdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('sales_quote_col...', Array)
#9 /httpdocs/app/code/core/Mage/Sales/Model/Quote.php(1313): Mage::dispatchEvent('sales_quote_col...', Array)
#10 /httpdocs/app/code/local/Idev/OneStepCheckout/Model/Sales/Quote.php(44): Mage_Sales_Model_Quote->collectTotals()
#11 /httpdocs/app/code/local/Mirasvit/Rewards/Model/Purchase.php(161): Idev_OneStepCheckout_Model_Sales_Quote->collectTotals()
#12 /httpdocs/app/code/local/Mirasvit/Rewards/Model/Purchase.php(141): Mirasvit_Rewards_Model_Purchase->refreshQuote(true)
#13 /httpdocs/app/code/local/Mirasvit/Rewards/Model/Observer/Order.php(45): Mirasvit_Rewards_Model_Purchase->refreshPointsNumber()
#14 /httpdocs/app/code/local/Mirasvit/Rewards/Model/Observer/Order.php(171): Mirasvit_Rewards_Model_Observer_Order->refreshPoints(Object(Idev_OneStepCheckout_Model_Sales_Quote))
#15 /httpdocs/app/code/core/Mage/Core/Model/App.php(1358): Mirasvit_Rewards_Model_Observer_Order->actionPredispatch(Object(Varien_Event_Observer))
#16 /httpdocs/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mirasvit_Rewards_Model_Observer_Order), 'actionPredispat...', Object(Varien_Event_Observer))
#17 /httpdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#18 /httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#19 /httpdocs/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
#20 /httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Core_Controller_Front_Action->preDispatch()
#21 /httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('check_email')
#22 /httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /httpdocs/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#24 //httpdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#25 /httpdocs/index.php(83): Mage::run('', 'store')
#26 {main}

 

We are running:
Magento CE v1.9.3.6
PHP v7.1.33

1 REPLY 1

Re: Zend_Json_Exception: Decoding failed: Syntax error in ..lib/Zend/Json.php:97

Hello,

 

Find the URL below, which is the same issue as yours, I'm sure it will work for you as well.

 

https://community.magento.com/t5/Magento-1-x-Technical-Issues/Zend-JSON-Exception-Decoding-failed-Sy...

If Issue Solved, Click Kudos/Accept As solutions.

 

Thanks.