appsactivity service is not available [duplicate] - google-apps-script

I have started receiving the message "Unreachable Service - appsactivity" today while executing my google apps script webapp. Anyone knows if there is an outage going on?

Unreachable Service - appsactivity
The previous answer is correct but the issue mentioned is now closed as a duplicate of
https://issuetracker.google.com/issues/169584647
Consider adding a star (on top left) to this issue instead. In addition, a related error:
Service not found: appsactivity v1
is also reported as duplicate of the above issue.
Possible solution(s):
Star the issue to pressure Google into fixing it and wait.
#30 - Remove appsactivity service from manifest file: appsscript.json
#33 - Disable V8 runtime
#43 - Disable, save and re enable Resources > Advanced Google services > Drive and Drive activity api
#49 - Enable the Apps activity api "for the project" you're having issue with.
#53 - Delete current project and create, use a new script

https://issuetracker.google.com/issues/169595450
Reported and assigned to someone at Google. Seems like an outage/unintended change.

This issue seems to be related to the deprecation of Drive Activity API v1. Google recommends migrating to v2 (See here).
You may need to clear caches, and perhaps even reactivate the advanced service.

So I was also facing the same issue.
The issue tracker suggests that it is because of depreciation of Drive V1 Api although when I checked my drive API version it was already the latest one so I tried the following which worked.
Click on View>>show Manifest File to see a JSON file that contains scopes.
and remove Apps Activity scope (I have tested my app in dev mode all things are working I will go through the necessity of this scope later).
it should look like this
{
"userSymbol": "AppsActivity",
"serviceId": "appsactivity",
"version": "v1"
},
I hope this helps you please comment back your response.
Thank You.

The solution it's Disable Runtime V8.
Open the script in the Apps Script editor. Select Run > Disable new Apps Script runtime powered by V8
Thats all
Im fixed my issue

Update: May 2nd 2021:
After a lot of trial and error the solution above to disable the v8 runtime is partially correct and does function -- as long as you don't try to use any other scripts with the V8 runtime as a library.
The complete solution -- You can update individual scripts to V8 but if you have any libraries attached to the script that are not also upgraded to V8 then the script will throw the 'unable to locate appsactivity v1' error.
Updating all of the scripts that are used as libraries to V8 as well was the key to fixing this issue for my scripts.
Frustrating that Google is pushing the upgrade to v8 (disabling debugger, etc...) without first fixing this issue since this is going to really throw some folks (like myself for quite some time) for a loop.

Related

Google AppScript Wierd behaviour: Service not found: appsactivity v1 [duplicate]

I have started receiving the message "Unreachable Service - appsactivity" today while executing my google apps script webapp. Anyone knows if there is an outage going on?
Unreachable Service - appsactivity
The previous answer is correct but the issue mentioned is now closed as a duplicate of
https://issuetracker.google.com/issues/169584647
Consider adding a star (on top left) to this issue instead. In addition, a related error:
Service not found: appsactivity v1
is also reported as duplicate of the above issue.
Possible solution(s):
Star the issue to pressure Google into fixing it and wait.
#30 - Remove appsactivity service from manifest file: appsscript.json
#33 - Disable V8 runtime
#43 - Disable, save and re enable Resources > Advanced Google services > Drive and Drive activity api
#49 - Enable the Apps activity api "for the project" you're having issue with.
#53 - Delete current project and create, use a new script
https://issuetracker.google.com/issues/169595450
Reported and assigned to someone at Google. Seems like an outage/unintended change.
This issue seems to be related to the deprecation of Drive Activity API v1. Google recommends migrating to v2 (See here).
You may need to clear caches, and perhaps even reactivate the advanced service.
So I was also facing the same issue.
The issue tracker suggests that it is because of depreciation of Drive V1 Api although when I checked my drive API version it was already the latest one so I tried the following which worked.
Click on View>>show Manifest File to see a JSON file that contains scopes.
and remove Apps Activity scope (I have tested my app in dev mode all things are working I will go through the necessity of this scope later).
it should look like this
{
"userSymbol": "AppsActivity",
"serviceId": "appsactivity",
"version": "v1"
},
I hope this helps you please comment back your response.
Thank You.
The solution it's Disable Runtime V8.
Open the script in the Apps Script editor. Select Run > Disable new Apps Script runtime powered by V8
Thats all
Im fixed my issue
Update: May 2nd 2021:
After a lot of trial and error the solution above to disable the v8 runtime is partially correct and does function -- as long as you don't try to use any other scripts with the V8 runtime as a library.
The complete solution -- You can update individual scripts to V8 but if you have any libraries attached to the script that are not also upgraded to V8 then the script will throw the 'unable to locate appsactivity v1' error.
Updating all of the scripts that are used as libraries to V8 as well was the key to fixing this issue for my scripts.
Frustrating that Google is pushing the upgrade to v8 (disabling debugger, etc...) without first fixing this issue since this is going to really throw some folks (like myself for quite some time) for a loop.

cannot enable BigQuery for apps script project

Since yesterday I can no longer successfully enable the BigQuery API in my apps script projects. I have done this literally hundreds of times over the past months, so I am very familiar with the process. Since yesterday the enabling doesn't actually take effect anymore.
Steps to reproduce:
Create or locate a BigQuery project & dataset, find the project numeric ID.
In Google Drive create an apps script project
Paste the following function:
var projectNumber = '1111111111'; // Google cloud BigQuery project *number* not alphanumeric id
function bqtest() {
datasets = BigQuery.Datasets.list(projectNumber);
Logger.log(datasets);
}
In [script > resources > advanced google resources] enable the BigQuery v2 API
Try to run the function, you will get an OAuth authorization pop-up and will need to grant your script access to BigQuery
You will then get an error that says that the BigQuery API needs to be enabled in the cloud console: Access Not Configured. BigQuery API has not been used in project 111111111111 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/bigquery.googleapis.com/overview?project=111111111111 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. (line 5, file "Code")
Enable the BigQuery API in the google cloud console as instructed (tip: when you follow the URL click on "dashboard" in the left column, then "enable APIs" at the top) and verify that it's enabled
Go back to the apps script and re-run the function, you will get the same error that the BQ API needs to be enabled.
Since the error says that it may take a few minutes to propagate, go have some food, come back, try again, see the same error. I have waited overnight with no change. Normally it takes less than 10 seconds.
I have tried the above using my corporate G-suite account as well as my personal account and run into the same problem both ways.
Are others seeing the same? Where does one go for help?
This issue now appears resolved. I ended up having to sign up for silver support, pay $150, create a cloud support ticket, and eventually I got the reply "I've looked at this issue with our backend team. This is an incident that was reported today, and you're not the only one affected by it. It's a known issue. I will get back to you in a few hours with more updates." Oh great, I'm glad I got to pay to get that info :-(. So far the lack of support with GCP is confirming that I should continue spending my money elsewhere...

Google Cloud Platform: permission denied by accessing Apps Script

I found plenty of questions regarding this issues, but no one answer that could solve my problem.
I have a project in Apps Script, which I deployed as API executable. I enabled Google App Script Execution API. I made OAuth 2.0 Client ID on developer console. I made everything step-by-step as described here: https://developers.google.com/apps-script/guides/rest/api
Then I try to execute code from Google API Explorer: https://developers.google.com/apis-explorer/#p/script/v1/
I fill in request body properly, fill in script id (take it from "File > Project properties" from App Script editor), but what I get is "Permission denied":
Well, I tried to do the same from PyCharm (Python). I fully followed the following instruction: https://developers.google.com/apps-script/guides/rest/quickstart/python
Guess, what I got... The same error!
The Apps Script project is saved in my corporate Google Drive. The scopes of the project are: https://www.google.com/calendar/feeds https://www.googleapis.com/auth/script.external_request , which I filled in correctly in Python and shouldn't fill in in API Explorer.
Many users recommend to check if the project is correctly associated with a project on Google Cloud Platform. When I try to change project, I get error: "The project number should not match." Probably because it is associated correctly...
I almost lost my hope... Again, I saw a lot of answers to this issue across StackExchange forums, but no one could have solved this problem.
One more note: I didn't sign up for the Google Cloud Platform (I don't have a work account there, although it sees my projects and I could have generated OAuth2 2.0 Client ID and API key.
Well, I deleted my python project along with the .credentials file and recreated the project - then it worked. So probably it didn't work, because I missed one of described steps at the first execution of the code and after I fulfilled all the requirements I went on using old creds.
So for all who faces the same problem:
Do everything what is described in the Google documentation and my question.
If you missed something, delete the .credentials file and run the code again. Then it should work.

Cause of "The Oauth identity of this script has been deleted" error message

I've got a problem on some script I'm working on and I've got a error message like :
Which means :
The OAuth identity of this script has been deleted or disabled. This
may be due to a Terms of Service violation.
I've see this SO question that gave me a solution to resolve the problem.
My question is: how to avoid this kind of problem ?
Does my script got a problem ? Does my script was automatically strike for some reason ?
Looking at my research, all the people who've got the problem find a solution, but never find the cause of the problem.
Does anyone have some experience with this error message ?
Thank you.
Edit: The problem occur when user already review the permissions, not on permissions review. Thanks Zig to point that.
#Frank M. was right on his answer at OAuth Error - script deleted or disabled
This seems to fix the problem, but in fact it does not.
The problem is related to the cloud project bound to the script, The
reason turned out to be that the TOS for Cloud projects changed and
that the user has to acknowledge this. If that does not happen then
after some time the whole shebang is disabled and you get the error
message.
(This is why a copy seems to work: it works until some Google bot
notices that it is bound to a project without TOS acknowledgement and
then it disables it.)
The solution: - open the script - click Resources > Cloud Platform
project - click on the bound project.
This will open up the Cloud console and also show the popup for you to
acknowledge the new TOS. If you agree to this, you're set and your
script works again.
Note: it seems that you need to do this only once for the Cloud
environment. So if you have several scripts then you need to do this
for one script only. Or access the Cloud environment directly and
acknowledge the new TOS.
Note: even if you though your script is not bound to a Cloud project,
trust me... it is. If you do not bind it yourself, then it is bound to
a default project specific to that script.
Hope this helps.
Even if the script doesn't work immediatly after accepting the new TOS, he work about 30 minutes after, as he suppose to work.

Publishing a Google Docs Add-on: Project Key is not associated with the current project

I am attempting to publish a simple Google Docs add-on, following these instructions: Publishing an Add-on
However when completing the configuration for Google Apps Marketplace SDK, I enter my script project key (found from file --> project properties) and receive the following error: 'Project Key is not associated with the current project.'
Only instance where I can find someone with the same problem (here) occurred when they created a project on the Google Developers Console instead of going through resources --> Advanced Google Services. This is not the reason for my error, can anyone shred any light onto my problem?
Any help would be gratefully received,
Connor
Kept trying, did not change the way I tried publishing nor the project key I was entering and it worked after so many retries. Wish I could give a more detailed answer...
I was able to fix by combining two successful responses from this post:
use version number, and only the number, e.g. "1" -- Do not use "v1.0" or "Version 1 on Oct 1, 6:10 AM" or your deployment's Description
After completing step 1, delete your entry in field 'Docs Add-On Project Script ID', then re-enter it -- the page seems to not re-evaluate your changes unless you do this; I had tried saving multiple times before doing this with no success using the correct version number and script ID.
For me I need to go Publish->Deploy as API. Select the correct version and then the publish screen worked
I needed to include a correct version number (1,2,3,4; not "v0.1") in addition to the script ID. The error suggested my script ID was wrong, but the error went away when I picked a valid version number.
For me, the Google App Script file needed to be associated with the project.
In the GAS, go to Resources > Cloud Platform Project.
Under Change Project, enter the project number (which can be found on the home page of the Google Cloud Platform Project in the Project info module), and click Set Project.
Confirm the notices (though make sure that is really what you want to do).
Once it has been set, go back to the App Configuration, and re-enter the information (if you are already on that page, refresh).
That's what worked for me, but maybe other developers get that error for other reasons.
Source: https://developers.google.com/apps-script/guides/cloud-platform-projects#switching_to_a_different_standard_gcp_project
Hmm I had issues as well. It didn't work with version 1 in "Docs Add-on script version" but while I tried a bunch of stuff I ended up deploying again and then I incremented version to "2" and then it worked.
I got the same error today, I made it finally work. I will go through the fields I checked.
App Integration [I'm deploying using deployment ID, you can get the ID from AppScript manage deployment]
Choose which workspace you are releasing [In my case Sheets], type the version from AppScript.
Enter all other general Credentials and save.
The above steps worked for me.
Try to use the Google Workspace Add On and enter the App Script Deployment ID. That accepted for me and showed it as a Sheets Add-On
It's different in deploy or test in legacy editor and new editor.
And I'm using legacy editor before
(because some following steps from documents is not work in new editor),
So when I lookup Mange deployment in new editor,
It wasn't exisisted,
And the deployment ID it's not work when I fill out App configuration in Google Workspace Market.
For me I just change to following the Legacy editor's following steps
https://developers.google.com/workspace/marketplace/enable-configure-sdk#legacy-editor_2
and It works.
Looks like it is not possible to change scriptId after a round of review. So you can just update only version. I changed to last number of deployment version like '6' and it is saved.