Hi all — I’m seeing a weird editor/runtime mismatch isolated to gmail.gs.
What I see
If the editor tab is gmail.gs, the Run button is grey and the function dropdown says “No functions”.
If I switch to any other file (e.g., main.gs), the Run button becomes active and other functions run fine.
However, functions inside gmail.gs (e.g., previewGmail_) never appear in the dropdown, and when I call them indirectly from main.gs, I don’t get any output (no email/logs) and no explicit error — the execution log just says “started/finished.”
Environment
New Apps Script editor, V8 runtime.
Consumer Gmail account.
Other parts work: Drive folder creation, Sheets writes, success email — all OK.
appsscript.json has these scopes:
.../auth/drive
.../auth/spreadsheets
.../auth/gmail.readonly
.../auth/gmail.modify
.../auth/script.send_mail
What I tried
Save all files, hard refresh, switch back to Editor view from Execution log.
Created a brand-new script project and pasted only gmail.gs below → same result.
If I comment out the entire gmail.gs, the Run menu works normally for the rest of the project.
Question
Is there a known issue that would make the editor fail to recognize top-level functions in a specific .gs file (and disable Run while that tab is focused)? Any parser quirks I might be hitting with the code below?
Minimal gmail.gs (standalone):
(In my project, helper functions getCutoff_() and fmtTZ() live in another file; in a fresh repro I stubbed them, but the editor still greys out the Run menu whenever gmail.gs is the active tab.)
Any ideas or known editor bugs I should be aware of? Thanks!
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/3916b9b2-7ec6-4a5c-b366-998dfcc66665n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/1680591758611717%40zh4mfevp4ifcvtxn.vla.yp-c.yandex.net.