google-cloud-endpoints

Authenticated Cloud Endpoint intermittent failure in Android client

梦想与她 提交于 2019-12-05 01:06:57
问题 I have an application in production that is receiving a significant number of force/closes when calling an authenticated Cloud Endpoint. The most telling message is " java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.internal.es@4481e6a8" . The logic works correctly 95% of the time. The stack trace of the failure is as follows: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at

inconsistency issue with Objectify query result and Datastore viewer result?

那年仲夏 提交于 2019-12-05 00:02:54
问题 I'm coding a sample project based on TodoMVC angularjs (http://todomvc.com/) and with a backend api with Google App Engine Cloud Endpoint and I'm having some consistency result when getting the todos liste from App Engine Datastore. Todo object are stored in the App Engine Datastore using objectify. A Todo entity is coded as follow: @Entity public class Todo { @Id private Long id; private String title; private boolean completed; private Date lastEdit; @Index private Long userId; public Todo()

How to set a custom header in Google Cloud Endpoints Javascript Client?

為{幸葍}努か 提交于 2019-12-04 23:04:16
I can fetch a list of blog posts from Google Cloud Endpoints using the Javascript Client: gapi.client.blog.posts.list().execute(function (resp) { console.log(resp); }); But I need to set a custom header value in the Google Cloud Endpoints request that contains a user token (this could be an access token from Facebook). How can I do that using the Javascript Client from Google? I could solve this by not using the Javascript Client from Google, but I would rather use it. https://developers.google.com/appengine/docs/java/endpoints/consume_js https://developers.google.com/api-client-library

Error 413 (Request Entity Too Large) on a Google Cloud Endpoints API call from Android

巧了我就是萌 提交于 2019-12-04 22:25:58
I have a Google Cloud Endpoints API method as follows. @ApiMethod(name = "setImage", httpMethod = ApiMethod.HttpMethod.POST) public void setImage(HttpServletRequest httpRequest, com.google.appengine.api.users.User appEngineUser, @Named("image") String image) throws IOException, OAuthRequestException, ForbiddenException, com.google.api.server.spi.response.NotFoundException { // Write the image text to a pojo and save the pojo in the datastore. } I generate client libraries for iOS and Android from this API. In both mobile apps, I use the camera to take a photo, resample the bitmap from the

IllegalArgumentException: Deserializing generated objects with @JsonString annotation

此生再无相见时 提交于 2019-12-04 19:14:04
Long values in Objects generated by Cloud Endpoints are annotated with @JsonString. This causes a IllegalArgumentException when deserializing those Objects using a GsonFactory. This is the stacktrace: Caused by: java.lang.IllegalArgumentException: number type formatted as a JSON number cannot use @JsonString annotation [key updated, field private java.lang.Long com.google.api.services.timetable.model.Lesson.updated] at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119) at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:599) at com.google.api.client.json

Making calls from the Javascript client library with @Named and unnamed parameters makes no sense

二次信任 提交于 2019-12-04 17:56:48
I have a Cloud Endpoints method that looks like this: //HTTP POST @ApiMethod(name = "hylyts.insert") public Hylyt insertHylyt(@Named("url") String url, Hylyt hylyt, User user) throws OAuthRequestException{ log.info("Trying to save hylyt '"+hylyt+"' with id '"+hylyt.getId()); if (user== null) throw new OAuthRequestException("Your token is no good here."); hylyt.setArticle(getArticleKey(url, user)); ofy().save().entity(hylyt); return hylyt; } I call it from the Javascript Client Library using this: gapi.client.hylytit.hylyts.insert({PARAMS}).execute(callback); Now, if I structure {PARAMS} as

Can't load Google Cloud Endpoints on Internet Explorer 10

自闭症网瘾萝莉.ら 提交于 2019-12-04 17:09:57
问题 I'm working on a web site that is using the Google JavaScript Client Library to load some APIs that are exposed via Google Cloud Endpoints. The endpoints were developed in Python, but I'm not sure if that's a factor. Everything's working great in Chrome, Firefox and Safari, but on Internet Explorer 10 I get this error: SCRIPT5007: Unable to get property 'value' of undefined or null reference proxy.html, line 7 character 51 I'm loading the client library using code similar to that suggested by

golang go-endpoints Session using gorilla-toolkit

丶灬走出姿态 提交于 2019-12-04 16:32:17
I'm trying to implement Session handling and combine it with the go-endpoints package ! The package that i use to handle the session is Gorilla Sessions (github.com/gorilla/sessions), i would like some help.. I'm able to store a cookie to the client .. and when i call the endpoints is can see that the cookie is sent to the server. The problem while i try to get the Session values from the Session storage while the api is called, i cant get threw to the cookie .. it seams that the endpoints package strip the http.Request from extra content or something .. ? The place that i try to get the

HTTP code 302 encountered when deploying on Google App Engine Endpoints

瘦欲@ 提交于 2019-12-04 14:54:28
When developing for App Engine Endpoints in Java using the official documentation , after running endpoints.cmd with the appropriate parameters and deploying in GAE, the dev server shows the proper endpoints at http://localhost:8888/_ah/api/discovery/v1/apis , but accessing the explorer for the production version on GAE shows old endpoints at https://<my-app>.appspot.com/_ah/api/discovery/v1/apis . The error was traced to the HTTP 302 (moved temporarily) code found in the Logs of the production app for access to /_ah/spi/BackendService.getApiConfigs . Until that clears (i.e., gives HTTP 200),

How to access local Cloud Endpoints API from mobile device

♀尐吖头ヾ 提交于 2019-12-04 14:43:40
I want to access my Cloud Endpoints API hosted on my local dev machine from an Android app running on a mobile device I use for testing. My device can access my dev machine by IP address. I passed --host=192.1.168.101 to the App Engine launcher so that my local App Engine instance binds to the IP address. Although I can access the App Engine instance from 192.168.1.101, I get a 404 when my app makes an API call. I noticed that going to http://192.168.1.101:9080/_ah/api/explorer/ does not show my API; it redirects to https://developers.google.com/apis-explorer/#p/ . If I use http://localhost