LadybirdBrowser / ladybird

Truly independent web browser
https://ladybird.org
BSD 2-Clause "Simplified" License
21.94k stars 970 forks source link

Login into Home Assistant breaks at a forward #939

Open RubenKelevra opened 3 months ago

RubenKelevra commented 3 months ago

I'm using Ladybird 936b76f36e8.

Home Assistant is an open-source home automation project with a local first approach. I've been using it for years.

I run it on a Raspberry Pi 4B and connect either through VPN or directly over my local network.

Recently, I tried to log in, and while the initial login worked, it asked for a second factor authentication. However, after entering the second factor, the redirect didn’t work.

I found this curious, as I think you would have expected the redirect to function properly by now.

Screenshot_20240803_073312

AtkinsSJ commented 3 months ago

Are you able to isolate what the redirect is?

Also, does this still happen if you run Ladybird with --enable-qt-networking?

RubenKelevra commented 3 months ago

Are you able to isolate what the redirect is?

How do I do this?

Or should I run Wireshark to record the conversation?

Also, does this still happen if you run Ladybird with --enable-qt-networking?

Nope. Works fine with that flag:

Screenshot_20240803_110000

And after a while the dashboard appears:

Screenshot_20240803_110155

Btw: Should we report Unhandled JavaScript exception (in promise) or are those expected at the moment?

RubenKelevra commented 3 months ago

Or should I run Wireshark to record the conversation?

Here's the login conversation. REMOVED means I removed stuff, to get the size down etc. :)

Hope that helps:

conversation_broken_refer_filtered.txt

AtkinsSJ commented 3 months ago

Great! That should be really helpful.

It working fine with Qt networking means it's an issue with our own networking code, so that narrows it down.

RubenKelevra commented 1 month ago

I've tried it with Ladybird 34261e54901 and it's still broken:

Screenshot_20241013_165819

While the workaround with --enable-qt-networking does not work anymore:

Unrecognized option --enable-qt-networking
AtkinsSJ commented 1 month ago

While the workaround with --enable-qt-networking does not work anymore:

Unrecognized option --enable-qt-networking

Yeah, we replaced the networking stacks with Curl, so that flag doesn't exist any more. Odd that Curl doesn't work here though.

RubenKelevra commented 1 month ago

Yeah, we replaced the networking stacks with Curl, so that flag doesn't exist any more.

I've heard about that, that's why I wanted to recheck.

Odd that Curl doesn't work here though.

I wonder what's so special about the Home Assistant login...