1

The problem

my appication won't update on the dev server or the live server unless I do step 3 (below), every single time. Otherwise, I will get permission problems as shown below

e2016-01-08 12:47:58,781 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's~project-name'). --- end server output ---

I'd ideally like to test just using dev_appserver.py

Things I've already tried

  1. appcfg.py update --no_cookies . after the webpage opened for me to sign in, I got

    No data received

    ERR_EMPTY_RESPONSE

and my terminal was stuck on " --noauth_local_webserver "

  1. appcfg.py rollback . That leaves me with the same error:

    Error 403: --- begin server output --- You do not have permission to modify this app (app_id=u's~'). --- end server output ---

  2. appcfg.py -A <project name> update . This just returns error from step above

  3. appcfg.py --no_cookies --oauth2 --email=myemail --noauth_local_webserver update . this uploads the project to my server, but, I'm tired of having to 'allow' then paste the code back into the terminal every single time

  4. shutting down app engine launcher, removing project from launcher then adding back

  5. restarting computer, turing off computer

  6. launching from the terminal, launching from app engine launcher

  7. Note: I'm already signed into google chrome

What should I try next?

  • have you specified the "project name" when you attempt. `appcfg.py -A update` – tockards Jan 08 '16 at 17:56
  • FWIW, I never used any of the `--` options of `appcfg.py` and I don't even recall when was the last time I have to enter credentials - many months. Nowadays I'm just copy/pasting the update cmd from a cheatsheet file, illustrated in this answer: http://stackoverflow.com/a/34111170/4495081 – Dan Cornilescu Jan 08 '16 at 18:37
  • @tockards yes, always. –  Jan 08 '16 at 19:06
  • @Dan those perhaps you know this already, but those commands won't / don't solve the issue , as they are the same thing, except updating a queue, which I don't have, some yaml files that I don't have, an index file that I don't have, a cron file that I don't have, and a dispatch file that I don't have –  Jan 08 '16 at 19:06
  • The 1st one is the one updating the code for my app's modules (those `.yaml` files are my modules' config files, which can be specified instead of their directories - I *think* I had some trouble at the time using directories). For a single-module app the equivalents would be `appcfg.py update app.yaml` or `appcfg.py update .` – Dan Cornilescu Jan 08 '16 at 19:56
  • @Dan, right. And as you know, for me at least, those commands throw errors. –  Jan 08 '16 at 20:00
  • What OS are you using? Also - are you uploding via cmdline or through some IDE/tool? – Dan Cornilescu Jan 08 '16 at 23:05
  • was using `dev_appserver.py --port=8080 --admin_port=8000 --clear_datastore=yes app.yaml` in the terminal on a mac –  Jan 08 '16 at 23:43

1 Answers1

1

Every time you use the '--no_cookies' option, you are telling appcfg to never save your credentials, so it's always going to prompt you every time you upload your app.

Running appcfg.py update app.yaml or appcfg.py update <dir_name> just once should be sufficient, since the '--oauth2' option is now the default and currently the only support authentication method.

On a side note, appcfg stores certain files under your user directory (C:\Users\<username> on Windows, or /home/<username> on Linux / Mac) named '.appcfg_*' for its cookies and saved auth tokens. You may need to show hidden files / extensions to see them. Sometimes deleting these files and re-running appcfg can help with auth not working.

Adam
  • 5,697
  • 1
  • 20
  • 52