I am working on a internal app for my company in G Suite. I have a modal dialog that I am using in the spreadsheet app. I can not find a way to do this on Drive for mobile so I decided to Deploy as a web app. I have never used this feature in app script so I decided to set up a new project to mess around with before I applied it to my active project. I have two files in the project; Code.gs
function doGet(e) {
return HtmlService
.createHtmlOutputFromFile('mainPage')
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
}
and mainPage.html
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
</head>
<body>
<!-- Reference: http://getbootstrap.com/javascript/#tabs -->
<div role="tabpanel">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a role="tab" data-toggle="tab" aria-controls="home" href="#home">Home</a>
</li>
<li role="presentation"><a role="tab" data-toggle="tab" aria-controls="profile" href="#profile">Profile</a>
</li>
<li role="presentation"><a role="tab" data-toggle="tab" aria-controls="messages" href="#messages">Messages</a>
</li>
<li role="presentation"><a role="tab" data-toggle="tab" aria-controls="settings" href="#settings">Settings</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="home">Lorem ipsum dolor sit amet</div>
<div role="tabpanel" class="tab-pane" id="profile">consectetur adipiscing elit,</div>
<div role="tabpanel" class="tab-pane" id="messages">sed do eiusmod tempor incididun</div>
<div role="tabpanel" class="tab-pane" id="settings">ut labore et dolore magna aliqua</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
</body>
</html>
I click "File>Manage Version" and create a version. Then "Publish>Deploy As WebApp" and get this Fetching Data
I have let this sit for more than 30 minutes with no change. I restarted my system and went through the steps again and still no change. Any suggestions on what is going on?
Save a new version of the script by selecting File > Manage Versions, then Save New Version. Select Publish > Deploy as web app. Under Project version, select the version you just saved.
There are a few possible causes for these errors: A Google server or system is temporarily unavailable. Wait for a few moments and try running the script again. There is an error in your script that doesn't have a corresponding error message.
To speed up a script, read all data into an array with one command, perform any operations on the data in the array, and write the data out with one command.
An Apps Script project deployment is a version of the script that is made available for use as a web app, add-on, or API executable. By creating and managing deployments, you can iterate on your code, keep track of your changes, and control the exact code version your users have access to.
Any suggestions on what is going on?
To figure out what's going on, look at the underlying Google request via browser tools.
For Chrome:
In my case, I was attempting to deploy from an account outside the organization:
Only users in the organization may deploy this script.
View the specifics for your case and decide what the next appropriate action is.
To complete Ahmed answer:
you might not be part of the group or the owner of the script.
It's also true if you try to deploy a script from a file you have the right to edit without being the owner.
To change the owner: open the sheet with the owner account, go to share> advance> click on the arrow that triggers the dropdown> set as the owner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With