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

Playground won't load when using browser storage on iOS #1687

Closed
bgrgicak opened this issue Aug 15, 2024 · 11 comments
Closed

Playground won't load when using browser storage on iOS #1687

bgrgicak opened this issue Aug 15, 2024 · 11 comments
Assignees
Labels
[Aspect] Browser [Feature] Boot Flow [Type] Bug An existing feature does not function as intended

Comments

@bgrgicak
Copy link
Collaborator

When loading Playground with browser storage I get an error.

I was able to recreate it on iOS Firefox and Safari using this link.

Unfortunately I wasn't able to debug it further.

Error logs

[15-Aug-2024 19:34:20 UTC] JavaScript Error: Invalid platform file handle
[15-Aug-2024 19:34:09 UTC] JavaScript Error: PHP.run() failed with exit code 255 and the following output: PHP Fatal error: Uncaught Error: Call to undefined function apply_filters() in /wordpress/wp-includes/error-protection.php:2 Stack trace: #0 /wordpress/wp-includes/error-protection.php(2): wp_is_fatal_error_handler_enabled() #1 /wordpress/wp-settings.php(2): wp_register_fatal_error_handler() #2 /wordpress/wp-config.php(96): require_once('/wordpress/wp-s...') #3 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...') #4 /internal/eval.php(2): require('/wordpress/wp-l...') #5 {main} thrown in /wordpress/wp-includes/error-protection.php on line 2 PHPExecutionFailureError@https://playground.wordpress.net/worker-thread-d97bf3cc.js:38:437 @https://playground.wordpress.net/worker-thread-d97bf3cc.js:53:1916

@bgrgicak
Copy link
Collaborator Author

I tested this on MacOS (Firefox and Chrome) today. Playground loads there, but the site switcher doesn't work.
After clicking on a site the URL updates, but the site doesn't change.

@bgrgicak
Copy link
Collaborator Author

It looks like this PR #1669 broke site reloading.

useBootPlayground used to depend on site slug which ensured the Playground instance would be reloaded, but the dependency was removed.

We should move useBootPlayground to a useEffect and store the instance in state or find an alternative way of reloading.

@bgrgicak
Copy link
Collaborator Author

@brandonpayton would you have time to take a look at this?
If we can't find a quick fix, let's disable the site manager until it's fixed.

@brandonpayton
Copy link
Member

👋 Hi @bgrgicak, I noticed the broken switcher as well and plan to look at it today, hopefully soon.

@brandonpayton
Copy link
Member

By the way, are you able to load Playground with browser storage in iOS now? I think #1669 may have fixed that as a side-effect.

@brandonpayton
Copy link
Member

I'm able to load Playground with browser storage in iOS Safari now. But the site switching bug is pretty bad. Looking at that next.

@brandonpayton
Copy link
Member

Created a fix for site switching here.

@brandonpayton brandonpayton moved this from Inbox to Needs Author's Reply in Playground Board Aug 20, 2024
@brandonpayton brandonpayton added [Type] Bug An existing feature does not function as intended [Aspect] Browser [Feature] Boot Flow labels Aug 20, 2024
brandonpayton added a commit that referenced this issue Aug 21, 2024
## Motivation for the change, related issues

The site switcher was broken by #1669. This PR is a fix for that.

Related to #1687

## Implementation details

The site that is booted depends on the redux store, so the current
loaded site now depends on redux state.

## Testing Instructions (or ideally a Blueprint)

- CI
- Use `npm run dev` and manually test switching between sites
@brandonpayton
Copy link
Member

The site switching fix is landed, and it appears to be working well.

Leaving this open until @bgrgicak confirms the fix for browser storage in iOS Safari.

@adamziel adamziel moved this from Needs Author's Reply to Inbox in Playground Board Aug 21, 2024
@bgrgicak
Copy link
Collaborator Author

Thanks @brandonpayton the switcher works now!

I'm still getting the same Call to undefined function apply_filters() error on iOS.

Please leave this one open and I can take a look at it in the future.

@bgrgicak bgrgicak self-assigned this Aug 22, 2024
@bgrgicak bgrgicak moved this from Needs Author's Reply to Up next in Playground Board Aug 22, 2024
@adamziel adamziel moved this from Up next to Inbox in Playground Board Aug 22, 2024
@brandonpayton
Copy link
Member

brandonpayton commented Aug 22, 2024

Thanks @brandonpayton the switcher works now!

🙌

I'm still getting the same Call to undefined function apply_filters() error on iOS.

IIRC, this is the same error I would get when Playground used to fail in Safari with browser storage selected. It seemed due to a partial install of WP and the plugins used by Playground. You might need to clear your data and try again.

As a user, this broken-data situation can be really annoying, but hopefully, having a broken site will be less painful once site management allows people to delete sites through the UI.

Please leave this one open and I can take a look at it in the future.

❤️ Thanks

@bgrgicak
Copy link
Collaborator Author

I checked again and it works now. Thanks for working on it.

@github-project-automation github-project-automation bot moved this from Inbox to Done in Playground Board Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Browser [Feature] Boot Flow [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

No branches or pull requests

3 participants