5
votes

I can't get running Google Endpoints Framework V2 on local AppEngine development server.

To demonstrate an issue i created a gradle demo project It works just fine if deploy to real AppEngine standard environment instance but does not work with local dev server.

The steps to reproduce:

  1. edit appengine-web.xml in case wish to change default appengine service name (framework-v2-someapi) and change that name on step 5 as well.
  2. gcloud auth login
  3. gcloud config set project PROJECT_ID
  4. ./gradlew appengineDeploy
  5. gcloud app browse -s framework-v2-someapi
  6. Click API link in new opened browser window.
  7. Play with API Explorer and check the Services > someapi API v1 > someapi.method.getHash works fine.
  8. ./gradlew appengineStart and open http://localhost:8080 to try do the same localy and get errors instead.

Eventually got

Jan 24, 2017 7:25:40 PM com.google.appengine.tools.development.devappserver2.RemoteApiDelegate log SEVERE: [1485285940023000] javax.servlet.ServletContext log: unavailable com.google.appengine.tools.remoteapi.RemoteApiException: response was a python exception: cgoogle.appengine.runtime.apiproxy_errors ApplicationError

My question is how to run Google Endpoints Framework V2 localy?

2
Hi, there's currently a bug (fix in review) in the API management code that will be fixed in 1.0.1 of the endpoints-management-control-appengine artifact. Apologies for the inconvenience. If you don't need metrics right now, I would comment out the GoogleAppEngineControlFilter in web.xml. - saiyr
Thanks saiyr , but if you take a look on a code, there is no GoogleAppEngineControlFilter at github.com/softkot/framework-v2-someapi/blob/master/src/main/… - Alexei Volkov
It's in a different library. Can you update your sample repository and try again? - saiyr
Saiyr, could you be a little more specific? What do I need to update? - Alexei Volkov
@saiyr Meantime try to follow Quickstart for Cloud Endpoints Frameworks on App Engine and get the same behaviour. Project buil and deploy just fine but running the sample locally mvn appengine:run ends up with [INFO] GCLOUD: WARNING: failed endpoints-api-controller: com.google.appengine.tools.remoteapi.RemoteApiException: response was a python exception: [INFO] GCLOUD: cgoogle.appengine.runtime.apiproxy_errors [INFO] GCLOUD: ApplicationError - Alexei Volkov

2 Answers

1
votes

The solution found by the original poster was to set the <version> tag inside his appengine-web.xml file. A description of this tag can be found on the README of this Github helloworld java-docs-samples repository.

0
votes

In build.gradle, change

compile 'com.google.endpoints:endpoints-management-control-appengine:1.0.0'

to

compile 'com.google.endpoints:endpoints-management-control-appengine:1.0.1'