Paypal-checkout-components: Edge 15 redirect

Created on 20 Jun 2017  ·  24Comments  ·  Source: paypal/paypal-checkout-components

We know intranet mode doesn't work. checkout.js will now refuse to render the button if it detects intranet mode.

Seems like Edge 15, and now IE11, are getting reports of a similar bug, not necessarily in intranet mode. Need to track these issues down.

outdated 🐞 bug

Most helpful comment

I'd like to request that PayPal prioritize this, especially the issue with Edge 15, not in Intranet mode. We're running into it on an app and it's causing quite a bit of pain at the moment.

All 24 comments

I'd like to request that PayPal prioritize this, especially the issue with Edge 15, not in Intranet mode. We're running into it on an app and it's causing quite a bit of pain at the moment.

We're giving it priority, but reproducing this is turning out to be difficult -- so any tips you have on getting the Edge issue to occur consistently would be appreciated. When I've seen it, it's been along the lines of:

  • PayPal popup opens after button click
  • Parent page crashes and reloads (closing dev tools if it's open)
  • Any attempt to cancel / complete the transaction causes the popup to redirect

That crash is proving difficult to narrow down, so if you see anything at all in the way of errors, stack traces, or anything, please let me know.

Hey @bluepnume , thanks for the quick response. I have a link to a screencast of the issue but it involves some proprietary content, so I'd like to send it to you. How can I do that?

Can you email it to [redacted] please?

Do you see the issue happen every time, or just intermittently?

I will @bluepnume. Also, I can have @danielberkompas screenshare with you, he can reproduce it consistently.

OK. Would be good to know from you or @danielberkompas if you see the same as what I mentioned above; specifically:

  • Does the page reload in the background?
  • Does dev tools stay open or closed? (and if it stays open can you preserve logs and see any errors?)
  • At what point does the parent reload happen? (or is it inconsistent?)
  • Can you repro the same consistently on browserstack.com ?
  • Can you repro consistently using the demo app at https://developer.paypal.com/demo/checkout/ ?
  • What is the exact Edge and EdgeHTML version?

For a time I was able to repro on browserstack, but I'm having no luck now.

Thanks!

Does the page reload in the background?

Yes.

At what point does the parent reload happen? (or is it inconsistent?)

I believe it's consistently -- check the video I sent you for when.

The other questions, @danielberkompas will have to answer (he's out for the night, but back early tomorrow).

Thanks for the video link! It definitely seems to match up with what I've seen. Will wait to see what @danielberkompas answers and then we can work forward from there.

Does the page reload in the background?

Yes.

Does dev tools stay open or closed?

They stay open. Here's the stacktrace from the crash:

Current window: ricardo.local/pay/0dfc074e-5551-4750-b1b1-567d09b6ec96
ppxo_unhandled_error [object Object]
logger.js (53,13)
   "ppxo_unhandled_error"
   {
      [functions]: ,
      __proto__: {
         [functions]: ,
         __proto__: null
      },
      country: "US",
      env: "sandbox",
      errtype: "[object Error]",
      host: "www.sandbox.paypal.com",
      lang: "en",
      pageID: "d0bf66b591",
      path: "/webapps/hermes/button",
      referer: "http://ricardo.local:4040",
      stack: "Error
   at CrossDomainSafeWeakMap.prototype.delete (https://www.paypalobjects.com/api/checkout.4.0.95.js:857:21)
   at cancel (https://www.paypalobjects.com/api/checkout.4.0.95.js:2343:25)
   at cancel (https://www.paypalobjects.com/api/checkout.4.0.95.js:3373:21)
   at Anonymous function (https://www.paypalobjects.com/api/checkout.4.0.95.js:3567:29)
   at run (https://www.paypalobjects.com/api/checkout.4.0.95.js:3466:33)
   at all (https://www.paypalobjects.com/api/checkout.4.0.95.js:3479:43)
   at Anonymous function (https://www.paypalobjects.com/api/checkout.4.0.95.js:5562:25)
   at ZalgoPromise.try (https://www.paypalobjects.com/api/checkout.4.0.95.js:7735:21)
   at ParentComponent.prototype.destroy (https://www.paypalobjects.com/api/checkout.4.0.95.js:5558:17)
   at Anonymous function (https://www.paypalobjects.com/api/checkout.4.0.95.js:5313:25)",
      timestamp: 1504719015154,
      uid: "48cbc30548",
      ver: "4.0.95",
      windowID: "9aff778a5c"
   }

SCRIPT18: 
exceptions.js (14,9)

At what point does the parent reload happen? (or is it inconsistent?)

It happens as soon as I click the paypal checkout button. The popup opens, and while it loads, the page crashes in the background.

Can you repro the same consistently on browserstack.com?

I don't have an active account on Browserstack. Will look into it and get back to you.

Can you repro consistently using the demo app at https://developer.paypal.com/demo/checkout/ ?

No. I can't repro on that demo app.

What is the exact Edge and EdgeHTML version?

Microsoft Edge 40.15063.0.0
Microsoft EdgeHTML 15.15063

I can email you a link to a page where you can repro privately.

OK these are some awesome data points, thank you!

Here's the stacktrace from the crash

That's useful -- but from the stack trace, it looks like this is a secondary error triggered after the parent window (for some reason) detects that one of the child components (the paypal button or popup) closed. So my gut feeling is, this isn't the root cause.

I'll still look into this error though; IE/Edge is really flaky about keeping references to potentially closed windows, so I may need to add some extra safety to that code path.

Were there no other errors or messages in the console prior to that, with preserve-logs enabled?

No. I can't repo on that demo app.

OK, this is the most interesting thing. From the stack trace looks like you're using checkout.4.0.95.js which is included in Braintree drop-in 1.6.0.

For now could you possibly try Braintree drop-in 1.7.0 which includes a later version of checkout.js? The version of checkout.js is locked to the version of drop-in, so you still won't get the latest version, but it seems like a more recent version of checkout.js potentially fixes your issue, so this might work.

@crookedneighbor -- do you know what the schedule is for the next release of drop-in?

I updated to 1.7.0, and I'm getting the same behavior, but a different warning in the console. This is the whole content of the console:

Navigation Event Separator
Navigation Event Separator
Navigation Event Separator
HTML1300: Navigation occurred.
0dfc074e-5551-4750-b1b1-567d09b6ec96
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
0dfc074e-5551-4750-b1b1-567d09b6ec96
Current window: ricardo.local/pay/0dfc074e-5551-4750-b1b1-567d09b6ec96
ppxo_close_no_token_cancelurl [object Object]
index.js (537,25)
   "ppxo_close_no_token_cancelurl"
   {
      [functions]: ,
      __proto__: { },
      country: "US",
      env: "sandbox",
      host: "www.sandbox.paypal.com",
      lang: "en",
      pageID: "3377482344",
      path: "/webapps/hermes/button",
      referer: "http://ricardo.local:4040",
      timestamp: 1504723342360,
      uid: "a4ce53b0b6",
      ver: "4.0.110",
      windowID: "f5539a1887"
   }

Like the previous error, this doesn't seem that helpful. I'm not seeing an actual crash of the page logged anywhere in the console, and the Paypal popup is still open when the warning above gets logged.

Hmm. I set up a sample drop-in integration with 1.6.0 and was able to repro the issue. 1.70 I couldn't get it to happen. Then switched back to 1.6.0 and I'm stuck not able to repro again.

I've set up a page with a hacked version of dropin.js to use the very latest version of checkout.js. Can you give this a try and let me know if you see the issue there?

http://bluesuncorp.co.uk/icv4/dropin.htm

I can't reproduce at that URL. Maybe it has something to do with using the Braintree dropin as a NPM package with Webpack. Going to do some investigating into that on my end.

If that's the case, I'm hoping that means the latest version of checkout.js solves the problem. Hopefully @crookedneighbor can give an idea of when drop-in will be released with the latest checkout.js.

I just checked and there was a fix which went out in checkout.4.0.119.js for an IE11 issue. That's currently my favorite educated guess for why you only see the issue with older versions of checkout.js. Hoping that theory turns out to be true.

Very likely it'll go out next week.

Just submitted a PR to update the version: https://github.com/braintree/braintree-web-drop-in/pull/276

Hi @jamonholmgren / @danielberkompas -- the Braintree team just released drop in 1.8.0 (thanks to @crookedneighbor) with the latest checkout.js attached. Can you try this out and let me know if you still see any instances of this issue?

Thanks!

@bluepnume We merged in a change this week, will report back results! Thanks so much for the follow-through.

cc @danielberkompas

Hi -- is this looking good on your side? If so I'll close this out. I'm not hearing many other reports of this.

Yes, it is working great for us! Sorry for not updating you sooner.

On Oct 3, 2017, 2:24 PM -0700, Daniel Brain notifications@github.com, wrote:

Hi -- is this looking good on your side? If so I'll close this out. I'm not hearing many other reports of this.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Awesome, thanks! Glad to hear it

@bluepnume FYI, we had a user report this issue running the latest Braintree drop-in (1.10.0) with Edge 16. I don't have a consistent repro, but just wanted to make you aware that it still seems to be an issue.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Soulpancake000 picture Soulpancake000  ·  5Comments

hosseinfs picture hosseinfs  ·  6Comments

stephen-last picture stephen-last  ·  6Comments

webdeb picture webdeb  ·  3Comments

bluepnume picture bluepnume  ·  3Comments