Coder Social home page Coder Social logo

Comments (4)

pavelfeldman avatar pavelfeldman commented on May 13, 2024

It should actually show you the reload screen if the connection is terminated:

image

Not sure why it does not do it - probably because k8s keeps the balancer socket alive?

from playwright.

wuservices avatar wuservices commented on May 13, 2024

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.

pavelfeldman avatar pavelfeldman commented on May 13, 2024

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.

wuservices avatar wuservices commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.