为dart设置应用引擎,gcloud预览错误

时间:2015-07-03 21:49:11

标签: google-app-engine dart gcloud

我在为dart设置应用引擎开发时遇到问题

我正在使用
OS X 10.10
Dart SDK 1.11.1
Google Cloud SDK 0.9.67

继承错误:

WC-Johndoe:dartsample Johndoe$ gcloud preview app run app.yaml
Module [default] found in file [/Users/Johndoe/Repos/dartsample/app.yaml]
INFO: Looking for the Dockerfile in /Users/Johndoe/Repos/dartsample
INFO: Using Dockerfile found in /Users/Johndoe/Repos/dartsample
INFO     2015-07-03 21:31:15,783 devappserver2.py:762] Skipping SDK update check.
INFO     2015-07-03 21:31:16,009 api_server.py:204] Starting API server at: http://localhost:53927
INFO     2015-07-03 21:31:16,010 api_server.py:629] Applying all pending transactions and saving the datastore
INFO     2015-07-03 21:31:16,010 api_server.py:632] Saving search indexes
Traceback (most recent call last):
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in <module>
    _run_file(__file__, globals())
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1027, in <module>
    main()
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1020, in main
    dev_server.start(options)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 817, in start
    self._dispatcher.start(options.api_host, apis.port, request_data)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 193, in start
    _module, port = self._create_module(module_configuration, port)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 278, in _create_module
    threadsafe_override=threadsafe_override)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1539, in __init__
    super(ManualScalingModule, self).__init__(**kwargs)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 558, in __init__
    self._module_configuration)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 259, in _create_instance_factory
    module_configuration=module_configuration)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_factory.py", line 71, in __init__
    8 if runtime_config_getter().threadsafe else 1, 10)
  File "/Users/Johndoe/Library/Cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 394, in _get_runtime_config
    raise ValueError('The --custom_entrypoint flag must be set for '
ValueError: The --custom_entrypoint flag must be set for custom runtimes
ERROR: (gcloud.preview.app.run) DevAppSever failed with error code [1]

...........................................

2 个答案:

答案 0 :(得分:3)

快速查看this会显示最新版Google云端SDK的问题。在进一步更新之前,使用其他一些SDK(如dart)会出现问题。

如链接中所述,要解决此问题,请使用终端中的命令回拨Google云端SDK的版本:

gcloud config unset --scope=installation component_manager/fixed_sdk_version
gcloud components update

通过以下方式恢复到当前版本的云sdk:

UPDATE wp
SET wp.usd = m.price * wp.midprice
FROM wpcurrate AS wp
    INNER JOIN mo AS m ON wp.symbol = m.symbol
WHERE m.curdatetime BETWEEN '2015-07-01 12:00:00 AM' AND '2015-07-31 11:59:59 PM'

答案 1 :(得分:0)

根据https://groups.google.com/a/dartlang.org/forum/#!topic/cloud/J6LsrVVdJ6o

将GAE_LOCAL_VM_RUNTIME环境变量设置为0应解决此问题

$ export GAE_LOCAL_VM_RUNTIME=0
$ gcloud preview app run app.yaml