Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The document is sandboxed and lacks the 'allow-same-origin' flag. #859

Open
devblocksco opened this issue Jun 10, 2023 · 0 comments
Labels
bug Something isn't working ui-extensions

Comments

@devblocksco
Copy link

Describe the bug
When developing any Stripe app that calls an external API from its SettingsView, the following error is thrown:
Error: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.

This is a somewhat recent bug introduced in the last couple months, as we've developed multiple Stripe apps and never seen this before. I believe it's due to Stripe apps being contained in a sandboxed iframe, and the iframe does not have the allow-same-origin permission.

To Reproduce
Most apps in the Stripe Apps Marketplace are throwing this error. For example, download the Mailchimp app, go to settings, and open chrome developer tools to see the error being thrown. Sometimes it causes an error screen to flash quickly while the SettingsView is loading.

During local development, the error covers the screen which prevents development. To reproduce, run any Stripe app locally that calls an external API in its SettingsView. Go to settings, and the screen will show the error:

Screen Shot 2023-06-10 at 10 41 19 AM

Desktop (please complete the following information):

  • OS: macOS 12.6.2
  • Browser: Chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui-extensions
Projects
None yet
Development

No branches or pull requests

2 participants