I'm new to Google App Engine and having troubling understanding their error messages.
I'm using Google App Engine Launcher (on Win XP).
When I press Deploy (and then sign-in) I get this error message.
\pythonw.exe', '-u', 'C:\Program
Files\Google\google_appengine\appcfg.py', '--no_cookies',
u'--email=by#onetel.com', '--passin', 'update', 'C:\Documents and
Settings\Barry\My Documents\test\high-winter-668']" Usage:
appcfg.py [options] update | [file, ...]
appcfg.py: error: Error parsing C:\Documents and Settings\Barry\My
Documents\test\high-winter-668\app.yaml: Unable to assign value
'http://high-winter-668.appspot.com/' to attribute 'application':
Value 'http://high-winter-668.appspot.com/' for application does not
match expression
'^(?:(?:[a-z\d-]{1,100}\~)?(?:(?!-)[a-z\d-.]{1,100}:)?(?!-)[a-z\d-]{0,99}[a-z\d])$'
in "C:\Documents and Settings\Barry\My
Documents\test\high-winter-668\app.yaml", line 1, column 14.
2014-08-15 17:09:39 (Process exited with code 2)
Can someone tell me what this means please?
My app.yaml file contains:
application: http://high-winter-668.appspot.com/
version: 1
runtime: php
api_version: 1
handlers:
- url: /.*
script: high-winter-668.php
At https://appengine.google.com/
my "Application" and "Title" both say "high-winter-668"
And in my local application folder C:\Documents and Settings....\high-winter-668\
I have two files:
app.yaml and high-winter-668.php
Thanks
I use just the app name alone:
application: high-winter-668
version: 1
runtime: php
api_version: 1
handlers:
- url: /.*
script: high-winter-668.php
This:
^(?:(?:[a-z\d-]{1,100}\~)?(?:(?!-)[a-z\d-.]{1,100}:)?(?!-)[a-z\d-]{0,99}[a-z\d])$
is a Reg-Ex search pattern
To add more about app name:
Only lowercase, digits and '-' are allowed and the app name cannot be
more than 100 characters long.
Related
Getting below error after runnnig command "dev_appserver.py C:\Newfolder"
google.appengine.tools.devappserver2.errors.InvalidAppConfigError: In env: flex, only the following runtimes are allowed: ('python-compat', 'java', 'java7', 'go', 'custom')
I have installed php version 8.0.6 , and i'm trying to run a sample php application on localhost using google app engine's sdk.
my app.yaml looks like this:
runtime: php8
env: flex
runtime_config:
document_root: Newfolder
I tried putting runtime as custom , php72, php55 and even php80(since my php version is 8.0.6)
but still am getting the same error
referring this link https://cloud.google.com/appengine/docs/standard/php/tools/using-local-server
If you want to use php in flex environment your app.yaml needs to look something similar to this:
runtime: php
env: flex
runtime_config:
document_root: web
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
The php version that app engine flex will use is the default PHP 7.3, but if you want to use another version you can specify it in the composer.json as this link says
I am trying to create a simple web application that says Hello Udacity and upload it to Google App Engine, but I keep on getting a bunch of errors.
Error message from Google App Engine:
11:57 PM Host: appengine.google.com
Error parsing yaml file:
Unable to assign value 'udacityassignment2' to attribute 'url':
Value 'udacityassignment2' for url does not match expression '^(?:(?!\^)/.*|\..*|(\(.).*(?!\$).)$'
in "C:\Users\Wealthy\Desktop\ambhelloworld\udacityassignment2\app.yaml", line 12, column 8
2013-05-27 23:57:00 (Process exited with code 1)
You can close this window now.
app.yaml:
application: udacityassignment2
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: udacityassignment2
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
main.py:
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello Udacity!')
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
Google App Engine console:
Error: Not Found
The requested URL / was not found on this server.
Any assistance on how to correct this issue would be appreciated.
The error is indicating that the url entry in your app.yaml is not valid. Try this
url: /udacityassignment2
And as Tim pointed, the mapping should be
app = webapp2.WSGIApplication([
('/udacityassignment2', MainHandler)
], debug=True)
You can make the URL entry as below to give you more flexibility when creating your url routing table
- url: .*
script: main.app
I am trying to deploy my laravel app into the GCS (Google Cloud Storage).
While doing a deployment:
gcloud preview app deploy ./app.yaml --project="cuisinedegeek-151614"
I got these errors:
WARNING: The gcloud preview app command group is deprecated; please use the gcloud app commands instead.
ERROR: The [application] field is specified in file [/home/epistolshow/CuisineDeGeek/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by gcloud config set project MY_PROJECT or by setting the --project flag on individual command executions.
ERROR: (gcloud.preview.app.deploy) Errors occurred while parsing the App Engine app configuration.
epistolshow#cuisinedegeek-151614:~/CuisineDeGeek$ gcloud app deploy ./app.yaml --project="cuisinedegeek-151614"
ERROR: The [application] field is specified in file [/home/epistolshow/CuisineDeGeek/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by gcloud config set project MY_PROJECT or by setting the --project flag on individual command executions.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App Engine app configuration.
epistolshow#cuisinedegeek-151614:~/CuisineDeGeek$ gcloud app deploy ./app.yaml --project="cuisinedegeek-151614"
ERROR: The [application] field is specified in file [/home/epistolshow/CuisineDeGeek/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by gcloud config set project MY_PROJECT or by setting the --project flag on individual command executions.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App Engine app configuration.
epistolshow#cuisinedegeek-151614:~/CuisineDeGeek$
Which doesn't make sense because app.yaml:
runtime: php55
handlers:
- url: /favicon\.ico
static_files: public/favicon.ico
upload: public/favicon\.ico
- url: /assets/(.*\.(htm$|html$|css$|js$|png$))
static_files: public/assets/\1
upload: public/assets/(.*\.(htm$|html$|css$|js$|png$))
application_readable: true
- url: /.*
script: public/index.php
EDIT : Thank's to Jarmod, I've got this now :
x#x:~/CuisineDeGeek$ gcloud app deploy ./app.yaml
Please help me.
I'm not able to use curl_lite as I need certificate. Curl works fine in production but not through the Google App Engine Dev server.
Here's my php.ini:
extension = "curl.so"
google_app_engine.enable_functions = "phpversion, phpinfo, php_sapi_name, php_uname, getmypid"
google_app_engine.allow_include_gs_buckets = "df_sabre_queue"
allow_url_include = 1
The error message thrown is:
Fatal error: Call to undefined function App\SomeClass\curl_init() in C:\Users\Egroeg\Code\SampleApp\app\Sabre\Request.php on line 52
App.yaml is:
application: sample-app
version: 1
runtime: php55
api_version: 1
handlers:
- url: /favicon\.ico
static_files: public/favicon.ico
upload: public/favicon\.ico
- url: /.*
script: public/index.php
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\.(?!env).*$
- ^(.*/)?node_modules.*$
- ^(.*/)?_ide_helper\.php$
- ^(.*/)?\.DS_Store$
extension_loaded('curl') returns false.
If your development environment is windows the extensions have slightly different names (to be consistent with the documentation you would find on php.net)
For windows, change the php.ini file to
extension = "php_curl.dll"
Not that in production we accept either php_curl.dll or curl.so to load the curl extension so you do not need to change the php.ini file before pushing your app.
I just received a great news that full cURL is supported now.
I followed the instruction to replace "runtime:php" with "runtime:php55" in app.yaml and deployed my php code to Google App Engine using Google App Engine Launcher.
The system responsed error as attached:
..deploy response...............
2015-02-27 23:01:52 Running command: "['C:\\python27_x64\\pythonw.exe', '-u', 'C:\\Program Files\\Google\\Cloud SDK\\google-cloud-sdk\\platform\\google_appengine\\appcfg.py', '--no_cookies', u'--email=jihshiun#gmail.com', '--passin', 'update', 'D:\\Documents\\GAE CloudSite\\Hi']"
Usage: appcfg.py [options] update <directory> | [file, ...]
appcfg.py: error: Error parsing D:\Documents\GAE CloudSite\Hi\app.yaml: Unable to assign value 'php55' to attribute 'runtime':
Value 'php55' for runtime does not match expression '^(?:contrib-dart|dart|go|php|python|python27|java|java7|vm|custom)$'
in "D:\Documents\GAE CloudSite\Hi\app.yaml", line 3, column 10.
2015-02-27 23:02:04 (Process exited with code 2)
.......................
I also tried to add a php.ini with extension = "curl.so" in the file, and the deployment failed too with the same response.
Have I missed something?
Please advise.
I've had the same problem.
You have to update the sdk, download the file corresponding to your plataform and instal it.