OrangeDrangon / android-messages-desktop

Android Messages as a Cross-platform Desktop App
Other
304 stars 26 forks source link

User-Agent Fix for OrangeDrangon/android-messages-desktop#441 #450

Closed drislands closed 1 month ago

drislands commented 1 month ago

Modified how the user agent is set when sending headers. There were two issues that I was able to identify.

First, the Google sign-in page sends requests to the youtube.com domain sometimes, so the existing replacement effect was not always firing. Adding a url entry for this domain fixes this problem.

Second, Google sometimes doesn't like the hard-coded user agent this project was previously providing. I have no idea why -- this Electron/user agent/Google problem has been ongoing for years. I've solved this problem this time by instead taking the user agent Electron would have passed by itself and stripping out only the Electron-specific component.

I don't know how long this fix will last, since Google seems intent on being opaque about how they determine if a browser is secure or not. Fingers crossed.

OrangeDrangon commented 1 month ago

@drislands thanks for the patch will get it released once the checks finish

drislands commented 1 month ago

@OrangeDrangon Thank you! Glad I was able to help.

drislands commented 1 month ago

@OrangeDrangon I just saw one of the checks failed with an "already_exists" error code -- is this something I should have seen and fixed before the PR? I'm not sure what the solution is but I'll do whatever it needs to make it work.

OrangeDrangon commented 1 month ago

No that was a problem with the ci pipeline.

Thanks Kyle

Sent with Shortwave https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=a3lsZUBla3Jvc2VuYmVyZy5jb20=

On Sat Jun 8, 2024, 09:22 PM GMT, drislands @.***> wrote:

@OrangeDrangon https://github.com/OrangeDrangon I just saw one of the checks failed with an "already_exists" error code -- is this something I should have seen and fixed before the PR? I'm not sure what the solution is but I'll do whatever it needs to make it work. — Reply to this email directly, view it on GitHub https://github.com/OrangeDrangon/android-messages-desktop/pull/450#issuecomment-2156188792, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGB2A7LKNVPMKDMOQYCBUXTZGNYYLAVCNFSM6AAAAABJAA5OMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGE4DQNZZGI. You are receiving this because you were mentioned.Message ID: @.***>