Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google AppEngine Endpoints Error: Fetching service config failed (status code 404)

I am implementing the steps in the Quickstart.

I did notice another question on this. I double checked that env_variables section in app.yaml has the right values for ENDPOINTS_SERVICE_NAME and ENDPOINTS_SERVICE_VERSION.

../_ah/api/explorer doesn't show any endpoint under 'Services'.

What is this error and how to fix it?

Error log shows:

 (/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback (most recent call last):
  File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/main.py", line 103, in <module>
    api = endpoints.api_server([EchoApi])
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/endpoints/apiserving.py", line 520, in api_server
    controller)
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/wsgi.py", line 121, in add_all
    a_service = loader.load()
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/service.py", line 110, in load
    return self._load_func(**kw)
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/config/service_config.py", line 78, in fetch_service_config
    _log_and_raise(Exception, message_template.format(status_code))
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/config/service_config.py", line 126, in _log_and_raise
    raise exception_class(message)
Exception: Fetching service config failed (status code 404)
like image 581
user362953 Avatar asked Feb 18 '17 03:02

user362953


1 Answers

I had the same Exception trace, except mine was a 403. Hope is helpful to others having the same frustration I had.

Exception: Fetching service config failed (status code 403)

I finally found that in my app.yaml it had this from the GIT clone

ENDPOINTS_SERVICE_NAME: echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog

And the Quickstart only directed me to replace YOUR-PROJECT-ID.

I had to also replace .cloud.goog with .appspot.com

like image 93
bourne2program Avatar answered Oct 14 '22 08:10

bourne2program