mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #471] WebSocket page freezes when pasting long URL #183
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @igorrocha on GitHub (Jan 3, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/471
Describe the bug
When trying to paste a very long URL on the websockets page (https://postwoman.io/realtime/), the page freezes without any error message on the browser console.
To Reproduce
Expected behavior
The URL should be pasted normally, and I should be able to connect to it.
Desktop:
Tried on three environments:
Additional context
One thing I noticed is that when the tab freezes there's a spike in CPU usage on the computer (I measured it on the system monitor, and also the laptop's vents went off like crazy). My guess would be that there's some sort of client side validation of the pasted URL, and such a long URL is too demanding of it. That's just a guess, however, as I couldn't find a way to debug it.
@igorrocha commented on GitHub (Jan 3, 2020):
Another bit of additional context: the reason for using such a long URL is that I'm trying to pass an Authorization header with the request. I'm trying to use the workaround suggested by @liyasthomas on #321
@liyasthomas commented on GitHub (Jan 3, 2020):
Issue has been identified. I think there might be three reasons for this behaviour:
App's current state is saved to localStorage via Vuex. Long URL string might've crashed Vuex binding. Anyway, I'm not sure of whether this is the reason yet.Browser specific bug: Chrome used to crash while pasting large strings into input boxes. Since behaviour is repeated on Firefox, this possibility can be excluded.There's a client side validation for checking the WSS URL. This is implemented in regex. This might've caused CPU race condition based on given pattern checking. This is a highly possible reason
Anyway, stay tight, will fix ASAP.
Found the issue: it was
#3@igorrocha commented on GitHub (Jan 3, 2020):
That was super fast, @liyasthomas , thank you very much!
@igorrocha commented on GitHub (Jan 6, 2020):
@liyasthomas The issue seems to have returned... Can you please check on your side and see i you can reproduce the bug?
@liyasthomas commented on GitHub (Jan 7, 2020):
I couldn't reproduce the bug, everything seems to be working fine.
@igorrocha commented on GitHub (Jan 10, 2020):
False alarm on my side, my bad! Have a great weekend :)
@W1M0R commented on GitHub (May 27, 2020):
I had the same problem, but realised that I used an outdated version from DockerHub.