Conversation
Add explicit `playwright install --with-deps` steps for Firefox and WebKit CI jobs to fix test failures: - Firefox on Ubuntu was missing libdbus-glib-1-2 system dependency - WebKit on macOS had "Page closed" errors due to browser setup issues The --with-deps flag ensures both browser binaries and system dependencies are properly installed before running tests.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1b87b51:
|
Contributor
size-limit report 📦
|
Update playwright-test from ^12.1.1 to ^14.1.12 in all packages to fix WebKit test failures on macOS. The older version bundled playwright-core with WebKit 1921 which is incompatible with newer macOS runners. The newer playwright-test includes a more recent playwright-core with WebKit builds that are compatible with macos-latest (macos-14).
Reset kvsTestCase.ref.current to null after cleanup to prevent operating on stale database instances. WebKit is strict about database connection state and throws InvalidStateError when trying to perform operations on a closing connection. Also silence cleanup errors since they're expected when the database is already closed/deleted.
- Remove double-resolve: Previously, the promise was resolved in both transaction.oncomplete and onsuccess, causing timing issues in WebKit - Move onUpgrade callback to onsuccess handler to ensure database is fully ready before calling user code - Fix onblocked handler to not access openRequest.error before the request has finished, which caused InvalidStateError in WebKit - Use variables to track upgrade state instead of relying on closure scope within oncomplete
In WebKit, accessing request.error in onblocked handlers throws InvalidStateError because the request hasn't finished yet - it's just waiting for other connections to close. - Fix dropInstance onblocked to use a generic error message - Fix test to ignore deleteDatabase errors during cleanup
Add getRequestError helper that checks request.readyState === "done" before accessing request.error. This prevents InvalidStateError in WebKit when the error property is accessed before the request finishes. Each call site now includes a descriptive fallback message to identify where the error originated if readyState is unexpectedly not "done".
…sages - Make fallbackMessage required to ensure all error cases are descriptive - Use Error cause to preserve the original DOMException while adding context - Standardize all error messages to "Failed to ..." format for consistency
The onblocked event for deleteDatabase means waiting for other connections to close, not a failure. The delete will proceed once all connections are closed, so we should wait for onsuccess or onerror instead of rejecting immediately.
Revert the structural changes that moved onUpgrade from transaction.oncomplete to onsuccess. The original structure using transaction.oncomplete is correct and the user requested only the getRequestError helper without restructuring openDB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IDBRequest.errorbeforereadyState === "done", which throwsInvalidStateErrorin WebKit (strict W3C spec compliance)getRequestErrorhelper function that safely wraps error access withreadyStatecheckdropInstance.onblockedto not reject -onblockedmeans waiting for other connections to close, not a failureplaywright-testfrom^12.1.1to^14.1.12for better WebKit compatibilityplaywright install --with-depssteps for Firefox and WebKit in CI