aome510 / hackernews-TUI

A Terminal UI to browse Hacker News
MIT License
534 stars 22 forks source link

"Failed to get stories" on FreeBSD #100

Open phips opened 6 months ago

phips commented 6 months ago

Hello,

Would you have any idea why the client fails to get stories on an ec2 FreeBSD machine, yet a curl works just fine please?

Installed via cargo install hackernews_tui --locked

Thanks!

Screenshot 2023-12-21 at 14 11 03 Screenshot 2023-12-21 at 14 11 29
aome510 commented 6 months ago

Is this a consistent error which happens every time you start the application? Can you also share the application log in .cache folder?

phips commented 6 months ago

Hello @aome510 — yes, everytime. Log should be attached, thanks!

hn-tui.log

aome510 commented 6 months ago

Maybe related to https://github.com/algesten/ureq/issues/637. I suspect this issue may involve the network setting of your machine. Can you checkout https://github.com/aome510/hackernews-TUI/tree/100-debug and run cargo run to see if there is a panic? The difference between that branch and latest main is

 fn main() {
+    let d = ureq::head("https://google.com").call().unwrap();
+    println!("{d:?}");
+
phips commented 6 months ago
Screenshot 2023-12-24 at 15 23 03

A ha! That might be it, yes. There is ipv6 on this machine too. Hmm. Frustrating that the module doesn't work with the transport the world is trying to move towards, isn't it? 🤔

I'll try disabling it and see if it plays ball. But ultimately that's not the correct answer. Of course, I appreciate that is not this project's doing - ureq needs to get with the status quo 😄

aome510 commented 6 months ago

Thanks for confirmation. I can switch to https://docs.rs/reqwest/latest/reqwest/ if ureq has that limitation

phips commented 6 months ago

Is reqwest a bigger library than ureq? I don't suppose it ultimately matters. Shame ureq has such a fundamental thing as ipv6 missing really, isn't it.

aome510 commented 6 months ago

Is reqwest a bigger library than ureq? I don't suppose it ultimately matters. Shame ureq has such a fundamental thing as ipv6 missing really, isn't it.

yeah, bigger and more dependencies. It's more popular and has more features as well. The main reason I chose ureq in the first place is that it's relatively minimal. Maybe, that's why it doesn't have a good support for ipv6.

ryanmcgrath commented 5 months ago

This may be resolved now since they deployed IPV6 support.

(The issue is primarily that ureq does not implement a happy-eyeballs type feature - i.e, it won't try both ipv4 and ipv6 at the same time and choose whichever one works.)

aome510 commented 5 months ago

This may be resolved now since they deployed IPV6 support.

(The issue is primarily that ureq does not implement a happy-eyeballs type feature - i.e, it won't try both ipv4 and ipv6 at the same time and choose whichever one works.)

@phips can you try again with the new change? I haven't had a chance to switch to rewquest yet. If it works, maybe the switch is not needed.

phips commented 5 months ago

Sadly nope @aome510 — still the same 😢

Screenshot 2024-01-28 at 12 50 48