API部署和服务...服务没有出现 - GAE
问题描述:
一切似乎都与API后端的端点一致,但我的网络客户端在_ah/api/explorer
url中不显示任何服务。该API显示在本地服务器中,但未部署。在日志中它清楚地示出了用作API部署和服务...服务没有出现 - GAE
的app.yaml
API配置更新
application: mk-dev version: 1 runtime: python27 api_version: 1 threadsafe: yes - url: /_ah/spi/.* script: main.api - url: /.* script: main.app secure: always
部署如下;
03:13 PM Compilation completed. 03:13 PM Starting deployment. 03:13 PM Checking if deployment succeeded. 03:13 PM Deployment successful. 03:14 PM Checking if updated app version is serving. 03:14 PM Checking if Endpoints configuration has been updated. 03:14 PM Will check again in 1 seconds. 03:14 PM Checking if Endpoints configuration has been updated. 03:14 PM Will check again in 2 seconds. 03:14 PM Checking if Endpoints configuration has been updated. 03:14 PM Will check again in 4 seconds. 03:14 PM Checking if Endpoints configuration has been updated. 03:14 PM Will check again in 8 seconds. 03:14 PM Checking if Endpoints configuration has been updated. 03:14 PM Completed update of app: mk-dev, version: v1 03:14 PM Uploading index definitions.
UPDATE
就在开发工具控制台检查;
Failed to load resource: https://mk-dev.appspot.com/_ah/api/discovery/v1/apis resourse the server responded with a status of 404() cb=gapi.loaded_0:46 Uncaught Error: java.lang.IllegalArgumentException: Error parsing JSON: SyntaxError: Unexpected token < in JSON at position 1 [<html> <head> <title>404 Not Found</title> </head> <body> <h1>404 Not Found</h1> The resource could not be found.<br /><br /> </body> </html>]
答
解决方案确保我在云控制台设置中将流量从版本“1”迁移到“v1”。现在工作正常。
您需要启用浏览器加载不安全的脚本。点击浏览器地址栏中的安全图标。 –
@AvinashRaj请检查问题中的更新。刚刚意识到资源实际上没有加载 –