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
session.Status command doesn't really make sense #46
Comments
@sadym-chromium and I noticed this yesterday as well when walking though https://w3c.github.io/webdriver-bidi/#commands-status and https://w3c.github.io/webdriver/#dfn-readiness-state (which isn't linked, oops). It's defined as:
But this is talking about readiness for a Should we just remove this command, since it was mostly added to prove out a command? Or do we want a no-op "ping" message in BiDi, to keep the connection alive or something? (This already exists at probably multiple of the underlying layers, but is arguably harder to use since it punches through layers of abstraction.) |
The Currently we have 2 connections: client to WebDriverBiDiServer, and WebDriverBiDiServer to the browser itself. Having We can implement 2 approaches:
I would recommend to use the first option with Here is a prototype of the The documentation needs to be adjusted accordingly after the decision is made. |
Treating Regarding when (if ever)
Note that this isn't a design principle that's been explicitly discussed and it might be flawed, but in this case it would be an argument for the second option, "Drop @sadym-chromium WDYT? |
There are some related questions here which would be great to answer:
Even if the answer is that a session is by definition always ready while the connection is open, an e2e ping still seems to serve some practical utility, so I'm not argument that we should remove it. But maybe it should be defined to always return true if we can't define the case where it would not be ready. |
I don't think that there's a requirement that the connection has multiple hops (I don't expect the gecko implementation to have multiple hops in the default case). There may also be middleware that adds additional hops to the connection. I think in general if one part of the the route drops the connection it makes sense for the connection to be dropped everywhere. Having an event corresponding to that seems troublesome because it can't be reliably delivered (consider the case where the node closest to the client crashes). My opinion is we ought to drop this endpoint and if someone wants to resurrect it propose it as a new feature rather than working from a position where it already exists and we hunt around looking for a use case. |
The main concern in dropping connection is that it can be harder to debug the crash reason. So I'd go for an option:
|
@jgraham glad to hear it, I've filed #78 for that and some other things we may end up agreeing on :) @sadym-chromium dealing with crashes is currently pretty special in testing setups, I think basically you have to launch the binary yourself and monitor its exit code and read its stdout/stderr, and that none of this is standardized. For the case that the code implementing BiDi itself has crashed there's no possibility of the protocol helping, but other cases like renderer crashes, perhaps this would make sense. Can you file an issue about dealing with crashes? |
Regarding the fate of |
This is now possible with the |
I think the problem now is that "readiness state" isn't really defined (maybe it's just supposed to be a link to https://w3c.github.io/webdriver/#dfn-readiness-state ) I think we should fix that and close this issue. |
The way the spec is set up at the moment, it's not possible to have a WebSocket connection without a session. So the session status command doesn't make sense because it's always going to say yes there's a session.
For this to make sense there needs to be a way to start the websocket listener without starting a WebDriver/HTTP session.
The text was updated successfully, but these errors were encountered: