Comments (4)
It should actually show you the reload screen if the connection is terminated:
Not sure why it does not do it - probably because k8s keeps the balancer socket alive?
from playwright.
Thanks for taking a look.
I see what you mean with that UI Mode disconnected
detection, and it does work properly if that kicks in and I click Reload the page
, which will also detect if the ws ID is bad and go to a new one.
However, if you use the native browser reload instead of clicking the button (after you restart your server and get disconnected), you'll still end up in a broken / hung state like in my screenshot.
I feel like I've also gotten into this bad state without manually reloading as well, but I'm having trouble reproducing that or saying for sure. Maybe if the tab was suspended or interrupted, could the UI Mode disconnected
screen fail to show?
Either way, would it easy to support auto-fixing even if the browser was reloaded natively, vs with the button once it was disconnected AND the server was restarted?
from playwright.
Fixing via reload means that the ws= is not a part of the query, which will break some interoperable scenarios. I have a PR for it, but I can't say I like it. Will mark it as P3 to collect votes given that the scenario of server dying is unusual.
from playwright.
Fixing via reload means that the ws= is not a part of the query, which will break some interoperable scenarios.
The PR you have would essentially do what the Reload the page
button does, similar to if you just manually navigated to /
?
Curious what scenarios this would also break. The scenarios I have in mind are already a dead end, so it seems like fixing is better than forcing the user to manually intervene, but I understand it could feel hacky/messy to handle this too and the desire to gather feedback.
How this happens
Coming back to my sleeping tabs today, I see why this happens to me every day. Chrome suspends the tabs that have been inactive, which I'm guessing prevents it from showing the UI Mode disconnected
message when restoring the tab that's now broken (if the backend restarted, e.g. I'm booting a fresh remote dev server for the day). I then instinctively hit refresh, which has an invalid ws=...
in the query strong, so it loads some of the UI and hangs.
Scenarios this fixes
It seems like a fix that recognizes the invalid ws=...
after a server restart should be able to support both native browser refresh when a valid UI Mode disconnected
page is visible, and these hanging scenarios.
from playwright.
Related Issues (20)
- [Feature]: Option to start `webServer` when running `codegen` HOT 3
- [Bug]: Overridden browser fixture does not work as expected
- [Feature]: CLI command set for serial and parallel test execution to run a set of tests with a single worker and set of tests with multiple workers in a single test run HOT 1
- [Bug]: Playwright UI Mode Closes Without Reporting Test Results HOT 2
- [Docs]: Update docs on waitForResponse to include request method
- [Feature]: remove exposed function HOT 1
- [Feature]: Dismiss right click contextual menu easily HOT 3
- [Bug]: Unable to run chrome in k8s with seccomp_profile.json in v1.39.0 and up HOT 1
- [Feature]: The equivalent of cy.intercept, listening for requests, in order to use data from them HOT 4
- [Feature]: if user select test.only testcase then it should be display test.only testcase in UI mode HOT 2
- [Feature]: Make CodeGen able to continue with the existing test HOT 1
- [Bug]: Debugging in Playwright Test for VSCode does not work when there is a diacritic in the name of the file HOT 2
- [Feature]: Support configuring playwright.config searching in playwright-vscode HOT 2
- [Bug]: The dependencies installed on ubuntu-latest are not being transferred to runs-on:self-hosted HOT 1
- [Bug]: recordHar was not working with electron
- [Bug]: HOT 1
- [Bug]: Screenshot Masking Feature Fails to Operate Properly
- [Bug]: Playwright UI timeline data get wiped when test fails
- [Feature]: Ability to consume matching entries using routeFromHAR
- [Bug]: Playwright 1.44 cannot start Electron application (Windows)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playwright.