-
Notifications
You must be signed in to change notification settings - Fork 2
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
Revert or fix broken webserial support #89
Comments
I agree - revert for now, so that we actually have working software, then figure out what is needed to upstream once possible. Mozilla's current position is that WebSerial in its current form is harmful (discussion), though there are addons that add support which I have not tested. Since we already were building separate bundles with |
soooo... i havent tested webserial support with the latest changes, but I can confirm that my brushless axidraw is happy plotting with #94 . So maybe we don't need to revert? |
I am wondering if the node serial upgrade did the trick |
Possibly serialport/bindings-cpp#115? |
Hard to tell - I would expect with that bug to not be able to connect at all, but the behavior I got was lots of bad moves, then a few normal moves plotting, then a bunch of bad moves. Bad move = pen would just wiggle < 2mm movement and servo would sing different pitches. Now it seems smooth. |
And its back :( |
Copying from another issue:
These lines look suspicious to me, as |
OK, I'm getting closer. I think the problem is React hooks are instancing Namely, the Another solution is to wrap the driver connection code with a flag so only one attempt is made. |
Given that we have a separate IS_WEB(serial) build, I wonder if we can avoid having to attach the handlers in an useEffect hook. The rerenders should really only happen when needed. |
I also started investigating https://github.com/robtaussig/react-use-websocket#example-implementation to see if it handles certain things better. For example, our server uses the entire WebSocket object for identity, so I am unsure if it actually is filtering out when a tab is closed. We should generate an ID client-side and just pass that in as a query parameter, so we can gracefully remove connections that have been terminated. |
Why don't you give #113 a try? It works for me. (EDIT: Well, it runs for me and appears to eliminate the redundant EBB connections. I can't reproduce the crashes you experience) I agree with your suggestion that it's possible to avoid |
OK so the |
@jedahan said:
I'm conflicted about this.
On the one hand, multiple people have reported problems with the webserial implementation. (I removed it myself and found things improved!) It's clearly problematic.
On the other, nornagon explicitly doesn't want to revert it. I've been hoping to keep as as little of a diff with him as possible to upstream our changes.
I'm leaning towards revert it so we can iterate on a working system. When
nornagon
is available again, we can try to upstream what's relevant. I don't want a hard fork.The text was updated successfully, but these errors were encountered: