ranfdev / Geopard

Colorful, adaptive gemini browser
https://ranfdev.com/projects/Geopard/
GNU General Public License v3.0
149 stars 12 forks source link

Incompatibility with `The Wall` page #99

Closed tfuxu closed 5 months ago

tfuxu commented 5 months ago

Describe the bug Whenever you try to connect to The Wall, you'll get a TLS connection closed unexpectedly error.

To Reproduce Steps to reproduce the behavior:

  1. Go to gemini://tilde.cafe/~spellbinding/wall/cgi
  2. See error

Expected behavior Geopard should display contents of the page. It even displays it for a split second, but then it shows the error page.

Software info (please complete the following information):

Additional context I identified that the error comes from Line 651 in tab.rs during data reading, after getting a response from server.

tfuxu commented 5 months ago

I investigated a little bit further, and found that this bug was introduced with commit 05f7c7268708a11707a64c7a579ab80ea04c9444.

As a note, it panics instead of showing an error page, because gtk-rs-core before v0.19.0 used plain unwrap() in PollableInputStream (link).

ranfdev commented 5 months ago

Thanks for looking into it. As far as I can tell, It's a problem with how Gio handles the termination phase of some TLS connections.

As you said, the problem started showing up in the moment I switched from async_native_tls to gio.

I still don't know how to properly handle the error though. In the worst case, I will just suppress it. The error is rare and doesn't prevent loading the page, so suppressing it would work.

tfuxu commented 5 months ago

I see. Is there an issue for it in upstream?

ranfdev commented 5 months ago

No, there isn't. At least not one made by me. Feel free to open it.

ranfdev commented 5 months ago

closed with latest commit, suppressing the error