GoogleCloudPlatform / go-endpoints

Cloud Endpoints for Go
https://go-endpoints.appspot.com
Apache License 2.0
255 stars 56 forks source link

GAE Cloud Endpoints API Explorer stopped working #130

Closed chilabot closed 8 years ago

chilabot commented 8 years ago

GAE Cloud Endpoints API Explorer stopped working

Out of the blue, the API explorer (localhost:8080/_ah/api/explorer) stopped working. This is the message it gives:

WARNING  2015-12-15 17:54:24,744 dispatcher.py:762] Skipping dispatch.yaml rules because /_ah/spi/BackendService.getApiConfigs is not a dispatchable path.
2015/12/15 17:54:24 DEBUG: SPI request body: {}
INFO     2015-12-15 17:54:24,746 module.py:787] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 2619
ERROR    2015-12-15 17:54:25,706 discovery_api_proxy.py:59] Discovery API proxy failed on /_ah/api/discovery/v1/apis/generate/directory with 400.
Request: {"configs": ["{\"name\": \"test\", \"abstract\": false, \"methods\": {\"test.load_test_data\": {\"path\": \"testData\", \"response\": {\"body\": \"empty\"}, \"rosyMethod\": \"TestAPI.LoadTestData\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"POST\"}, \"test.test\": {\"path\": \"test\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.Test\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}, \"test.showdata4\": {\"path\": \"showdata4\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData4\", \"request\": {\"body\": \"autoTemplate(backendRequest)\", \"bodyName\": \"resource\"}, \"httpMethod\": \"POST\"}, \"test.showdata\": {\"path\": \"showdata\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}, \"test.showdata3\": {\"path\": \"showdata3\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData3\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}, \"test.showdata2\": {\"path\": \"showdata2\", \"response\": {\"body\": \"autoTemplate(backendResponse)\", \"bodyName\": \"resource\"}, \"rosyMethod\": \"TestAPI.ShowData2\", \"request\": {\"body\": \"empty\"}, \"httpMethod\": \"GET\"}}, \"descriptor\": {\"methods\": {\"TestAPI.ShowData2\": {\"response\": {\"$ref\": \"OutputResp\"}}, \"TestAPI.ShowData3\": {\"response\": {\"$ref\": \"OutputResp\"}}, \"TestAPI.ShowData4\": {\"request\": {\"$ref\": \"InputReq\"}, \"response\": {\"$ref\": \"OResp\"}}, \"TestAPI.Test\": {\"response\": {\"$ref\": \"OutputResp\"}}, \"TestAPI.LoadTestData\": {}, \"TestAPI.ShowData\": {\"response\": {\"$ref\": \"OutputResp\"}}}, \"schemas\": {\"ValueResp\": {\"type\": \"object\", \"id\": \"ValueResp\", \"properties\": {\"attrs\": {}, \"value\": {\"type\": \"string\"}}}, \"OResp\": {\"type\": \"object\", \"id\": \"OResp\", \"properties\": {\"entries\": {\"items\": {\"$ref\": \"ItemResp\"}, \"type\": \"array\"}}}, \"OutputResp\": {\"type\": \"object\", \"id\": \"OutputResp\", \"properties\": {\"text\": {\"type\": \"string\"}}}, \"InputReq\": {\"type\": \"object\", \"id\": \"InputReq\", \"properties\": {\"text\": {\"type\": \"string\"}}}, \"ItemResp\": {\"type\": \"object\", \"id\": \"ItemResp\", \"properties\": {\"values\": {\"items\": {\"$ref\": \"ValueResp\"}, \"type\": \"array\"}}}}}, \"version\": \"v1\", \"extends\": \"thirdParty.api\", \"defaultVersion\": true, \"root\": \"http://localhost:8082/_ah/api\", \"adapter\": {\"bns\": \"http://localhost:8082/_ah/spi\", \"type\": \"lily\"}, \"description\": \"test api\"}"]}
Response: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}

ERROR    2015-12-15 17:54:25,706 discovery_service.py:141] Failed to get API directory
INFO     2015-12-15 17:54:25,706 module.py:787] default: "GET /_ah/api/discovery/v1/apis HTTP/1.1" 404 9

That crazy request... where does it come from? I've commented the registering part in my backend. Is it cached somewhere? Tried eliminating all cookies, changed browsers, and the same happens. It seems to have all the registered services from the beginning of time. I've looked everywhere and could not find where are those stored.

My app (localhost:8080) does not work either, with the same problem.

http://stackoverflow.com/questions/34296456/gae-cloud-endpoints-api-explorer-stopped-working

chilabot commented 8 years ago

I was passing a map in the response of a service.