r/GoogleAppsScript • • Oct 11 '21

Question How to Deploy Apps Script as Web App?

Hello there,

I've just started playing around with Google Apps Script, and I love the platform so far, except that I can't deploy my script. No matter what I try, I keep getting the following error, and it's really driving me up the wall.

Of course, I tried to look at Google's documentation, but as usual (for me, at least), they led me nowhere. I couldn't really find solutions on the web that weren't outdated, so here I am. I'm hoping you guys can help clarify the steps needed to deploy as a web app, to execute as the user accessing the web app.

Thanks in advance!

Edit: Here's the code structure:

7 Upvotes

13 comments sorted by

2

u/TheIInSilence4 Oct 11 '21
  1. You can only be logged into one domain gmail account. Ie cant do work and personal at the same time. Log out all accounts and try again with the one you want.

  2. Republish with the old editor and select version new.

1

u/SiD_Inc Oct 11 '21

I tried, but it didn't work for me. Getting hit with the same error message again...

1

u/TheIInSilence4 Oct 15 '21

If you never got this fixed... just wanted to confirm.

You tried with legacy editor?

It never worked for me when I used the new editor that I see in your screenshot

1

u/SiD_Inc Oct 15 '21

Yea I did one with the legacy editor and it didn't work. When someone requested for the deployment page, I redeployed on the new editor. I'll try again with the old editor, and, as suggested by u/okburner22, I'll wait for a while. I'll update you guys with the deployment page then, and also keep you guys updated on a solution if I find one.

1

u/RemcoE33 Oct 11 '21

There are a ton of video's on youtube.. this is in the old IDE but the logic is the same

1

u/SiD_Inc Oct 12 '21

Followed exactly as the video showed, but didn't work for me. I'll look into other videos as well. Thanks for replying!

1

u/gh5000 Oct 11 '21

Does your script have a doGet or doPost function? Just checking we've got the basics covered

1

u/SiD_Inc Oct 12 '21

Yes, it does, my bad for not including it:

function doGet(){
    textOutput = ContentService.createTextOutput("Hello World!")
    return textOutput
}

1

u/[deleted] Oct 12 '21

[removed] — view removed comment

1

u/SiD_Inc Oct 12 '21

It's in my personal drive, not in any shared folder.

1

u/[deleted] Oct 12 '21

[removed] — view removed comment

1

u/SiD_Inc Oct 13 '21

Ok, I've edited the post!