NopCommerce 4.2 PayPal SmartButtons and PayPal Standard buttons disappear when using Firefox

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I have many customers who use FireFox. When they select PayPal payments the buttons load and then disappear.
1. I have been able to successfully recreate this as reported.
2. I have disabled popup blocker in FireFox
3. I have turned off all blocking & tracking in Firefox, same results
4. Cleared all cache in FireFox
I setup a breakpoint in FireFox web Dev and I get the following JS error for paypal sdk - which goes far beyond my knowledge level of JS. Any help of thoughts on how to resolve this would be greatly appreciated as I am losing sales, (I recently switched from Wordpress nopcommerce, where I used PayPal payments plugins without issues).

Error in FireFox Web Dev **********************************************************************************

/*! For license information please see output.js.LICENSE.txt */
!function(n,e){for(var t in e)n[t]=e[t]}(window,function(n){var e={};function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(r,o,function(e){return n[e]}.bind(null,o));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return{}.hasOwnProperty.call(n,e)},t.p="",t(t.s=8)}([function(n,e,t){"use strict";n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var t=function(n,e){var t,r,o=n[1]||"",i=n[3];if(!i)return o;if(e&&"function"==typeof btoa){var a=(t=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t),"/*# ".concat(r," */")),u=i.sources.map((function(n){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(n," */")}));return[o].concat(u).concat([a]).join("\n")}return[o].join("\n")}(e,n);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t})).join("")},e.i=function(n,t,r){"string"==typeof n&&(n=[[null,n,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var u=0;u<n.length;u++){var l=[].concat(n[u]);r&&o[l[0]]||(t&&(l[2]=l[2]?"".concat(t," and ").concat(l[2]):t),e.push(l))}},e}},function(n,e,t){"use strict";var r={};function o(n){n.forEach((function(n){if(--r[n]<=0){var e=document.getElementById(n);e&&e.parentNode.removeChild(e)}}))}n.exports=function(n,e){for(var t,i=void 0===e?{}:e,a=i.replace,u=void 0!==a&&a,l=i.prepend,s=void 0!==l&&l,c=i.prefix,d=void 0===c?"s":c,f=[],p=0;p<n.length;p++){var h=n[p],m=h[1],w=h[2],y=h[3],g=""+d+h[0]+"-"+p;if(f.push(g),!r[g]||u){r[g]=1;var v=document.getElementById(g),b=!1;v||(b=!0,(v=document.createElement("style")).setAttribute("type","text/css"),v.id=g,w&&v.setAttribute("media",w));var C=m;y&&"function"==typeof btoa&&(C+="\n/*# sourceMappingURL=data:application/json;base64,"+(t=JSON.stringify(y),btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode("0x"+e)})))+"*/"),C+="\n/*# sourceURL="+y.file+"?"+g+"*/"),"textContent"in v?v.textContent=C:v.styleSheet.cssText=C,b&&(s?document.head.insertBefore(v,document.head.childNodes[0]):document.head.appendChild(v))}else r[g]++}return o.bind(null,f)}},function(n,e,t){var r=t(5),o=t(1),i="string"==typeof r?[[n.i,r,""]]:r;(e=n.exports=r.locals||{})._getContent=function(){return i},e._getCss=function(){return""+r},e._insertCss=function(n){return o(i,n)}},function(n,e,t){var r=t(6),o=t(1),i="string"==typeof r?[[n.i,r,""]]:r;(e=n.exports=r.locals||{})._getContent=function(){return i},e._getCss=function(){return""+r},e._insertCss=function(n){return o(i,n)}},function(n,e,t){var r=t(7),o=t(1),i="string"==typeof r?[[n.i,r,""]]:r;(e=n.exports=r.locals||{})._getContent=function(){return i},e._getCss=function(){return""+r},e._insertCss=function(n){return o(i,n)}},function(n,e,t){(e=t(0)(!1)).push([n.i,".wallet-label[data-v-1e79926b]{display:block;height:100%;text-align:center}.wallet-label *[data-v-1e79926b]{display:inline-block;vertical-align:top;height:100%}.wallet-label .divider[data-v-1e79926b]{margin:0 5px;opacity:0.2}.wallet-label .paypal-wordmark[data-v-1e79926b]{display:none}.wallet-label .card-art[data-v-1e79926b]{border-radius:3px}.wallet-label .label[data-v-1e79926b]{max-width:40%}.wallet-label .label .limit[data-v-1e79926b]{display:block;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 249px){.wallet-label .paypal-mark[data-v-1e79926b],.wallet-label .paypal-wordmark[data-v-1e79926b]{display:inline-block}.wallet-label .label[data-v-1e79926b],.wallet-label .divider[data-v-1e79926b],.wallet-label .card-art[data-v-1e79926b],.wallet-label .pay-now[data-v-1e79926b],.wallet-label .logo[data-v-1e79926b]{display:none}}\n",""]),n.exports=e},function(n,e,t){(e=t(0)(!1)).push([n.i,'.paypal-button .paypal-button-text[data-v-4be7fed9]{display:inline-block;font-style:italic;font-weight:600}.paypal-button .paypal-button-text.text-large[data-v-4be7fed9]{font-size:1.1em}.paypal-button .paypal-button-text.text-small[data-v-4be7fed9]{font-size:1.2em;margin-top:-1px}.paypal-button.paypal-button-layout-vertical .paypal-button-text.text-small[data-v-4be7fed9]{display:none}.paypal-button.paypal-button-layout-horizontal .paypal-button-text.text-large[data-v-4be7fed9]{display:none}@media only screen and (min-width: 364px){.paypal-button.paypal-button-layout-horizontal .paypal-button-text.text-small[data-v-4be7fed9]{display:none}.paypal-button.paypal-button-layout-horizontal .paypal-button-text.text-large[data-v-4be7fed9]{display:inline-block}}.paypal-mark .paypal-button-text[data-v-4be7fed9]{display:inline-block;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-weight:400;font-size:14px;position:relative;top:-5px}.paypal-mark .paypal-button-text.text-small[data-v-4be7fed9]{display:none}\n',""]),n.exports=e},function(n,e,t){(e=t(0)(!1)).push([n.i,"@media only screen and (max-width: 249px){.menu-toggle[data-v-f80ae6cb]{display:none}}\n",""]),n.exports=e},function(n,e,t){"use strict";t.r(e);var r={};t.r(r),t.d(r,"FUNDING",(function(){return Me})),t.d(r,"getCorrelationID",(function(){return ze})),t.d(r,"setup",(function(){return Ot}));var o={};t.r(o),t.d(o,"Promise",(function(){return E})),t.d(o,"TYPES",(function(){return gr})),t.d(o,"ProxyWindow",(function(){return Yt})),t.d(o,"setup",(function(){return wr})),t.d(o,"destroy",(function(){return yr})),t.d(o,"serializeMessage",(function(){return fr})),t.d(o,"deserializeMessage",(function(){return pr})),t.d(o,"createProxyWindow",(function(){return hr})),t.d(o,"toProxyWindow",(function(){return mr})),t.d(o,"on",(function(){return sr})),t.d(o,"once",(function(){return cr})),t.d(o,"send",(function(){return dr})),t.d(o,"markWindowKnown",(function(){return Rt})),t.d(o,"cleanUpWindow",(function(){return vr})),t.d(o,"bridge",(function(){}));var i={};t.r(i),t.d(i,"Buttons",(function(){return ca})),t.d(i,"Checkout",(function(){return da})),t.d(i,"CardFields",(function(){return fa})),t.d(i,"Menu",(function(){return pa})),t.d(i,"Modal",(function(){return ha})),t.d(i,"ButtonsTemplate",(function(){return ma})),t.d(i,"PopupOpenError",(function(){return wa})),t.d(i,"allowIframe",(function(){return ya})),t.d(i,"forceIframe",(function(){return ga})),t.d(i,"destroyAll",(function(){return va})),t.d(i,"setup",(function(){return ba})),t.d(i,"destroy",(function(){return Ca}));var a={};t.r(a),t.d(a,"ThreeDomainSecure",(function(){return Ea})),t.d(a,"postRobot",(function(){return xa}));var u={};function l(n,e){if(null==n)return{};var t,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)e.indexOf(t=i[r])>=0||(o[t]=n[t]);return o}function s(){return window.navigator.mockUserAgent||window.navigator.userAgent}function c(n){return void 0===n&&(n=s()),!!n.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}function d(n){return void 0===n&&(n=s()),n.indexOf("Opera Mini")>-1}function f(n){return void 0===n&&(n=s()),/iPhone|iPod|iPad/.test(n)}function p(n){return void 0===n&&(n=s()),!(function(n){return void 0===n&&(n=s()),!!f(n)&&(!!function(n){return void 0===n&&(n=s()),/\bGSA\b/.test(n)}(n)||/.+AppleWebKit(?!.*Safari)/.test(n))}(n)||function(n){return void 0===n&&(n=s()),!!function(n){return void 0===n&&(n=s()),/Android/.test(n)}(n)&&/Version\/[\d.]+/.test(n)&&!d(n)}(n)||d(n)||function(n){return void 0===n&&(n=s()),/FxiOS/i.test(n)}(n)||function(n){return void 0===n&&(n=s()),/EdgiOS/i.test(n)}(n)||function(n){return void 0===n&&(n=s()),-1!==n.indexOf("FBAN")||-1!==n.indexOf("FBAV")}(n)||function(n){return void 0===n&&(n=s()),/QQBrowser/.test(n)}(n)||"undefined"!=typeof process&&process.versions&&process.versions.electron||(e=s(),/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e))||!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches);var e}function h(){return(h=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n}).apply(this,arguments)}function m(n){try{if(!n)return!1;if("undefined"!=typeof Promise&&n instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&n instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&n instanceof window.constructor)return!1;var e={}.toString;if(e){var t=e.call(n);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof n.then)return!0}catch(n){return!1}return!1}t.r(u),t.d(u,"setup",(function(){return Oa}));var w,y=[],g=[],v=0;function b(){if(!v&&w){var n=w;w=null,n.resolve()}}function C(){v+=1}function L(){v-=1,b()}var E=function(){function n(n){var e=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var t,r,o=!1,i=!1,a=!1;C();try{n((function(n){a?e.resolve(n):(o=!0,t=n)}),(function(n){a?e.reject(n):(i=!0,r=n)}))}catch(n){return L(),void this.reject(n)}L(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var e=n.prototype;return e.resolve=function(n){if(this.resolved||this.rejected)return this;if(m(n))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=n,this.dispatch(),this},e.reject=function(n){var e=this;if(this.resolved||this.rejected)return this;if(m(n))throw new Error("Can not reject promise with another promise");if(!n){var t=n&&"function"==typeof n.toString?n.toString():{}.toString.call(n);n=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=n,this.errorHandled||setTimeout((function(){e.errorHandled||function(n,e){if(-1===y.indexOf(n)){y.push(n),setTimeout((function(){throw n}),1);for(var t=0;t<g.length;t++)g[t](n,e)}}(n,e)}),1),this.dispatch(),this},e.asyncReject=function(n){return this.errorHandled=!0,this.reject(n),this},e.dispatch=function(){var e=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(e||t)){this.dispatching=!0,C();for(var o=function(n,e){return n.then((function(n){e.resolve(n)}),(function(n){e.reject(n)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,l=a.onError,s=a.promise,c=void 0;if(e)try{c=u?u(this.value):this.value}catch(n){s.reject(n);continue}else if(t){if(!l){s.reject(this.error);continue}try{c=l(this.error)}catch(n){s.reject(n);continue}}c instanceof n&&(c.resolved||c.rejected)?(c.resolved?s.resolve(c.value):s.reject(c.error),c.errorHandled=!0):m(c)?c instanceof n&&(c.resolved||c.rejected)?c.resolved?s.resolve(c.value):s.reject(c.error):o(c,s):s.resolve(c)}r.length=0,this.dispatching=!1,L()}},e.then=function(e,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new n;return this.handlers.push({promise:r,onSuccess:e,onError:t}),this.errorHandled=!0,this.dispatch(),r},e.catch=function(n){return this.then(void 0,n)},e.finally=function(e){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return n.try(e).then((function(){return t}))}),(function(t){return n.try(e).then((function(){throw t}))}))},e.timeout=function(n,e){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(e||new Error("Promise timed out after "+n+"ms"))}),n);return this.then((function(n){return clearTimeout(r),n}))},e.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.resolve=function(e){return e instanceof n?e:m(e)?new n((function(n,t){return e.then(n,t)})):(new n).resolve(e)},n.reject=function(e){return(new n).reject(e)},n.asyncReject=function(e){return(new n).asyncReject(e)},n.all=function(e){var t=new n,r=e.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(n,e,i){return e.then((function(e){o[n]=e,0==(r-=1)&&t.resolve(o)}),(function(n){i.reject(n)}))},a=0;a<e.length;a++){var u=e[a];if(u instanceof n){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!m(u)){o[a]=u,r-=1;continue}i(a,n.resolve(u),t)}return 0===r&&t.resolve(o),t},n.hash=function(e){var t={},r=[],o=function(n){if(e.hasOwnProperty(n)){var o=e[n];m(o)?r.push(o.then((function(e){t[n]=e}))):t[n]=o}};for(var i in e)o(i);return n.all(r).then((function(){return t}))},n.map=function(e,t){return n.all(e.map(t))},n.onPossiblyUnhandledException=function(n){return function(n){return g.push(n),{cancel:function(){g.splice(g.indexOf(n),1)}}}(n)},n.try=function(e,t,r){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var o;C();try{o=e.apply(t,r||[])}catch(e){return L(),n.reject(e)}return L(),n.resolve(o)},n.delay=function(e){return new n((function(n){setTimeout(n,e)}))},n.isPromise=function(e){return!!(e&&e instanceof n)||m(e)},n.flush=function(){return e=w=w||new n,b(),e;var e},n}();function x(n){return"[object RegExp]"==={}.toString.call(n)}var O={IFRAME:"iframe",POPUP:"popup"},_="Call was rejected by callee.\r\n";function T(n){return void 0===n&&(n=window),"about:"===n.location.protocol}function k(n){if(void 0===n&&(n=window),n)try{if(n.parent&&n.parent!==n)return n.parent}catch(n){}}function P(n){if(void 0===n&&(n=window),n&&!k(n))try{return n.opener}catch(n){}}function A(n){try{return!0}catch(n){}return!1}function M(n){void 0===n&&(n=window);var e=n.location;if(!e)throw new Error("Can not read window location");var t=e.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=k(n);return r&&A()?M(r):"about://"}var o=e.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function F(n){void 0===n&&(n=window);var e=M(n);return e&&n.mockDomain&&0===n.mockDomain.indexOf("mock:")?n.mockDomain:e}function N(n){if(!function(n){try{if(n===window)return!0}catch(n){}try{var e=Object.getOwnPropertyDescriptor(n,"location");if(e&&!1===e.enumerable)return!1}catch(n){}try{if(T(n)&&A())return!0}catch(n){}try{if(M(n)===M(window))return!0}catch(n){}return!1}(n))return!1;try{if(n===window)return!0;if(T(n)&&A())return!0;if(F(window)===F(n))return!0}catch(n){}return!1}function S(n){if(!N(n))throw new Error("Expected window to be same domain");return n}function z(n,e){if(!n||!e)return!1;var t=k(e);return t?t===n:-1!==function(n){var e=[];try{for(;n.parent!==n;)e.push(n.parent),n=n.parent}catch(n){}return e}(e).indexOf(n)}function I(n){var e,t,r=[];try{e=n.frames}catch(t){e=n}try{t=e.length}catch(n){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=e[o]}catch(n){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=e[a]}catch(n){return r}if(!u)return r;r.push(u)}return r}function R(n){for(var e=[],t=0,r=I(n);t<r.length;t++){var o=r[t];e.push(o);for(var i=0,a=R(o);i<a.length;i++)e.push(a[i])}return e}function D(n){void 0===n&&(n=window);try{if(n.top)return n.top}catch(n){}if(k(n)===n)return n;try{if(z(window,n)&&window.top)return window.top}catch(n){}try{if(z(n,window)&&window.top)return window.top}catch(n){}for(var e=0,t=R(n);e<t.length;e++){var r=t[e];try{if(r.top)return r.top}catch(n){}if(k(r)===r)return r}}function j(n){var e=D(n);if(!e)throw new Error("Can not determine top window");var t=[].concat(R(e),[e]);return-1===t.indexOf(n)&&(t=[].concat(t,[n],R(n))),t}var B=[],W=[];function U(n,e){void 0===e&&(e=!0);try{if(n===window)return!1}catch(n){return!0}try{if(!n)return!0}catch(n){return!0}try{if(n.closed)return!0}catch(n){return!n||n.message!==_}if(e&&N(n))try{if(n.mockclosed)return!0}catch(n){}try{if(!n.parent||!n.top)return!0}catch(n){}var t=function(n,e){for(var t=0;t<n.length;t++)try{if(n[t]===e)return t}catch(n){}return-1}(B,n);if(-1!==t){var r=W[t];if(r&&function(n){if(!n.contentWindow)return!0;if(!n.parentNode)return!0;var e=n.ownerDocument;if(e&&e.documentElement&&!e.documentElement.contains(n)){for(var t=n;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!e.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function q(n){return void 0===n&&(n=window),P(n=n||window)||k(n)||void 0}function H(n,e){for(var t=0;t<n.length;t++)for(var r=n[t],o=0;o<e.length;o++)if(r===e[o])return!0;return!1}function Z(n){void 0===n&&(n=window);for(var e=0,t=n;t;)(t=k(t))&&(e+=1);return e}function G(n,e){var t=D(n)||n,r=D(e)||e;try{if(t&&r)return t===r}catch(n){}var o=j(n),i=j(e);if(H(o,i))return!0;var a=P(t),u=P(r);return a&&H(j(a),i)||u&&H(j(u),o),!1}function V(n,e){if("string"==typeof n){if("string"==typeof e)return"*"===n||e===n;if(x(e))return!1;if(Array.isArray(e))return!1}return x(n)?x(e)?n.toString()===e.toString():!Array.isArray(e)&&Boolean(e.match(n)):!!Array.isArray(n)&&(Array.isArray(e)?JSON.stringify(n)===JSON.stringify(e):!x(e)&&n.some((function(n){return V(n,e)})))}function Y(n){return n.match(/^(https?|mock|file):\/\//)?n.split("/").slice(0,3).join("/"):F()}function K(n,e,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(U(n))return o&&clearTimeout(o),e();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function X(n){try{if(n===window)return!0}catch(n){if(n&&n.message===_)return!0}try{if("[object Window]"==={}.toString.call(n))return!0}catch(n){if(n&&n.message===_)return!0}try{if(window.Window&&n instanceof window.Window)return!0}catch(n){if(n&&n.message===_)return!0}try{if(n&&n.self===n)return!0}catch(n){if(n&&n.message===_)return!0}try{if(n&&n.parent===n)return!0}catch(n){if(n&&n.message===_)return!0}try{if(n&&n.top===n)return!0}catch(n){if(n&&n.message===_)return!0}try{if(n&&"__unlikely_value__"===n.__cross_domain_utils_window_check__)return!1}catch(n){return!0}try{if("postMessage"in n&&"self"in n&&"location"in n)return!0}catch(n){}return!1}function J(n){try{n.close()}catch(n){}}function $(n,e){for(var t=0;t<n.length;t++)try{if(n[t]===e)return t}catch(n){}return-1}var Q,nn=function(){function n(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var n=new WeakMap,e={};return Object.freeze(e),n.set(e,"__testvalue__"),"__testvalue__"===n.get(e)}catch(n){return!1}}())try{this.weakmap=new WeakMap}catch(n){}this.keys=[],this.values=[]}var e=n.prototype;return e._cleanupClosedWindows=function(){for(var n=this.weakmap,e=this.keys,t=0;t<e.length;t++){var r=e[t];if(X(r)&&U(r)){if(n)try{n.delete(r)}catch(n){}e.splice(t,1),this.values.splice(t,1),t-=1}}},e.isSafeToReadWrite=function(n){return!X(n)},e.set=function(n,e){if(!n)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(n,e)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=this.name,o=n[r];return void(o&&o[0]===n?o[1]=e:Object.defineProperty(n,r,{value:[n,e],writable:!0}))}catch(n){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=$(i,n);-1===u?(i.push(n),a.push(e)):a[u]=e},e.get=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return e.get(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=n[this.name];return t&&t[0]===n?t[1]:void 0}catch(n){}this._cleanupClosedWindows();var r=$(this.keys,n);if(-1!==r)return this.values[r]},e.delete=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{e.delete(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=n[this.name];t&&t[0]===n&&(t[0]=t[1]=void 0)}catch(n){}this._cleanupClosedWindows();var r=this.keys,o=$(r,n);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},e.has=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=n[this.name];return!(!t||t[0]!==n)}catch(n){}return this._cleanupClosedWindows(),-1!==$(this.keys,n)},e.getOrSet=function(n,e){if(this.has(n))return this.get(n);var t=e();return this.set(n,t),t},n}();function en(n){return n.name||n.__name__||n.displayName||"anonymous"}function tn(n,e){try{delete n.name,n.name=e}catch(n){}return n.__name__=n.displayName=e,n}function rn(n){if("function"==typeof btoa)return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode(parseInt(e,16))})));if("undefined"!=typeof Buffer)return Buffer.from(n,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function on(n){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(n),(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(n,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}function an(){var n="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return n.charAt(Math.floor(Math.random()*n.length))}))+"_"+rn((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function un(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("No global found")}function ln(n){try{return JSON.stringify([].slice.call(n),(function(n,e){return"function"==typeof e?"memoize["+function(n){if(Q=Q||new nn,null==n||"object"!=typeof n&&"function"!=typeof n)throw new Error("Invalid object");var e=Q.get(n);return e||(e=typeof n+":"+an(),Q.set(n,e)),e}(e)+"]":e}))}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}var sn,cn=[];function dn(n,e){var t=this;void 0===e&&(e={});var r=new nn,o=function(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=r.getOrSet(e.thisNamespace?this:n,(function(){return{}})),u=ln(o),l=e.time;if(a[u]&&l&&Date.now()-a[u].time<l&&delete a[u],a[u])return a[u].value;var s=Date.now(),c=n.apply(this,arguments);return a[u]={time:s,value:c},a[u].value};return o.reset=function(){r.delete(e.thisNamespace?t:n)},cn.push(o),tn(o,(e.name||en(n))+"::memoized")}function fn(n){var e={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=ln(i);return e.hasOwnProperty(u)||(e[u]=E.try((function(){return n.apply(r,t)})).finally((function(){delete e[u]}))),e[u]}return t.reset=function(){e={}},tn(t,en(n)+"::promiseMemoized")}function pn(n,e,t){void 0===t&&(t=[]);var r=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},o=ln(t);return r.hasOwnProperty(o)?r[o]:r[o]=e.apply(void 0,t)}function hn(){}function mn(n){var e=!1;return tn((function(){if(!e)return e=!0,n.apply(this,arguments)}),en(n)+"::once")}function wn(n,e){if(void 0===e&&(e=1),e>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+{}.toString.call(n)+">";if("string"==typeof n)return n;if(n instanceof Error){var t=n&&n.stack,r=n&&n.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}catch(n){return"Error while stringifying error: "+wn(n,e+1)}}function yn(n){var e="<unknown error: "+{}.toString.call(n)+">";return n?n instanceof Error?n.message||e:"string"==typeof n.message&&n.message||e:e}function gn(n){return"string"==typeof n?n:n&&n.toString&&"function"==typeof n.toString?n.toString()
3 years ago
That's the actual error?  It looks like the entire minified JS.  

Were you able to set that breakpoint on the buttons before they disappeared?  This suggests that something, possibly a JS error in a different script, is triggering the .hide() event for the buttons:
https://github.com/paypal/paypal-checkout-components/issues/416
3 years ago
Thank you for the reply. Yea, I guess this shows how little I know. :-) The buttons appear\disappear in the blink of an eye, so I do not know how to set the breakpoint on the button itself. I read the post in link you sent and followed another from that post, which gave me the idea to try it without one page checkout enabled. When I disable it, the buttons render as expected in FireFox. However I prefer the one page checkout.  any thoughts as to why switching off one page checkout would change the paypal functionality?
3 years ago
techclmbr wrote:
The buttons appear\disappear in the blink of an eye, so I do not know how to set the breakpoint on the button itself. I read the post in link you sent and followed another from that post, which gave me the idea to try it without one page checkout enabled. When I disable it, the buttons render as expected in FireFox. However I prefer the one page checkout.  any thoughts as to why switching off one page checkout would change the paypal functionality?


One Page Checkout has its own JS in Nop.Web\wwwroot\js\public.onepagecheckout.js, so maybe that's where the conflict is.

Using the browser devtools, can you find the hidden PP button container in the DOM?  Then right-click their containing <div> and set "break on" to subtree modifications.  Click back then continue to reload the payment view and hopefully it breaks when they disappear.

Errors will be in the devtools console tab, the JS will break in the debugger tab.

3 years ago
Sorry, looks like that won't work because back/continue loses the breakpoint and a refresh starts checkout from the beginning.

What about going to onepagecheckout.js in the debugger tab and setting a breakpoint in PaymentMethod?  Hopefully the init breaks before paypal:

3 years ago
Ok, so after I re-enabled one page checkout, it works as expected in FireFox. Not sure why this would correct the conflict, but it seems to have worked! Do you think I should still run the breakpoint test or just go with the "if it ain't broken, don't fix it" plan?
Thank you so much for helping me out with this!
3 years ago
Well, if you were losing sales I'd imagine you'll sleep better knowing it won't unfix itself.  Is there a public URL for your store we can look at?
3 years ago
yes sir, yes I will!
As an FYI - exactly what I did was:
1.  disable the one page checkout (this worked on my initial try with FireFox, but after a successful test with Edge and Chrome and a refresh and retest with FireFox, I began getting a generic error page, an error has occurred, blah, blah, blah. I cleared the cache in the nopcommerce admin control panel and restarted the app, (in the control panel) and tried again with all three browsers, received a new error something about value to low/decimal point or something.
2. I reenabled the one page checkout
3. restarted the website in my Plesk control panel
4. cleared the cart of all items, and refreshed the page
5. added new items and tested on all three browsers and it worked.
I am running a pretty much plain v4.2 basic theme
site URL is: Https://Team-Tough.com
Thank you and would love to hear if you see anything that you feel I should change or do.

Cheers,

DQ
3 years ago
Cool climbing gear!

The Smart buttons loaded and work fine for me, but the Standard does not.  

I saw PayPal complaining a lot about not being able to post to its logger (CORS request blocked), but then I realized that was my UBlock Origin looking out for me.  After I disabled it there were no JS errors.

I believe that plugin sends the cart items to PP, do you remember which item was in your cart when you got it to fail?  

Also, do you have logs enabled?

And see if anything shows up in your PP dev account:
https://developer.paypal.com/developer/dashboard/webhooks/live/
3 years ago
techclmbr wrote:
..received a new error something about value to low/decimal point or something..


We have already received a bug reports regarding this error in PayPal SmartButtons plugin. And fixed it (including for 4.20). What version of your plugin?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.