google-cloud-endpoints

Google Cloud Endpoints: verifyToken: Signature length not correct

扶醉桌前 提交于 2019-12-20 08:58:09
问题 This morning the following exception has started occuring on every API request to my Google Cloud Endpoint from my Android app: com.google.api.server.spi.auth.GoogleIdTokenUtils verifyToken: verifyToken: Signature length not correct: got 256 but was expecting 128 The call still works perfectly from my javascript web clients. I have changed nothing on the server side code or client code. Has anything changed with the service recently that might make this occur? UPDATE: The first occurrence of

Cloud Endpoints HTTP Cookies

狂风中的少年 提交于 2019-12-20 08:51:31
问题 I am implementing Cloud Endpoints with a Python app that uses custom authentication (GAE Sessions) instead of Google Accounts. I need to authenticate the requests coming from the Javascript client, so I would like to have access to the cookie information. Reading this other question leads me to believe that it is possible, but perhaps not documented. I'm not familiar with the Java side of App Engine, so I'm not quite sure how to translate that snippet into Python. Here is an example of one of

serve static image along side java google-endpoint api

自作多情 提交于 2019-12-20 06:34:11
问题 In Python to host a basic website on app-engine, I can put all my image files in a static directory, say img, and then in the yaml file have - url: /img static_dir: img then to access my images, I simply do myid.appspot.com/img/pic.jpeg I need to do the same thing for a Java google-endpoint backend. How would that work? I am using the Google-eclipse-plugin. I suppose I need to edit the web.xml file. But I am not sure what I would put in there. The structure of my /img directory is such that

ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Network 'default' does not exist

耗尽温柔 提交于 2019-12-20 06:24:44
问题 I try to use the endpoints follow this document: https://cloud.google.com/endpoints/docs/openapi/get-started-app-engine On the step 'Deploying the API backend', when I try to run 'gcloud app deploy target/appengine-staging',met this issue: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Network 'default' does not exist What's the wrong on the step? Where can I manage the network? 回答1: If you don't specify otherwise, the deployment tries to use the "default" network in your project. You may have

How to call App Engine Endpoints with the JavaScript library in promises mode

谁说胖子不能爱 提交于 2019-12-20 04:46:29
问题 I have a web application which calls several App Engine Endpoints with the Google API JavaScript client library. I am currently changing this application from callback mode to promises mode, as recommended by Google (https://developers.google.com/api-client-library/javascript/features/promises#using-promises) and I am encountering a problem. Note that the app works well with the callback mode. My problem with the promises mode is to find what is the correct path argument to use when calling

How to convert NSString to UIImage for appengine blobstore

為{幸葍}努か 提交于 2019-12-19 10:48:26
问题 when I do the following the resulting image is null NSLog(@"string (%@) to base64NSData",object); NSData *base64Data = [[object dataUsingEncoding:NSUTF8StringEncoding] base64EncodedDataWithOptions:0]; NSLog(@"NSData (%@) to UIImage",base64Data); UIImage *image = [UIImage imageWithData:base64Data]; NSLog(@"my image is: %@",image); How might I do this well? Reason I need to save an image from iOS to the Google blobstore. I need to include some metadata with the image. When I encode the string

Using AFNetworking to post both text and multiple images to Google Blobstore

老子叫甜甜 提交于 2019-12-19 04:45:47
问题 For reference, here is the working android/Java version of what I am trying to do in iOS/Objective-c public static void saveTextsAndImagesOnServer(List<byte[]> images, long someID1, String servingUrl, boolean someFlag) throws ClientProtocolException, IOException { Log.d(TAG, "saveTextsAndImagesOnServer started "); HttpClient httpClient = new DefaultHttpClient(); HttpPost postRequest = new HttpPost(servingUrl); MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER

500 Internal Server Error on one of my cloud endpoint methods when deployed

时光怂恿深爱的人放手 提交于 2019-12-19 04:26:20
问题 All of my Cloud Endpoints methods work locally, and all but one work when the app is deployed. Here is the method: @ApiMethod(name = "listUrl", path ="article/urls", httpMethod = HttpMethod.GET) public String[] listUrl() { List<Article> articles = getArticleList(); String[] urlArray = new String[articles.size()]; int i = 0; for (Article article : articles) urlArray[i++] = article.getUrl(); return urlArray; } I know that the three accepted return types are "a POJO, an array or a Collection."

500 Internal Server Error on one of my cloud endpoint methods when deployed

社会主义新天地 提交于 2019-12-19 04:26:19
问题 All of my Cloud Endpoints methods work locally, and all but one work when the app is deployed. Here is the method: @ApiMethod(name = "listUrl", path ="article/urls", httpMethod = HttpMethod.GET) public String[] listUrl() { List<Article> articles = getArticleList(); String[] urlArray = new String[articles.size()]; int i = 0; for (Article article : articles) urlArray[i++] = article.getUrl(); return urlArray; } I know that the three accepted return types are "a POJO, an array or a Collection."

GoogleJsonResponseException: 404 Not Found using google apps endpoint engine backend

别等时光非礼了梦想. 提交于 2019-12-19 02:52:08
问题 I followed the tutorial below. https://developers.google.com/eclipse/docs/running_and_debugging_2_0 which basically added a GAE backend to my existing app. I then try out the example below, run it on the local development server and I get the exception below which occurs after Note result = endpoint.insertNote(note).execute(); is called. com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found My code is below. package com.cloudnotes; import java.io.IOException; import