electron: allow the redirect from voice.google.com/about so WAA can init - #23
Open
jacobjeger wants to merge 1 commit into
Open
electron: allow the redirect from voice.google.com/about so WAA can init#23jacobjeger wants to merge 1 commit into
jacobjeger wants to merge 1 commit into
Conversation
voice.google.com/about now redirects to workspace.google.com/products/voice/, which
is not in staticAllowedURLs. onBeforeRequest therefore cancels the window own
navigation and Electron logs:
Failed to load URL: https://workspace.google.com/products/voice/
with error: ERR_BLOCKED_BY_CLIENT
loadURL rejects, so "waiting_for_init" is never printed and `inited` stays false.
Every later signature request then takes the init branch in processIPC and fails with
"invalid init data", or times out waiting. Messages are still sent, but with no WAA
signature at all, which is the documented path to HTTP 429.
This is easy to mistake for Electron not being installed: it launches fine and logs
normally, it just never finishes init. It likely explains the reports in mautrix#4, mautrix#7 and mautrix#9
where people installed Electron and still got 429s.
Allow top-level navigations anywhere under google.com so a future redirect change
cannot break init again; sub-resources stay restricted to the WAA script alone.
A narrower fix would be to add the single new URL to staticAllowedURLs -- happy to
switch to that if you prefer to keep the allowlist strict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
voice.google.com/aboutnow redirects toworkspace.google.com/products/voice/, which is not instaticAllowedURLs.onBeforeRequesttherefore cancels the window's own navigation:loadURLrejects, sowaiting_for_initis never printed andinitedstaysfalse. Every later signature request then takes the init branch inprocessIPCand fails:Messages still send, but with no WAA signature at all, which is the documented path to HTTP 429.
Why this is easy to miss
Electron launches and logs normally — it just never finishes init. From the outside it looks like a working setup. This may explain #4, #7 and #9, where people installed Electron and still saw 429s (including
electron status: ok).The fix
Allow top-level navigations anywhere under
google.com, so a future redirect change cannot break init again. Sub-resources stay restricted to the WAA script alone, as before.A narrower fix would be adding the single new URL to
staticAllowedURLs— happy to switch to that if you would rather keep the allowlist strict. The diagnosis matters more than my particular patch.Verification
Deployed on a self-hosted bridge. Before:
ERR_BLOCKED_BY_CLIENTtheninvalid init dataon every send. After:Waa ping successful, and noinvalid init dataorERR_BLOCKED_BY_CLIENTsince.