Repository navigation
Handle missing GM_SPT_ENABLED/GM_RFT_ENABLED flags - #848
Merged
josteink merged 1 commit intoNov 20, 2026
Merged
Conversation
Gmail no longer defines window.GM_SPT_ENABLED or window.GM_RFT_ENABLED. is_new_data_layer() therefore returned false, so request payloads were never parsed and send_message (plus the /i/fd and /i/bv email-data caching) silently stopped firing. Treat an absent flag as the new data layer / GUI, since classic Gmail no longer exists. With /i/fd and /i/bv parsing active again, a single thread without an email list threw inside the loop and discarded the whole response. Skip such threads instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
josteink
approved these changes
Nov 19, 2026
Collaborator
|
Hey there and thanks for the patch! LGTM. I'll have to test it before I merge, but I expect to get that done by tomorrow. Will publish a new version on npm if merged too. |
Collaborator
|
I've reproduced the error. I've tested the fix. Looks good to me. |
Collaborator
|
Now published on npmjs as |
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.
What
Gmail no longer defines
window.GM_SPT_ENABLED/window.GM_RFT_ENABLED(both areundefinedin the page context now). Becauseis_new_data_layer()checked for the literal"true", it started returningfalse, andparse_request_payloadwas never called. As a result:send_message(andsend_scheduled_message) never fire. The/sync/u/0/i/srequest is still intercepted, and its payload still has themsg-a:email node with the^pfglabel array, but nothing parses it./i/fdand/i/bvresponses are no longer cached, sogmail.new.get.email_data()loses its XHR-sourced data.is_conversation_view()falls into the classic-Gmail branch.Changes
api.check.is_new_data_layer()/api.check.is_new_gui()now treat an absent flag as enabled and returnfalseonly when the flag is explicitly"false". Classic Gmail no longer exists, so "absent" means "new".parse_fd_request_payload/parse_bv_request_payload: once these parsers ran again, some/i/fdresponses contained a thread without an email list. The resultingTypeError: fd_emails is not iterablewas caught, but it discarded the whole response. Such threads are now skipped and the rest of the response is still parsed.Tests
is_new_data_layer/is_new_guichecks:undefinednow expectstrue, and"false"still expectsfalse.[], notnull). They fail without the fix.tsc,jest(154 passing) andeslint(no errors) are all clean locally.Verified in a live Gmail session:
send_messagefires again after the change.🤖 Generated with Claude Code