Hosted checkout not loading on Safari mobile browser

Modified on: Mon, 31 Oct, 2022 at 10:57 AM

This article covers 

How to resolve error - TyperError: null is not an object (evaluating 'this.window.location') cb-window-manager.ts:98 ?

What hosted checkout is not loading on safari on iPhone?

The reason why sometimes Chargebee checkout doesn’t load up in any IOS devices or Safari Browser.
Checkout doesn’t load up in IOS/Safari


Summary


If the merchant is facing this issue using safari on iPhone they are unable to checkout using the hosted page. They get this error in the console. TyperError: null is not an object (evaluating 'this.window.location') CB-window-manager.ts:98.

Once you fill in all the details and proceed to checkout, nothing happens. The Chargebee-hosted checkout is supposed to pop up but it doesn’t load. 


Currently the setting that blocks pop up will be enabled by default in Safari, while other browsers don't have that enabled by default. 


Also, the checkout/hosted page pop-up seen on the web browser works as a new tab opening on mobile devices. This is currently by system design. This is because most mobile browsers have pop-up blockers that might affect the checkout experience so we open it in a new tab rather than as an iframe/pop-up. 

Solution


  1. If you are using Chargebee JS, you can use this function iframe to open the checkout within the same tab.


  1. Or else as informed, Safari on an iPhone has a setting to Block Pop-ups by default. You can uncheck this on an iPhone by navigating to Settings->Safari->Block Pop-Ups


  1. And the third option would be, instead of using the Drop-in script for the checkout, you can use Plan specific URL. By using this you can redirect your customers to the checkout page which will open on a new screen. More information on how to configure a plan-specific URL can be found here.



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×