Mango icon indicating copy to clipboard operation
Mango copied to clipboard

[Bug Report] Error while flushing data to the client (HTTP::Server::ClientError)

Open VegethB opened this issue 5 years ago • 2 comments

Describe the bug A friend of mine while changing the sort order (from auto to last modified) and then reciprocating immediately (before the modification was uploaded, the site crashed. This is the error on WSL1:

Unhandled exception in spawn: Error while flushing data to the client (HTTP::Server::ClientError)
  from ../../../usr/share/crystal/src/http/server/response.cr:258:9 in 'unbuffered_flush'
  from ../../../usr/share/crystal/src/io/buffered.cr:219:5 in 'close'
  from ../../../usr/share/crystal/src/http/server/request_processor.cr:62:11 in 'process'
  from ../../../usr/share/crystal/src/http/server.cr:498:5 in '->'
  from ../../../usr/share/crystal/src/primitives.cr:255:3 in 'run'
  from ???
Caused by: Error writing to socket: Broken pipe (IO::Error)
  from ../../../usr/share/crystal/src/io/evented.cr:156:7 in 'unbuffered_write'
  from ../../../usr/share/crystal/src/io/buffered.cr:219:5 in 'unbuffered_flush'
  from ../../../usr/share/crystal/src/io/buffered.cr:219:5 in 'close'
  from ../../../usr/share/crystal/src/http/server/request_processor.cr:62:11 in 'process'
  from ../../../usr/share/crystal/src/http/server.cr:498:5 in '->'
  from ../../../usr/share/crystal/src/primitives.cr:255:3 in 'run'
  from ???
Unhandled exception in spawn: Error while flushing data to the client (HTTP::Server::ClientError)
  from ../../../usr/share/crystal/src/http/server/response.cr:258:9 in 'unbuffered_flush'
  from ../../../usr/share/crystal/src/io/buffered.cr:219:5 in 'close'
  from ../../../usr/share/crystal/src/http/server/request_processor.cr:62:11 in 'process'
  from ../../../usr/share/crystal/src/http/server.cr:498:5 in '->'
  from ../../../usr/share/crystal/src/primitives.cr:255:3 in 'run'
  from ???
Caused by: Error writing to socket: Broken pipe (IO::Error)
  from ../../../usr/share/crystal/src/io/evented.cr:156:7 in 'unbuffered_write'
  from ../../../usr/share/crystal/src/io/buffered.cr:219:5 in 'unbuffered_flush'
  from ../../../usr/share/crystal/src/io/buffered.cr:219:5 in 'close'
  from ../../../usr/share/crystal/src/http/server/request_processor.cr:62:11 in 'process'
  from ../../../usr/share/crystal/src/http/server.cr:498:5 in '->'
  from ../../../usr/share/crystal/src/primitives.cr:255:3 in 'run'
  from ???

I was on discord that we were browsing, saw the error live 😂.

To Reproduce Steps to reproduce the behavior:

  1. Open The WebUI and go to "Library" section;
  2. Switch between "Auto up" order and "Date Modified up" order during the web page reloading;
  3. Web Page crash with some error (unfortunately I didn't see what an error FireFox was giving me. I think it was a "timed out" or "no information received")

https://user-images.githubusercontent.com/17975351/112851065-e40f9a80-90aa-11eb-9174-2949ee2899b5.mp4 In this case the web page did not crash (so I assume it is due to the fact that I use a connection with upload at 3MB maximum)

Expected behavior The web page does not crash and the error does not appear on the server console

Environment (please complete the following information):

  • OS: Windows Server 2019 x64 DataCenter
  • Browser: FireFox
  • Mango Version v0.21.0

Additional context I tried with 512kb\s UP and Down and 500ms on Chrome but I can't reproduce the error (I'll try with firefox on another pc or directly with an external network).

@hkalexling

  1. Please see the issue template and provide a way to reproduce it. Would be great if you could follow the template for future bug reports.

Sorry, I did the issue from the main page and it made me start an empty issue instead of choosing the templates (I didn't think there would be templates) 👍.

2. What do you mean by "the site crashed"? Did the server crash? The errors are not telling me anything.

The server did not theoretically crash but only reported this error. Instead on the Web side, while he was waiting for him to load the change to the order, the page went into error (like the classic errors 404, 500). Then refreshando with f5 has loaded the page.

VegethB avatar Mar 29 '21 12:03 VegethB

Hi!

  1. Please see the issue template and provide a way to reproduce it. Would be great if you could follow the template for future bug reports.
  2. What do you mean by "the site crashed"? Did the server crash? The errors are not telling me anything.

hkalexling avatar Mar 29 '21 14:03 hkalexling

@hkalexling updated

VegethB avatar Mar 29 '21 14:03 VegethB