Skip to content
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

[RPC] Events are delayed when connecting more than 2 times #7200

Open
Hacksore opened this issue Oct 7, 2024 · 1 comment
Open

[RPC] Events are delayed when connecting more than 2 times #7200

Hacksore opened this issue Oct 7, 2024 · 1 comment
Labels

Comments

@Hacksore
Copy link

Hacksore commented Oct 7, 2024

Description

I seem to have uncovered either a neat bug or feature that I'm trying to understand why it exists.

tl;dr my app connecting to the RPC websocket after more than two attempts will result in an extended delay for getting events back on stable.

This doesn't seem to happen for your app streamkit at all on stable. Furthermore, on canary this does not happen to my app and every connection is free of any delay in receiving events.

This really messes with auth flow for my app, if users have tried to load the app more than twice and it's cause a confusing UX and they perceive it as not being able to sign in.

I know I'm going to be told that I should be using IPC instead of WebSocket but this is also reproducible on the IPC transport.

IPC repro: https://github.com/Hacksore/test-rpc-djs/blob/test-ready/index.js

Steps to Reproduce

Using my test setup.

  1. Open discord
  2. Load https://overlayed.dev/test (source code)
  3. Refresh (it loads ready)
  4. Refresh (it loads ready)
  5. It is stuck waiting for the READY event

alternatively use the IPC repro I gave above and run the script a few times.

Expected Behavior

Should allow me to connect without delay in responses.

Current Behavior

Delay in getting events back after 2 connection attempts.

Screenshots/Videos

Built-in.Retina.Display.mp4

Client and System Information

Desktop client:
stable 333428 (3995449) Host 0.0.321 arm64 Build Override: N/A macOS 15 (24.0.0)

@Hacksore Hacksore added the bug label Oct 7, 2024
@Hacksore
Copy link
Author

Hacksore commented Oct 7, 2024

As for the delay it will connect instantly to the socket and dispatch READY approximately ~20 seconds later.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant