Apps script web app deployment wont work after moving to a proper GCP - google-apps-script

I am developing a GAS app.
Im using clasp to develop locally. I managed to get the connection working in order to run functions locally.
This required to move the GAS project from the default one to a new dedicated project.
I had to set up a proper OAuth ID in order to get the credentials for clasp, as they show in their Documentation.
The issue now is that the previosuly working webb app deployment dont work anymore. I get the next error:
404:
The requested URL /scripts/<MyProjectId>:run was not found on this server.
error screenshot
I'm thinking the web app deployment needs a proper OAuth or some other configuration in the new GCProject, but i cant figure out what it is.
Thanks in advance for any help.

Related

Fail to Deploy Forge by using Azure

I want to ask about the Deployment of Forge API by Azure.
I had done it through the resource from Learn Forge, and it seems to work smoothly on the local site, but when I try to publish it, Although it shows permission
after I sign in, it shows 400 error refused, how can I do this for this error?
This is typically caused by an incorrect callback URL for the 3-legged authentication workflow.
When you develop your application locally, you typically set the callback URL (both in your application's code and in https://forge.autodesk.com/myapps) to something like http://localhost:3000/api/forge/callback/oauth).
However, when you deploy your application to Azure, AWS, Heroku, or any other cloud hosting provider, the callback URL must be updated accordingly. For example, if you deploy your application as an Azure Web App, the callback URL could look something like https://my-cool-app.azurewebsites.net/api/forge/callback/oauth. And again, you'll have to change the URL both in https://forge.autodesk.com/myapps, and in your Azure Web App settings.

Versioned deployment seems to be redirecting to HEAD deployment after OAuth login

I have a google workspace addon which is extending gmail and is using app script oauth to connect our own system, https://github.com/googleworkspace/apps-script-oauth2.
Our system has a development environment and a live environment, each uses a different identity client id secret which need to be used when connecting to each. I have stored these as different project properites with the development properties being prefixed with 'dev-' and i have a function that looks like this:
getScriptPropery function. This function has a variable that should let me change the script properties I access.
I have then created a versioned deployment that uses the live project properties and have kept my HEAD deployment using the develpoment properties. My problem is that once someone tries to login on the versioned deployment they seem to be redirected back to the HEAD version of the code which is using development project properties, this then breaks the login attempt and gives the following error: AppScript login error. I have tested this by adding logging that is only in the HEAD version of the getScriptProperty function and you can see the logs swap to using the development properties after redirecting from the login attempt, Logging example.
Is there a better way to manage deployments/project properties to stop this from happening or have a just missed something with how they are meant to work?

duck (CyberDuck CLI) with google drive

I'm trying to get the Cyberduck CLI (duck.sh) to work interfacing with a google drive (not "Google Cloud Storage") and I'm having problems getting the oAuth authorization to work. I found this thread but it's out of date - as the newer versions of Cyberduck do absolutely work with Google Drive. Using the regular cyberduck GUI I can browse and operate on my G-drive instance, but I can't quite quack the code (sorry!) for how to make this work using the CLI.
[lwobker:~]$ duck -l googledrive://<user>#gmail.com/
Authenticating as <user>…
OAuth2 Authentication. Paste the authentication code from your web browser.
Authentication Code: <pasted pass here>
Save password (y/n): n
Disconnecting www.googleapis.com…
Login failed. Malformed auth code. Please contact your web hosting service provider for assistance.
I've tried a number of different URLs, including:
#gmail.com
me#gmail.com#www.googleapis.com
and a couple of others.
I also can't seem to figure out where the GUI version of cyberduck stores it's authorized credentials... if I could re-use those that would be fine, doing a one-time setup at the beginning doesn't break my use case.
I'm somewhat familiar with the Google Developers API, and I've created one for use with this project, but I can't seem to figure out how the Google "Client ID" and other credentials map to the Cyberduck tool.
Make sure you paste the auth code obtained from the Google login page opened exactly as is without any line breaks. More information is available in the wiki.

Google Script Deploying web App - URL error

Using Google script i was able to deploy a web App and everything was working great.
Deploying
recently the URL of the script doesn't work.
the loader of the page says: "Resolving Host"
then:
...script.googleusercontent.com’s server IP address could not be found.
How to deal with this error!
Any Help please..
After few days the url back to work again! i didn't change anything.. so i think the problem was from ISP.

Application to write files to our customers' google drive

We have read other posts where it is said that for us to store a file in a google drive, the client must install a web app form the Chrome Store. But the fact is that we do not need a Web App and do not want to have our customers install a "non-app" just to get access to their drives. We have found suggestions to use the Document List API but we do not find it in the API Console as it has been deprecated.
The error we get is:
"googleapi: Error 403: The authenticated user has not installed the app with client id XXXXX"
Please advise.
Thanks
Check this question for the reason behind the installation requirement: Reason for installation through Chrome Web Store.
And stay tuned for announcements very soon!