Magento2: "Section source is not supported" JS error when enabling PayPal

Created on 25 Aug 2017  路  14Comments  路  Source: magento/magento2

After enabling PayPal Express as payment method, the following Javascript error appears on all pages:

http://sds-shop.local.dev/customer/section/load/?sections=cart-data&update_section_id=false&_=1503661222518

The mentioned solution in here #6410, to clear the local storage does not help.

Preconditions

  1. Magento CE 2.1.8
  2. Google Chrome 60.0.3112.101

Steps to reproduce

  1. Configure and enable PayPal Express
  2. Put product in to cart
  3. Go to checkout
  4. Cancel and go back to homepage
  5. Error appears.

Expected result

The AJAX call to http://sds-shop.local.dev/customer/section/load/?sections=cart-data&update_section_id=false&_=1503661222518 should work and not resulting in a Javascript error.

Actual result

The console in Google Chrome shows an error.
AJAx Request fails with error 400: http://sds-shop.local.dev/customer/section/load/?sections=cart-data&update_section_id=false&_=1503661222518

Uncaught Error: [object Object]

Response: {"message":""cart-data" section source is not supported."}

jserror

Fixed in 2.2.x Clear Description Confirmed Format is valid Reproduced on 2.1.x bug report

Most helpful comment

Seems the related fix was done in https://github.com/magento/magento2/commit/3234a41ad7714fae5f2d7b83fdc46ce50f8f0241 for app/code/Magento/Checkout/etc/frontend/di.xml

Adding this one line fixed my issue on 2.1.9.


@@ -33,6 +33,7 @@
         <arguments>
             <argument name="clientSideSections" xsi:type="array">
                 <item name="checkout-data" xsi:type="string">checkout-data</item>
+                <item name="cart-data" xsi:type="string">cart-data</item>
             </argument>
         </arguments>
     </type>

All 14 comments

Try to check contents of this response in Network tab and records in var/log of your Magento instance.

@orlangur The response displayed in the Network tab is {"message":"&quot;cart-data&quot; section source is not supported."} - as I already stated.
Checking var/log/system.log, which is the only error log created after deleting everything in var/log, there is nothing regarding this issue.

I'm also having this issue, except I don't have Paypal enabled. I'm not sure where it comes from, whether it's something I did or a third party extension.

Honestly, it's a confusing message and I'm having trouble debugging it..

edit: actually, I can't reproduce this in incognito.. never mind.

same here
happening to me
not related to paypal
we dont know what is it

same problem here on magento 2.1.9
I tried this solution : https://github.com/magento/magento2/issues/6410#issuecomment-243704461
It works well until I switch from my french store to the english store... It seems to be cache/storage related.

I also encountered this issue.
The only thing I found is that Magento checkout cache uses this section name and when it should be deleted there is null value set (but record still exists).

As I see totals-processor uses this key.

@codedge, thank you for your report.
The issue is already fixed in 2.2.0

Seems the related fix was done in https://github.com/magento/magento2/commit/3234a41ad7714fae5f2d7b83fdc46ce50f8f0241 for app/code/Magento/Checkout/etc/frontend/di.xml

Adding this one line fixed my issue on 2.1.9.


@@ -33,6 +33,7 @@
         <arguments>
             <argument name="clientSideSections" xsi:type="array">
                 <item name="checkout-data" xsi:type="string">checkout-data</item>
+                <item name="cart-data" xsi:type="string">cart-data</item>
             </argument>
         </arguments>
     </type>

@elvinristi Does this patch fixed the issue?

@intercase , for us, yes.

After clearing the cookies all works as well.

Just clear browser cookies, all works well :)

Thanks @shinesoftware (y) that worked

This should be backported to 2.1 branch. Fix is working.

I received this error when switching between different docker environments that were sharing the same hostname (magento2.docker). I was able to fix it by clearing all of the browser site data (in addition to the cookies).

Was this page helpful?
0 / 5 - 0 ratings