Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine 为dart、gcloud预览错误设置应用程序引擎_Google App Engine_Dart_Gcloud - Fatal编程技术网

Google app engine 为dart、gcloud预览错误设置应用程序引擎

Google app engine 为dart、gcloud预览错误设置应用程序引擎,google-app-engine,dart,gcloud,Google App Engine,Dart,Gcloud,我在为dart设置应用程序引擎开发时遇到问题 我正在使用 OS X 10.10 Dart SDK 1.11.1 谷歌云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 /

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

我正在使用
OS X 10.10
Dart SDK 1.11.1
谷歌云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]
WC Johndoe:dart示例Johndoe$gcloud预览应用程序run app.yaml
模块[default]位于文件[/Users/Johndoe/Repos/dartsample/app.yaml]中
信息:正在/Users/Johndoe/Repos/dartsample中查找Dockerfile
信息:使用/Users/Johndoe/Repos/dartsample中的Dockerfile
信息2015-07-03 21:31:15783 devappserver2.py:762]正在跳过SDK更新检查。
信息2015-07-03 21:31:16009 api_server.py:204]正在以下位置启动api服务器:http://localhost:53927
信息2015-07-03 21:31:16010 api_server.py:629]应用所有挂起的事务并保存数据存储
信息2015-07-03 21:31:16010 api_server.py:632]保存搜索索引
回溯(最近一次呼叫最后一次):
文件“/Users/Johndoe/Library/Cloud/googlecloudsdk/platform/google_appengine/dev_appserver.py”,第83行,在
_运行\u文件(\uuuu文件,globals())
文件“/Users/Johndoe/Library/Cloud/googlecloudsdk/platform/google\u appengine/dev\u appserver.py”,第79行,在运行文件中
execfile(_PATHS.script_文件(script_名称),全局文件)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”,第1027行,在
main()
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”,第1020行,主文件
dev_server.start(选项)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”,第817行,开头
self.\u dispatcher.start(options.api\u主机、api.port、请求\u数据)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py”,第193行,开始
_模块,端口=自身。创建模块(模块配置,端口)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google\u appengine/google/appengine/tools/devappserver2/dispatcher.py”,第278行,在创建模块中
threadsafe\u覆盖=threadsafe\u覆盖)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google\u appengine/google/appengine/tools/devappserver2/module.py”,第1539行,在__
超级(手动缩放模块,自).\uuuuu初始化(**kwargs)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google\u appengine/google/appengine/tools/devappserver2/module.py”,第558行,在__
自身(模块配置)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google\u appengine/google/appengine/tools/devappserver2/module.py”,第259行,在创建实例工厂中
模块配置=模块配置)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google\u appengine/google/appengine/tools/devappserver2/vm\u runtime\u factory.py”,第71行,在__
8如果运行时配置getter().threadsafe else 1,10)
文件“/Users/Johndoe/Library/Cloud/google Cloud sdk/platform/google\u appengine/google/appengine/tools/devappserver2/module.py”,第394行,在“获取运行时”配置中
raise VALUERROR('必须为设置--custom\u入口点标志'
ValueError:必须为自定义运行时设置--custom_entrypoint标志
错误:(gcloud.preview.app.run)DevAppSever失败,错误代码为[1]
快速浏览一下Google云SDK的最新版本就会发现一个问题。在进一步更新之前,使用dart等其他SDK会出现问题

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

gcloud config set component_manager/fixed_sdk_version 0.9.64
gcloud components update
通过以下方式还原到云sdk的当前版本:

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

将GAE_LOCAL_VM_运行时环境变量设置为0应该可以解决此问题

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

由于dart是一个自定义运行时,系统告诉您使用“-custom\u entrypoint”,您是否尝试运行“gcloud preview app run app.yaml--custom\u entrypoint”?“未识别的参数:--custom\u entrypoint”我的也返回“未识别的参数:--custom\u entrypoint”,它可以运行,而且看起来0.9.65也可以运行,非常感谢!