Ensure Zuora iframe load fail does not block the user
https://sentry.gitlab.net/gitlab/customersgitlabcom/issues/2387703/?referrer=gitlab_plugin
TypeError: Cannot read property 'includes' of undefined
at Object.prepopulate (/packs/js/application-ea6950edbe9eacff9e63.chunk.js:2:30298)
at HTMLIFrameElement.<anonymous> (/packs/js/application-ea6950edbe9eacff9e63.chunk.js:2:34727)
at HTMLIFrameElement.r (/packs/js/20-a0d8eb0d718eefc7c67d.chunk.js:2:59241)
We've got a handful of users where the initial load of the zuora iframe fails.
The failure happens in this line of our 3rd party code https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/4beaa415df8cbba6898cdfe88967be1ce9c761b1/vendor/assets/javascripts/zuora/index.js#L255
There aren't any reproduction steps for this error as it's not clear what causes this, and this doesn't happen all the time (which sort of suggests a race condition or failed HTTP call).
TODO
-
Investigate if we're misusing the 3rd party code (iframe hasn't been mounted to the DOM before we make the iframe params fetch) -
Make the UI resilient against this error (a failure should show an alert to the user, not just stay on the loading spinner)
Edited by Ragnar Hardarson