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

Show error log if Playground fails to start #1336

Merged
merged 12 commits into from
May 7, 2024

Conversation

bgrgicak
Copy link
Collaborator

Fixes #1230

What is this PR doing?

It adds a modal that loads if Playground fails to start. The modal contains error details.

What problem is it solving?

It should help users debug startup issues like Blueprint errors.

How is the problem addressed?

By showing a modal with Playground logs when startPlaygroundWeb fails to start.

Testing Instructions

@bgrgicak bgrgicak changed the title Add/1230 blueprint error show logs Show error log if Playground fails to start Apr 26, 2024
@bgrgicak bgrgicak self-assigned this Apr 26, 2024
@bgrgicak bgrgicak requested a review from a team April 26, 2024 11:39
Base automatically changed from add/1230-log-modal to trunk April 30, 2024 10:08
Comment on lines 30 to 32
<a href="https://wordpress.github.io/wordpress-playground/blueprints-api/troubleshoot-and-debug-blueprints">
check out the documentation
</a>{' '}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use target="_blank"

Copy link
Collaborator

@adamziel adamziel Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrite proposal:

Oops! There was a problem starting Playground. To figure out what went wrong, please take a look at the error logs provided below. If you see an "Invalid blueprint error," the logs will point out the specific step causing the issue. You can then double-check your blueprint. For more help, you can also visit our documentation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the crash modal replace this one if the error is a fatal crash?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the crash modal replace this one if the error is a fatal crash?

Yes, after fixing eab466f. But it doesn't look good. It first shows the logger and after that the error report modal. I need to find a way to not show logs in this case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me a bit to get to a clean solution, but this should work now 2dfec6f

Copy link
Collaborator

@adamziel adamziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some questions inline but LGTM otherwise, thank you!

@bgrgicak bgrgicak merged commit 0e454f0 into trunk May 7, 2024
5 checks passed
@bgrgicak bgrgicak deleted the add/1230-blueprint-error-show-logs branch May 7, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display Blueprint execution errors in the UI
2 participants