Can't deploy to GAE - the application doesn't exist - google-app-engine

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.

Related

Why does google app engine seem to use old code?

I've setup Google App Engine to run my AdonisJS API for my website. I update the code using the CLI for google cloud services ("gcloud app deploy"). I get a success message from the terminal, and I have checked both the cloud build and version number, and both are the most recent deployment. However, when I try to use my website, I get an error due to the API using old code and trying to access table columns from my database that no longer exist. I have downloaded the most recent cloud build file and checked the codebase within it and the updated code is there. I have also tried deploying multiple times, and it still is using the old code. Does anyone know why this is happening and/or how to fix this?
If you need more information, let me know. Thanks
ANSWER:
Fixed this a while ago, but wanted to update here just in case others ran into this. I discovered that when deploying to GAE through the command line, my build command wasn't running prior to the deploy since my script had an error, so it was uploading updated code, but not an updated build. So just make sure to run the build command prior to uploading to GAE and everything should work.
In console.cloud.google.com, go to your GAE project and check which version of your project is running I.e. which one is receiving traffic
Clear your cache.

google app engine fails using app engine:update and app cfg.sh, different errors

My questions is in two folds: issue with app engine:update and with the app cfg.sh.
I looked on the web and could not find any workaround or potential answer that could help me fixing this issue.
My application is working with not much issue locally. Time now to give it a shot on production and upload it to google app engine. At first I tried doing this by using the 'app engine:update' from gradle (I'm using Android Studio). The execution failed with the following error message: "toolkit not found: apple.awt.ctoolkit. Why is this toolkit required and where can we find it?
While searching on the internet there were suggestions to use the appcfg.sh script to upload the application. It seemed to work at first until it asked for email and password. I used the exact same email/password I use to connect to goole-appengine and for some reasons it does not work.
Thanks.
After few hours investigating this issue I found out what the issues were. First thing, my account was compromised and received an email from Google. All I had is to confirm that was me trying to upload application to GAE. Secondly, my primary email address linked to my Google account belongs to another ISP. There is a security feature to disable and for security being a bit more loose. Creating a gmail account did the trick.

Maven GAE Plugin - Change account to deploy to

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.

An API for creating and managing Google Cloud Console projects?

I believe there is an undocumented Google API available to create and manage Google Cloud Console (and App Engine) projects on behalf of third party users.
Does anyone know how to use it?
I think older versions of the Google Eclipse Plugin obtained an OAuth2 token in the (undocumented) scope https://www.googleapis.com/auth/appengine.admin, and this allowed it to generate a Cloud Console project on your behalf. The latest version doesn't seem to do this. App Engine's own appcfg.py also uses this scope, but doesn't seem to do much more than deploy the code - I'm looking to change core settings for the project, such as Name, Redirect URLs, and Web Origins.
Any information would be appreciated.
I maintain a WordPress plugin providing secure Google Apps Login for end users, and currently have to give detailed instructions to admins for creating a new Cloud Console project manually, and entering settings such as Redirect URL. Ideally, I would create a simple on-line service to do all of this for them.
Thank you!
It is possible to programmatically create a new Developer Console project on behalf of a Google Account (yes, you read that right). You do so in a very roundabout way:
Request the https://www.googleapis.com/auth/drive.scripts scope from the user (standard OAuth 2.0 flow).
Use the Drive API's drive.insert method to create a new file with a mimetype of application/vnd.google-apps.script.
Somehow try to get the project ID, maybe by uploading some Apps Script code? This is the part that I was never able to figure out.
A little known fact is that every Google Apps Script project has a hidden Developer Console project associated with it. This project is not shown in the list of projects, but it does exist. It is created automatically when the user starts a new Apps Script project, and the drive.insert method is enough to cause this to happen.
How do you get to the hidden project? Well, the only way I know of is to open the Apps Script project from the Drive website, open the "Resources > Advanced Google Services" dialog, and click the link to the Developer Console. You'll find the project ID in the URL.
Aside from not being shown in your list of projects and not being able to use App Engine, this is a normal Developer Console project. You can add additional OAuth client credentials, service accounts, Compute Engine instances, etc. And of course once you have a project ID, all of the various management APIs will work: creating new virtual machines, making use of a service account's impersonation ability, etc.

Google App Engine: This application does not exist/Upload fails

I have been successfully using Netbeans to develop and deploy an app to the Google App Engine for ages through various application versions. That is all working normally and fine.
However (the problem), through the same account I created a new application (at the Google end) and at the application end the correct application id is in appengine-web.xml with a version of 1. All runs locally perfectly. But as soo as I deploy to GAE it fails:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL:
404 Not Found
This application does not exist
Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=
404 Not Found
This application does not exist (app_id=u
Why??????
I have spent hours looking through the web for a solution. Lots of people have a similar problem but what is the solution? How can one app upload fine and the second fails?
PLEASE can someone give me some suggestions on how to fix the problem and successfully deploy?
I use Netbeans and have tried 6.9, 7.1, and 7.2 (I even tried installing Eclipse to solve the problem but it was horrendous to get going so I'm back to Netbeans). JDK 1.6.
Help!
Of course it works this way. After finally seeking help (from you chaps), within minutes I solve the problem (blind luck).
In case it helps anyone else, the basic issue was Google's account authentication model...
I needed to generate an application-specific password in Google Accounts (https://accounts.google.com/IssuedAuthSubTokens#accesscodes - that is, the Authorized Access to your Google Account area) to be used with the new application.
Then I needed to clear the existing email/password in Netbeans. This is a bit messy as I did that by deleting the 'deployment.properties' file you eventually find in C:\Users\User.netbeans\7.1\config\Preferences\org\netbeans\modules\j2ee\appengine.
You'll note I went back to Netbeans 7.1 because Netbeans 7.2 seems to store it in a different place which I couldn't find.
Back to Netbeans and hit the 'Deploy to Google App Engine' menu choice. It starts then asks for authentication. I used my normal (account) emailid and then the NEW application specific password. Miracle of miracles, it worked and the app fired up live.
I went and got a coffee
Perhaps Google could provide a slightly more meaningful error code than 404 Not Found???
Hopefully that helps anyone else with a similar problem.
Today, I had kind of the same problem. After some trial and error I found the solution.
Basically, starting from Netbeans 7.2. up, username and password are stored in something called "keyring".
In Windows 8 I found it under my current users directory: AppData\Roaming\NetBeans\7.3.1\config\Preferences\org\netbeans\modules\keyring.
I had to delete the GAE password information from the configuration file there. Then I cleared some registry keys (that might not be mandatory) and restarted Netbeans IDE. Then got prompted for new credentials.
See the full HowTo under:
http://donkeytech.wordpress.com/2013/08/06/change-google-app-engine-deployment-userdata-in-netbeans-from-7-2/

Resources