Maven GAE Plugin - Change account to deploy to - google-app-engine

I have created an google app engine project and wanted to deploy it via
mvn appengine:update
the browser window openend and I was asked for oauth permission by google, I then copied the key / code and pasted it in the console, just when I realised that I was logged in with the wrong google account.
so my question is: how do I reset the authentication to deploy it to a different account?

Ok, I found the solution by just carefully reading the Documentation on https://developers.google.com/appengine/docs/java/tools/maven .
On a Mac at least, you have to rename or delete the .appcfg_oauth2_tokens_java file in you home directory, so that the next time you try to deploy it, it will ask again for authentication.

Related

Setting target url with gcloud

I have been using the Google App Engine Launcher's "Deploy" button. I realize that the Launcher is going away at the end of July 2020, so I'm trying to learn to use gcloud. My web site has a custom url, www.xxx.org, but "gcloud app deploy" uploads to xxx.appspot.com instead of to www.xxx.org, presumably because "target url" is set to xxx.appspot.com. Can someone please tell me what gcloud command I need to use to change "target url" to www.xxx.org, or some other scheme that would work? I've wandered through lots of gcloud and GAE documentation and web searches without being able to figure out what I need to do.
There is a very good and complete guide about mapping a custom domain to your application in the official documentation. As #DanCornilescu said,it needs to be configured, but it is not necessary to be done before deployment.
Basically, you need to follow the steps from the guide:
1) Verify that you are the owner of your domain through Webmaster
Central
2)Ensure that your domain has been verified, otherwise you will not be able to proceed with the following steps. Note that only verified domains will be displayed.
3)If you need to delegate the ownership of your domain to other users or service accounts, you can add permission through the Webmaster Central page
4)After you verify ownership of your domain, you can map that domain to your App Engine app
5)Add the resource records that you receive to the DNS configuration of your domain registrar
6)Test for success by browsing to your app via its new domain URL, for example www.example.com
In case you need to do more complex mappings for different urls and subdomains you can always write down the routing rules in the dispatch.yaml file and they will be mapped successfully.
Also, to add a bit more of information about the dipatch.yaml file, it will handle the routing in the App as opposed with the app.yaml which will take care of the App's settings. Both .yamls can exist in the same application and can be deployed at the same time by using the following gcloud command:
gcloud app deploy app.yaml dispatch.yaml
The deployment is always done to .appspot.com, the custom domain is automatically updated if it is already configured. If it is not then it needs to be configured (it can be done after the deployment as well).

App Engine console vs Developers console

When I try to deploy my Google App Engine application to the cloud, I get
Error 404: --- begin server output ---
This application does not exist (app_id=u'blindmaaaps').
--- end server output ---
Under https://appengine.google.com, it says
Welcome to Google App Engine
...
Create application
But under https://console.developers.google.com, it shows my project as existing.
I have already tried passing the options --no_cookies and --email=my#email.com to the appcfg.py script, with no success. I have only one Google account.
What should I do to deploy?
It can happen if you have more than one Google account. Make sure that you are logged in under the correct account when you deploy.
Eclipse shows the account in the right bottom corner. Other tools may have an option that forces them to ask for your account credentials when you deploy.

Google App Engine: "The backend is locked down"

I am trying to test out the Google App Engine. I have created an appspot domain, downloaded the sample project and put in all credentials required. I have also enabled Google Cloud Messaging for Android.
When I hit the send button (in the samples GuestBookActivity), I get the message:
"The backend is locked down. The administrator can change the authentication/authorization settings on [my appspot domain]".
Does anyone know about this issue and how to resolve it?
As #Peter Knego said, see point 8 here: https://developers.google.com/cloud/samples/mbs/deploy_backend
I had forgot to open my server for development use.

Can't deploy to GAE - the application doesn't exist

Using Eclipse, I am experiencing an error when trying to deploy a rather basic web app with JAX-RS and JAXB. It runs okay locally, but when trying it on the remote servers I get the message shown below...
'Deploying to Google' has encountered a problem / This application does not exist
Below shows my appengine-web.xml
The XML file illustrates that I am using the same name in the xml as what's specified in the project properties...
The output window show...
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: '/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appcfg2754901216637807129.tmp'
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
Debugging information may be found in /private/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appengine-deploy447984481661870877.log
The referenced debug logs show...
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:293)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:644)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:449)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:124)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:371)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Any answers will be appreciated. At one point my browser was not logged in to the target google account, so I swapped to the correct one a little later, Google does render the application name as expected.
Okay, this was simple in the end! Eclipse performs an auto-login to the Google account, unfortunately I created the Eclipse project whilst being logged in to one Google account and then tried to specify the application name afterwards.
You'll see in the bottom-right (or bottom-left in some versions) a Google icon with the name of the user that you are logged in as. If that's not the account where your application is defined, then simply logout of that account, then login as the correct Google account.
Now there's no error :-)
I know this question is super old but I had this issue all day and finally I found a solution. Maybe it will help someone out in the future.
After you create a project in Google Cloud Platform, you must go to google cloud shell in your project and run the command
gcloud beta app create
After you run this command, you will get prompted to choose a region. Then go back to eclipse and try deploying it. It worked for me.
There are not just 1 way can cause this problem. For me, I have this problem when I create the project using Maven. But I don't have the same issue if I directly create the project from the Google plugin.
There might be another issue, when you register with Google App Engine, you receive email indicating your activation. If you have not received the email yet, this problem could occur too.
Another issue could be to use the gmail account for the Google App Engine to avoid any such errors.

Want to activate my account to deploy Vosao CMS on Google App Engine

I want to deploy Vosao from appcfg.sh. I never knew I have to
activate my account before executing the script for deployment. Prior to that for other GAE apps I used to deploy my app from Eclipse plugin.
http://appengine.google.com/promo/java_runtime
On this page I have following message.
Thanks for signing up. Once your account is activated, you will
receive an email with more information.
When my account will be activated so that I can deploy my app?
Thanks
You've somehow stumbled onto the page for when - years ago - the Java runtime was still in Trusted Tester. That isn't the case anymore, and you don't need to wait for your account to be activated - you can use it immediately.

Resources