per appengine SDK 1.7.6, connecting to backend now fails - java

I have an android app with a GAE backend. I deploy the backend, and I used to be able to store entities in the datastore. However after the recent 1.7.6 sdk update, I can no longer do so. Connecting to the service, used to be https://1.myapp.appspot.com/_ah/api/, however that now generates a unverified error. I tried changing it to https://-1-myapp.appspot.com like the documentation said, however that just generates a 404 error. Anyway around this?

Related

Front-end doesn’t fetch backend. AWS, Heroku

I built a web app in VS Code using Java, Angular, and Spring Boot. My code runs well locally, but when you deploy it to AWS or Heroku something interesting happens. The backend sends the output to /api/articles and a JSON shows up here yet the front end is not fetching it for some reason. Now, interesting enough after a minute or two the articles show up in the front end but only in my machine. I want to make this part clear: it works from aws and heroku servers but so far only when I access it from my pc, not even my phone or a friends laptop. I am completely clueless.
Usually when I am developing API endpoints for a new service, I will run into similar issues when I am not setting CORS correctly.
To make an AJAX call from the browser to a server the server must return an header to inform the browser the domain is allowed to call this server.
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Google Cloud Endpoints v2: Testing API key mechanism for an app-engine app executed on the local development machine

I'm a beginner in context of google-cloud-endpoints and the associated product "google-cloud-app-engine".
I've created a simple google app angine project/application and created an API-Key by using the google cloud platform's console.
To my app-engine's endpoints API definition I've added the annotation
"apiKeyRequired = AnnotationBoolean.TRUE" as stated in
Add API restriction by adding an API key to your app engine application
and my client application which uses the generated endpoints client API was also updated accordingly to send the generated API key for all API requests.
As I would like to test the "API-Key" mechanism locally on my development machine (using a local app-engine environment) before deploying the backend to the cloud, I would like to know, whether it is possible to test the "API-Key"-restrictions locally. I mean, somehow the locally executed app-engine backend app has to be aware of the created API key. Maybe there is a property which I have to provide to my app-engine backend application's POM.xml file...I don't know, whether the google app-engine SDK supports API keys for local testing in context of the "endpoints framework v2" actually. The newley introduced API Management Platform (API-Gateway) can maybe not be "simulated" locally...?!
Thank you so far for your effort!
API key restrictions should work locally. You just need to include GoogleAppEngineControlFilter in your web.xml.

Google App Engine/Managed VM Cloud Endpoints

We're currently running on App Engine (Java) and want to test the new managed VMs that Google are beta testing.
Everything builds, but I can't get any of the endpoints to work.
When I build, the error that comes back is:
SEVERE: Endpoints configuration not updated. The app returned an
error when the Google Cloud Endpoints server attempted to communicate
with it.
In the admin logs I can see that it has attempted, but the error comes back:
API configuration update failed
The discovery docs get created locally, but there isn't anything in the logs.
I can see the POST to the getApiConfigs, but no details on the failure.
Hopefully someone else has encountered the same problem and can help?
In essence my question is, what do I need to do to get cloud endpoints running on a managed VM for App Engine?
Thanks
Have you checked your logs at https://console.cloud.google.com/logs/viewer ?
I had the same problem and after checking the logs I realized that I had two classes with the same API name and version but one had namespace and the other didn't.
All API classes with the same API name and version must have the exact same API-wide configuration.
I just set the namespace to be the same for both API's and it worked.

Android app how to detect which component doing web requests?

I have android application which is using multiple libraries (built into app: e.g. android support v7, barcode zxing, google play, and couple other less known).
Trying to resolve some functional issues, I detected that app periodically is doing web https requests to strange ec2.x.amazonaws.com addreses which are not mine servers at all.
Addresses are:
ec2.174-129-33-55.compute-1.amazonaws.com,
ec2.107-21-232-174.compute-1.amazonaws.com,
ec2.50-17-229-89.compute-1.amazonaws.com,
ec2.54-225-166-66.compute-1.amazonaws.com
In a quite large java code I cannot find explicit calls to these addresses.
So, question is, how to detect which component in my app is doing these requests?
I'm using android app "Network Log" to trace traffic.
Thank you for help.
You might see if stetho picks it up.
Was trying to use Stetho but no luck huking into tracing web requests. Was able to get chrome view but no info.
But I found what is doing requests: it's a Crashlytics crash monitoring service - I discovered this by trying to query ip in browser and checked ssl certificate info...

BlazeDS on GAE (Detected duplicate HTTP-based FlexSessions)

Is BlazeDS 4 work with Google App Engine. I'm using BlazeDS 3.2.0 and getting an such an error
Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly.
Is it possible to point out a place where I can download the compiled blzeds jar files that work with GAE since I'm facing troubles downloading the source code from the site(slow internet connection at a place I work).
If you need messaging do not use BlazeDS on Google App Engine. For remoting, several guys created some patches. One is here.

Categories

Resources