12

I'm trying to deploy a basic HelloWorld app on Google Engine following their tutorial for Python. I created a helloworld.py file and an app.yaml file and copied the code from their online tutorial. I signed up for Google App Engine and have tried everything but keep getting the following error:

2015-08-19 19:22:08,006 ERROR appcfg.py:2438 An error occurred processing file '': 
HTTP Error 403: Forbidden Unexpected HTTP status 403. Aborting. 
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'helloworld').
--- end server output ---
If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 1 ***

Here is the code from helloworld.py:

import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.write('Hello, Udacity!')

app = webapp2.WSGIApplication([
   ('/', MainPage),
   ], debug=True)

And here is my code from the app.yaml file:

application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: helloworld.app

Is there a problem with permissions i.e. Google App's or my laptop's settings? I have tried everything that's out there on stackoverflow so any new suggestions will be much appreciated!!

blob12
  • 141
  • 2
  • 12

5 Answers5

31

In my case, I got refused because the appcfg save my ouauth2 token in the file ~/.appcfg_oauth2_tokens, which happen to be another account of appengine . Simply remove the file and try again. It should work. This is in Mac, I am not sure about windows though.

ninjahoahong
  • 2,624
  • 22
  • 20
  • 1
    This worked for me: The Windows location is `:\Users\\.appcfg_oauth2_tokens` – Roel Apr 11 '16 at 11:58
  • This was the same case for me. I used another appengine account before and even after reinitizling with new one it still used an old stored version. I found this one useful: https://itcodehub.blogspot.com/2019/01/app-deployment-to-google-appengine-linux.html – xproph Jan 13 '19 at 14:46
5

Ok there is a MUCH easier way to do this now.

If you are getting this message "You do not have permission to modify this app" but your id is correct within app.YAML do the following:

Bring up the Google App Engine Launcher on your desktop Click on the control tab on the top left --> "Clear Deployment Credentials"

Thats it!!!

DisplayName
  • 196
  • 3
  • 12
  • idk what the "Google App Engine Launcher" is – Randy L May 11 '16 at 16:55
  • 1
    Its the GUI used to upload changes to the google cloud and edit your local files etc. It runs a local version as well kind of like the application XAMPP, in case you are aware of it. It comes with downloading google app engine looks like this link [this link](http://cdn.tutorialzine.com/wp-content/uploads/2011/01/app-engine-launcher.jpg) – DisplayName May 12 '16 at 07:34
2

The application name in app.yaml is sort of like a domain name. Once someone has reserved it, no one else can use it. You need to go here, and then select "Create a project..." from the dropdown at the top of the screen. In the popup, it will suggest a project id, or you can select your own. Many project id's are taken so you will need to specify something unusual to get something that is not taken.

You then put this project id in your app.yaml in the application line. You should then be able to upload your project.

new name
  • 15,861
  • 19
  • 68
  • 114
  • I tried that and I get the following error: Error 404: --- begin server output --- This application does not exist (app_id=u'helloworld-1043'). --- end server output --- If deploy fails you might need to 'rollback' manually. The "Make Symlinks..." menu option can help with command-line work. *** appcfg.py has finished with exit code 1 *** I put helloworld-1043 instead of helloworld – blob12 Aug 20 '15 at 01:34
1

Make sure you have created a project in GAE which project ID is exactly same to your configuration in app.yaml

workflow:

  1. Create a project in GAE and set a name
  2. At the same window you can edit the project ID
  3. copy the project ID and paste it when you create a new application in GAE launcher (or edit your app.yaml to set the value of application)
  4. deploy it and type {project-id}.appspot.com in your browser\ Good luck!
have-a-try
  • 11
  • 1
1

App ID ( 'application:' ) in app.yaml mentioned is 'helloworld' which seems to be default for hello world app. Create a new app using: https://console.cloud.google.com/home/dashboard and use the new app ID in app.yaml.

Please have a look at: Application for gae does not deploy that has answer to similar question for Linux platform, where we need to delete : ~/.appcfg_oauth2_tokens* to resolve the permission error.

Community
  • 1
  • 1
Vaibhav S
  • 21
  • 5