I’m having trouble with my Google Apps Script web app. When I try to open it, I get a ‘Page not found’ error. The message says it can’t open the file right now.
I set it up to run as me (the owner) and made it available to everyone. Even when I make a simple test project with just a doGet()
function and a basic HTML file, I still get the same error.
Here’s what my test looks like:
function fetchPage(request) {
return HtmlService.createHtmlOutputFromFile('SamplePage');
}
<!DOCTYPE html>
<html>
<head></head>
<body>
<p>Sample content</p>
</body>
</html>
It works fine in my personal account, but not in this one. I’ve already got some web apps running here. Is there a limit on how many you can have?
I’ve tried different browsers, accounts, and republishing. Nothing helps. The test link fails too. The script runs okay in the editor, but the deployed version won’t load. There’s nothing in the logs either.
Any ideas what could be causing this?
I’ve run into this issue before, and it can be pretty frustrating. One thing that solved it for me was checking the project’s settings. Sometimes, the Google Apps Script runtime version can cause conflicts. Try going to Project Settings and changing the runtime to the latest version available.
Another potential fix is to clear your browser cache and cookies, then try accessing the web app again. If that doesn’t work, you might want to check your Google account permissions. Ensure that you have the necessary permissions to create and deploy web apps in your Google Workspace account.
If none of these work, it might be worth reaching out to your Google Workspace admin. They can check if there are any organization-wide settings blocking web app deployment. In my experience, it’s often an overlooked permission or setting causing the issue rather than a hard limit on web apps.
Have you checked your Google Cloud Console settings? Sometimes, the issue lies there rather than in the script itself. Make sure the necessary APIs are enabled for your project, especially the Apps Script API.
Another thing to consider is the execution time. If your script is complex, it might be timing out before it can fully load. Try simplifying your code or increasing the timeout limit in your script properties.
It’s also worth verifying your domain’s security settings. Overly strict content security policies can sometimes interfere with web app deployment.
If all else fails, consider creating a new project and gradually migrating your code over. This can help isolate whether the issue is with your specific project or a broader account problem.
Remember, Google’s support team can be surprisingly helpful with these kinds of issues. Don’t hesitate to reach out to them if you’re still stuck.
hey there, i had a similar issue. check ur script’s authorization. sometimes it needs to be reauthorized after changes. go to Run > Run function > fetchPage and approve permissions. also, double-check the web app URL - make sure ur using the latest one after each deploy. hope this helps!