Sessions not working on local GAE project in IntelliJ - google-app-engine

I have a Google App Engine webapp that uses sessions. When I deploy it to the cloud, it works fine. When I run it locally in the debugger using IntelliJ's built-in server, sessions are not working. If I look at the requests in Chrome's network debugger, it appears that a new session cookie is being sent each time.
In particular, it appears that the JSESSION cookie is not being saved, even though I see it in the response.
Any ideas what could be wrong?
Thanks.

Related

Facing problems to host react front end and connecting it to flask backend on azure cloud

I have the code ready for deployment and it’s working perfectly on the local computer. Flask as the backend (localhost:5000) and React as the front end (localhost:3000). I could host the backend code sucessfully but when I tried to host the front end separately it’s not working After deployment it says Application
and when I check the logs it’s all good no problems or error shown over there.
I also need some idea on how to connect it in Azure cloud as I don’t have much experience. I tried the solutions provided in some of the older discussions here
I can’t use virtual application because the flask backend can only be hosted on linux on Azure.
I have been trying to solve it since days.
Any suggestion on how to deploy and connect both will be helpful.

Local or development Google Cloud Firestore database with App Engine

In my previous App Engine projects I used the Cloud Datastore, and during development I could debug my app on the local server and it would use a local database, stored in a file I could wipe out if I wanted to start from scratch.
With Cloud Firestore, even when I'm running locally it's talking to my real cloud database. Is there still a local option? Note that I'm not talking about client-side persistence, I'm talking about a mock development DB.
Google recommends setting up multiple projects if you want dev/staging/production, and I'm guessing that's the answer, but I'd like to know before adjusting my workflow.
I think (now only a few months later) that this is supported. When I run my app, using dev_appserver.py, I see a message
INFO 2019-02-14 00:08:56,030 admin_server.py:150] Starting admin server at: http://localhost:8000
Going to that URL shows me all the instances I have been seeing. These seem to persist even when the dev_appserver is restarted. Reading this and other posts I was convinced that my development was using my actual cloud database, but going to https://console.firebase.google.com/project/myproject was showing completely different content.
Just to be sure (because google is google and everything is named the same) I'm using an appengine app and a gcloud project, storing things to Firestore using ndb.Models...
Oh, but careful. My app I was also using the cloudstorage (blobstore?) and even though the localhost:8000 showed these, THESE WERE THE REMOTE INSTANCES.
There is a local emulator for Firestore when using the Firebase CLI:
https://firebase.google.com/docs/rules/emulator-setup

Google Cloud Application stops working when not being used for a while

I'm using Google Cloud and I have hosted my application using Google App Engine. I'm also using Google Cloud SQL. My problem is that after some time like maybe 6-7 hours or even less my application stops working as if it got shut-down.
I can access the URL but can see NO data... Cloud SQL still works because if I try to connect to the IP address, I can see my data in MySQL.
I need to always deploy it again from eclipse and it starts working again.
How can I fix this problem? My Cloud SQL settings are set to Always running as I'm still on a trial period. Technically it should never shut-down but I don't why it is.
Can someone help?

Running Endpoint locally could not provide access to API explorer when HTTP proxy is enabled

I'm using Android Studio(0.5.8) on Window7 x64 for developing my Android App with Google AppEngine backend.
If my machine is having direct internet access and I launch backend locally (as DevApp Server) and access my API Endpoints through webbrowser (chrome) it is all working as expected.
Accessing api explorer is also working fine from webbrowser.
http://localhost:8080/_ah/api/explorer
But if I have configured internet through http proxy (in Android Studio and also in webbrowser) then webbrowser displays initial page of backend but can't access endpoint api explorer.
And deploying appbackend in Google AppEngine also fails with errors.
gradlew backend:appengineUpdate
Same is working fine if direct internet access is available (not via http proxy).
How can we make it work with http proxy also? Any help is appreciated, Thanks.
You should be able to tell any command that wraps appcfg (appengineUpdate is one of them) what the http/https proxy is.
In your build.gradle file add to the configuration (more info at https://github.com/GoogleCloudPlatform/gradle-appengine-plugin)
appengine {
httpProxy = "some proxy"
}
I'm not sure about the api explorer though.

Google Cloud Storage Client not working on dev appserver

I 'm building an AppEngine application that stores data in Google Cloud Storage. I use the Google Cloud Storage Client (GCS) library as suggested.
My app is working when deployed on AppEngine (reading/writing/listing objects) but I cannot make it work on the development server. The development server keeps returning error 404 and GCS raises NotFoundError. The dev-appserver is supposed to emulate the cloud storage functionality without any specific configurations etc. I see in the log files that the dev server is accepting requests at "/_ah/gcs" yet it seems that there is no handler for that url. I 've tried with version 1.8.5 and 1.8.6. Apart from my app, not even the demo app provided by Google works.
Is there something that I 'm missing here, e.g. a special configuration for the dev-appserver?
Sorry the following change was pushed out too early by mistake. It only works with 1.8.8 SDK. We are streamlining the release process of gcs client to align with SDK. Sorry
https://code.google.com/p/appengine-gcs-client/source/detail?r=125
Without this change, it works on 1.8.7 SDK.

Resources