I'm trying to publish a Spreadsheet Add-on following the the app scripts documentation but I get this error:
Please fix the following errors:
API Console project with the id specified in the manifest's api_console_project_id field, does not have Google Apps Marketplace
SDK enabled. api_console_project_id
Here you can see a screenshot: http://i.stack.imgur.com/s3w3h.png
Inside the documentation it says:
Do not upload a file in the Upload section at the top of the page;
Apps Script generates this file automatically for you and uploading a
separate file will cause the publication to fail.
As far as I know, the api_console_project_id is inside the manifest.json but it says that I should not upload anything, right? (developers.google.com/apps-marketplace/listing#the_manifest_file)
Does anyone know what do I have to do or why I can not publish?
Thanks!
Sorry I didn't saw your comment till now Mogsdad!
Here is the solution
I have found the answer to my problem (I swear I was looking for an answer during the whole day). Anyway, what I had to do was described in Publishing Add-ons for Domain-Wide Installation.
This question gave the the clue:
Error while publishing to chrome web store
Related
I have a Gmail Add-on deployed on marketplace, it was working fine but now when a user have multiple accounts logged into gmail and tries to install my add-on. It shows the error
Sorry, unable to open the file at this time.
Please check the address and try again.
The URL of opened popup is (script_id is my project's script id ): https://script.google.com/macros/u/1/s/<script_id>/authorize?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.addons.current.action.compose%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.addons.current.message.metadata%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.addons.execute%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fscript.external_request%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile
When only one account is logged into Gmail, then it works as expected and add-on is installed normally.
I checked other solutions to the same problem, then say we need to remove /u/1/ from the URL. I copy pasted the URL into another tab and removed /u/1/ from the URL. I still got the same error. Also, this URL is generated by Google and not by us, so we cannot edit it.
Any help for the problem mentioned above will be appreciated.
Thanks in advance.
This is a well known issue regarding Apps Script and the way Google handles multiple accounts being logged in.
The documentation states the following regarding this matter:
If you're logged into multiple Google Accounts at the same time, you might have trouble accessing your Apps Script projects, add-ons, and web apps. Multi-login, or being logged into multiple Google Accounts at once, isn't supported for Apps Script, add-ons, or web apps.
Possible workarounds for this include:
Logging out of all your Google Accounts and only log in to the one that has the Apps Script project, add-on, or web app you need to access.
Opening an incognito window in Google Chrome, or an equivalent private browsing window, and log in to the Google Account that has the Apps Script project, add-on, or web app you need to access.
This is currently being tracked on this report here; I suggest you star it as any updates regarding this will be posted there.
Reference
Apps Script Script Projects.
I was following this step-by-step about File Dialogs from Google developers Apps Script pages to insert a Google file picker dialog window into my add-on but I keep facing the same error:
ScriptError: Exception: We're sorry, a server error occurred. Please wait a bit and try again.
I have triple-checked all the steps, key, credentials, scopes in the manifest, and so on and the issue persists. I even looked into this video for some light. No need to say I waited "a bit" and tried countless times. What else might be causing this problem?
I had a similar issue with the file picker and also used the guide on the google homepage.
Try to call "DriveApp.getFileById(). If that results in the same error message, the method below should work.
There seems to be a bug within Google Apps script. You have to enable "Google Drive API" in your Google Cloud Platform Project. Then start the File Picker. Afterwards you may disable "Google Drive API" again.
For more information see StackOverflow, that's where I found the method.
I have an add-on for Google Sheets that's currently being tested within my domain. For this post, let's call it My First Add On. When users install the add-on they're prompted for permissions, but it always appears as "Untitled project" in the dialog box:
The project name is set to My First Add On everywhere I can find:
The Google Apps script project name
The Google Cloud Platform project name (IAM > Settings)
The Google Chrome Web Store add-on name (Developer Dashboard)
My add-on is published with 'private' visibility, available only to people in a given Google Group (my trusted testers).
I've searched through documentation and forums to see what I'm missing here, but can't find anything that covers this scenario.
This has to be something basic, but I'm completely stuck and the only support option available to me is to post here. I'd be grateful for any help, folks!
I've seen something similar, where the name of the script isn't updated if you test it before saving the name (ie, create a name when prompted rather than before testing). Try clearing your cache, closing out of the tab, etc, and then launching again. I'm not sure it's something you can fix in code or listings anywhere.
In my Google spreadsheet, when I go to "Tools->Script Editor..", I get a page saying "No Such User" Error. Any idea how to fix this?
I figure this could be a permissions issue, but not sure how to change permissions if required.
Finally i found the solution accidentally.
The issue is resolved by enabling GoogleAppsScript as part of your drive.
Open Google Drive in your web browser.
Click New > More > + Connect more Apps
and then select GoogleAppsScript.
Once i did this going back to script editor of my spreadsheet, no more gives any error.
Here is the link which contained this step:-
https://developers.google.com/drive/v2/web/quickstart/apps-script
Also there is additional problem about Invalid OAuth Client when trying to run the script. which i faced since each apps script has to be attached to a Google Cloud Project. This is accessible only to the person who originally created the file even after its in the team drive. In which case, you need to make a copy of the apps script available by going into File->Make a copy. And then in the Resources drop down , you will see Cloud Platform Project, upon clicking it you can now give the project number of the Google Cloud Platform project you created on console.cloud.google.com.
I had published a private addon on google spreadsheet. However, the problem is, I lost the app script source code for my addon. I need to make some changes and publish it again.
How can I possibly get/download the code from the spreadsheet addon that I published on the chrome web-store?
I tried looking on https://chrome.google.com/webstore/developer/dashboard where there is a list of all my addons published but there's no option for reading the source code. A quick google search reveals nothing regarding this. Any suggestions?
I figured out a way to find the code.
From your developer dashboard: https://chrome.google.com/webstore/developer/dashboard
click on more info and then click to download the main.crx file for the addon you're interested in.
main.crx is a zip file which you should be able to unzip. On linux or mac you can do it from the command line unzip yourfilename_main.crx
open up manifest.json and look for "container_id" the string after that is the file ID of your script.
https://script.google.com/d/container_id_of_your_script_here/edit
It's not possible to get the source code from the Chrome Web Store. Instead you have to find the file that holds your Google Apps Script project. Take a look to the Trash of your Google Drive. For further details see Find or recover a file - Google Drive Help