OmniBlocks: Sample Tab Navigation Test Fails On Windows
Let's dive into the nitty-gritty of a failed test within the OmniBlocks scratch-gui project. Specifically, we're dissecting the "Sample Tab Navigation" test that stumbled on a Windows environment. This detailed breakdown will cover the errors encountered, the actions leading up to them, and an AI analysis to pinpoint the root causes.
Discussion category: OmniBlocks, scratch-gui
Additional information:
π Recorded Actions Errors
Test: Sample Tab Navigation
File: .github/chaos-tests/sample-tabs.json
Platform: Windows + Chromium
Run: 19944107997
Commit: 7f728f4fb15a3ba78858cd115c477ae3466d2715
Author: Graison-P
πΉ Video

π₯ Download original video (WebM) ποΈ Browse all files
π¨ Errors
[1764883575975] Blocked script execution in 'http://localhost:8080/editor.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
[1764883578938] A bad HTTP response code (404) was received when fetching the script.
[1764883579027] Failed to get MIDI access NotAllowedError: Permission to use Web MIDI API was not granted.
π¬ Actions
[1764883568132] goto: /editor.html
[1764883570662] wait:
[1764883573707] click: [class*='react-tabs_react-tabs__tab']
[1764883573812] wait:
[1764883575824] click: [class*='react-tabs_react-tabs__tab']
[1764883576234] wait:
[1764883578265] click: [class*='react-tabs_react-tabs__tab']
[1764883578459] wait:
π€ AI Analysis
AI analysis has revealed multiple issues during the playback testing of the OmniBlocks scratch-gui editor. The key error we're seeing is the "Blocked script execution because the document's frame is sandboxed and the 'allow-scripts' permission is not set.", which is a critical indicator of a problem within the iframe or the hosting context for editor.html. Essentially, the sandbox attribute on the iframe is too restrictive, preventing scripts from running within the embedded content because it lacks the allow-scripts permission. This could stem from an incorrect embedding configuration, potentially linked to the initial action goto: /editor.html (timestamp: 1764883568132), which appears to load the content into a restricted frame. This initial navigation command is suspect; it seems to be setting the stage for subsequent failures by placing the editor within a context that doesn't permit script execution.
Further investigation into the iframe's sandbox attributes is crucial. We need to determine why the allow-scripts permission is missing. Is it a deliberate security measure that's unintentionally hindering functionality, or is it an oversight in the configuration? Examining the code responsible for embedding editor.html will likely reveal the source of this restriction. Additionally, itβs worth noting that such sandboxing issues can sometimes be browser-specific, although the consistent failure on Windows + Chromium suggests a configuration problem rather than a browser quirk. Debugging this requires a deep dive into the iframe setup and its interaction with the parent document. The sandbox attribute is a powerful tool for limiting the capabilities of embedded content, but it must be configured correctly to avoid unintended consequences.
In addition to the sandboxing issue, there's also a "A bad HTTP response code (404)" error, indicating that a script required by the editor could not be found. This error occurs shortly after the sandboxing problem, which might suggest a dependency issue related to the restricted environment. If scripts are blocked from executing due to the sandbox, it's possible that the editor is unable to load necessary resources, leading to the 404 error. Alternatively, there could be a misconfigured resource path or an incorrect script file dependency within editor.html or subsequent UI interactions. Diagnosing this 404 error involves checking the network requests made by the editor and verifying that all required scripts are indeed present and accessible at the specified paths. It's also important to ensure that the server is correctly serving these files with the appropriate MIME types. The combination of the sandboxing issue and the 404 error paints a picture of an environment where the editor is struggling to load and execute its necessary components, likely due to a combination of configuration problems and missing resources.
Finally, the error message `