hackernews-TUI icon indicating copy to clipboard operation
hackernews-TUI copied to clipboard

"Failed to get stories" on FreeBSD

Open phips opened this issue 1 year ago • 10 comments

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

phips avatar Dec 21 '23 14:12 phips

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

aome510 avatar Dec 22 '23 04:12 aome510

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

hn-tui.log

phips avatar Dec 22 '23 10:12 phips

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:?}");
+

aome510 avatar Dec 24 '23 00:12 aome510

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 😄

phips avatar Dec 24 '23 15:12 phips

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

aome510 avatar Dec 24 '23 17:12 aome510

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.

phips avatar Dec 24 '23 17:12 phips

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.

aome510 avatar Dec 24 '23 18:12 aome510

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.)

ryanmcgrath avatar Jan 24 '24 00:01 ryanmcgrath

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.

aome510 avatar Jan 27 '24 16:01 aome510

Sadly nope @aome510 — still the same 😢

Screenshot 2024-01-28 at 12 50 48

phips avatar Jan 28 '24 12:01 phips