- Issue created by @maursilveira
- π¨π¦Canada maursilveira Windsor, ON
Hello,
Doing some more tests today, I was able to get the following error in the browser's console:
Uncaught IntegrationError: payment Element didn't mount normally. at e._handleMessage (v3/:1:88665) at e._handleMessage (v3/:1:101570) at v3/:1:87423
This is coming called from the following function:
this._setupPostMessage = function() { r._listenerRegistry.addEventListener(window, "message", (function(e) { var t = e.data , n = e.origin , o = e.source , a = (0, l.$G)(t); a && ((0, T.uW)(u.jQ, n) ? r._handleMessage(a, o) : (0, x.Z)(n)) } )) }
Which ends up in this case statement:
case "stripe-frame-error": throw new I.No(a.payload.message);
Any help is greatly appreciated!
- π¨π¦Canada maursilveira Windsor, ON
Ok, different browsers display different warning messages in the console, but after doing multiple tests, this is the message that I get only and in all situations when the error happens:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://js.stripe.com') does not match the recipient window's origin ('https://my-site-url-here').
Researching by this type of error returns many results, and apparently this may happen when the postMessage() function is called before the actual element in the DOM has finished loading, but I'm not sure that is the case here. This message is coming from the following function in https://js.stripe.com/v3/
function(e) { var t, n = e.targetOrigin, r = e.type, o = n; switch (r) { case "sibling": t = (0, l.Hb)(e.targetFrameId); break; case "child": t = window.frames[e.targetFrameId]; break; case "parent": o = o || "*", t = window.parent; break; default: (0, s.Rz)(r) } if (o = o || u.jQ, t && "function" == typeof t.postMessage) { var i = e.message.delegate ? { targetOrigin: o, delegate: e.message.delegate } : o; t.postMessage(JSON.stringify((0, // <= Error happens here c.Z)((0, c.Z)({}, e), {}, { __stripeJsV3: !0 })), i) } }
I'm not very familiar with how the checkout pane is built or how the Stripe library is called and executed, therefore it's been hard for me to find where a fix should go.
Any thoughts?