hoppscotch: [bug]: Connecting to a very high traffic websocket server stalls

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to realtime
  2. Paste url wss://ris-live.ripe.net/v1/ws/?client=hoppscotch.io
  3. Observe connect is disabled
  4. Remove parameter, quickly undo it and click connect (also a bug)
  5. Send { "type": "ris_subscribe" } to the remote server
  6. Observe you receive routes
  7. Observe program freezing
  8. Observe you only see like 5 messages

Expected behavior ris-live is a stream of bgp announcements on the internet, with the { "type": "ris_subscribe" } we don’t filter it at all, there are over a thousand messages per second.

Screenshots Stalls at this point Stalls at this point

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser PWA installed with Firefox
  • Version 93

Additional context Parameters on wss urls is considered invalid, but f.ex ris-live requires it.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 19 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Great, Then I ll create a PR for the parsing?

Hi, I ran the steps to reproduce but I am unable to reproduce the issue. I ended up fixing the Regex code to allow this particular type of URL Here is a loom video: Loom Link

I was planning to update the regex to allow that particular syntax of wss urls

function generateREForProtocol(protocol) {
  return [
    new RegExp(
      `${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(:[0-9]+)?(\\/[^?#]*)?(\\?[^#]*)?(#.*)?$`
    ),
    new RegExp(
      `${protocol}(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9/])(:[0-9]+)?(\\/[^?#]*)?(\\?[^#]*)?(#.*)?$`
    ),
  ]
}

Please Guide me on how I can replicate this issue?