Google App Engine update not showing updated version - google-app-engine

When I update a new version to Google App Engine, the new version does not show on the AppSpot domain, but it does show on the version domain like v2.appspot.com. Does anyone know how to make the latest version update live?
This is the command I am using to do updates:
appcfg.py update .
This is the output of my terminal command prompt:
Michaels-MacBook-Air:crm Mike$ appcfg.py update .
08:38 PM Application: telipayments; version: crm2
08:38 PM Host: appengine.google.com
08:38 PM
Starting update of app: telipayments, version: crm2
08:38 PM Getting current resource limits.
08:38 PM Scanning files on local disk.
08:38 PM Scanned 500 files.
08:38 PM Scanned 1000 files.
08:38 PM Cloning 798 static files.
08:38 PM Cloning 1286 application files.
08:38 PM Compilation starting.
08:38 PM Compilation completed.
08:38 PM Starting deployment.
08:38 PM Checking if deployment succeeded.
08:38 PM Deployment successful.
08:38 PM Checking if updated app version is serving.
08:38 PM Completed update of app: telipayments, version: crm2
08:38 PM Uploading cron entries.
Michaels-MacBook-Air:crm Mike$

You need to set the default version:
appcfg.py [options] set_default_version
Sets the default (serving) version of the app. By default, the serving
version is set to the version specified in app.yaml, unless you
specify another with the --version option.

Related

Datastore emulator message type mismatch

I tried to start the datastore emulator in my local dev environment (Java 8) and got the following error. Looks to me it happens because of a mismatch of protobuf versions. It would be great if you know of any workaround for this. Thanks.
Cloud SDK Version: 313.
OS: macOS
$ gcloud beta emulators datastore start
Executing: /Users/w/Work/google-cloud/google-cloud-sdk/platform/cloud-datastore-emulator/cloud_datastore_emulator create --project_id=<aaaa> /Users/w/.config/gcloud/emulators/datastore
[datastore] Oct 09, 2020 12:28:45 PM com.google.cloud.datastore.emulator.CloudDatastore$CreateAction$1 apply
[datastore] INFO: Provided project_id to Cloud Datastore emulator create command, which is no longer necessary.
[datastore] Created new Cloud Datastore project in '/Users/w/.config/gcloud/emulators/datastore'.
Executing: /Users/w/Work/google-cloud/google-cloud-sdk/platform/cloud-datastore-emulator/cloud_datastore_emulator start --host=localhost --port=8081 --store_on_disk=True --consistency=0.9 --allow_remote_shutdown /Users/w/.config/gcloud/emulators/datastore
[datastore] Oct 09, 2020 12:28:45 PM com.google.cloud.datastore.emulator.CloudDatastore$FakeDatastoreAction$9 apply
[datastore] INFO: Provided --allow_remote_shutdown to start command which is no longer necessary.
[datastore] Oct 09, 2020 12:28:45 PM com.google.cloud.datastore.emulator.impl.LocalDatastoreFileStub <init>
[datastore] INFO: Local Datastore initialized:
[datastore] Type: High Replication
[datastore] Storage: /Users/w/.config/gcloud/emulators/datastore/WEB-INF/appengine-generated/local_db.bin
[datastore] Exiting due to exception: java.lang.IllegalArgumentException: Extension is for type "proto2.MethodOptions" which does not match message type "google.protobuf.MethodOptions".

Azure App Service Getting error while deploying REACT JS application

Getting error while deploying to azure app services from the editor.
4:48:55 pm ppdedsrftwu2-appservice1: Starting deployment...
4:48:56 pm ppdedsrftwu2-appservice1: Creating zip package...
4:49:00 pm ppdedsrftwu2-appservice1: Zip package size: 1.09 MB
4:49:04 pm ppdedsrftwu2-appservice1: Fetching changes.
4:49:06 pm ppdedsrftwu2-appservice1: Updating submodules.
4:49:06 pm ppdedsrftwu2-appservice1: Preparing deployment for commit id '2a73dbd291'.
4:49:06 pm ppdedsrftwu2-appservice1: Repository path is /tmp/zipdeploy/extracted
4:49:06 pm ppdedsrftwu2-appservice1: Running oryx build...
4:49:06 pm ppdedsrftwu2-appservice1: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 10 -i /tmp/8d856447f426192 -p compress_node_modules=tar-gz --log-file /tmp/build-debug.log
4:49:07 pm ppdedsrftwu2-appservice1: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
4:49:07 pm ppdedsrftwu2-appservice1: You can report issues at https://github.com/Microsoft/Oryx/issues
4:49:07 pm ppdedsrftwu2-appservice1: Oryx Version: 0.2.20200805.1, Commit: e7c39ede513143e9d80fd553f106f04268d770d4, ReleaseTagName: 20200805.1
4:49:07 pm ppdedsrftwu2-appservice1: Build Operation ID: |lvjLop9mFGA=.426fac1c_
4:49:07 pm ppdedsrftwu2-appservice1: Repository Commit : 2a73dbd2834715ba1fee5082d13b60
4:49:07 pm ppdedsrftwu2-appservice1: Detecting platforms...
4:49:07 pm ppdedsrftwu2-appservice1: Could not detect any platform in the source directory.
4:49:07 pm ppdedsrftwu2-appservice1: Error: Couldn't detect a version for the platform 'nodejs' in the repo.
4:49:09 pm ppdedsrftwu2-appservice1: Error: Couldn't detect a version for the platform 'nodejs' in the repo.\n/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 10 -i /tmp/8d856447f4292 -p compress_node_modules=tar-gz --log-file /tmp/build-debug.log
4:49:20 pm ppdedsrftwu2-appservice1: Deployment failed.
Have defined all the necessary settings in the portal.
SCM_DO_BUILD_DURING_DEPLOYMENT=true
WEBSITE_NODE_DEFAULT_VERSION=12
WEBSITES_PORT=3000
WEBSITE_HTTPLOGGING_RETENTION_DAYS=7
Tried with node version 10 also but still the same error.
Connected with MS Support team they suggested to make the SCM_DO_BUILD_DURING_DEPLOYMENT= FALSE. After making this as false i am able to deploy the app. But the strange thing is with this option enabled i was doing earlier deployments and it was working.
In my case, I had the node app in a subdirectory, and this was causing this error in GitHub Actions job. Explicitly setting the working directory in the yml file fixed this. i.e
- name: npm install, build, and test
working-directory: ./subdirectory
run: |
npm install
npm run build --if-present
npm run test --if-present
I also struggled with this issue.
Two things helped me :
When deploying from the Azure App service extension :
Understanding that your root NodeJS application folder must be the root folder that is open in your explorer in vscode.
If your NodeJS application is in a subfolder, azure wont be able to build ( or identify your node platform : hence the error message that you are seeing ) the scripts in your root folder.
By far the easiest way to resolve this is to open vscode in the root folder ( the folder where your package.json file is located.
Also : When you click the deploy button on your vscode Azure App service extension : it might allow you to specify the folder to be deployed.
You can try to add the Application setting : SCM_DO_BUILD_DURING_DEPLOYMENT with the value of FALSE and Deployment slot setting of unchecked.
This is on the azure portal under configuration - application settings - add +
Remember to click that save button after adding new application settings ..... because azure ... lol.
But i think this is mostly way to delay your app building until the files are copied.
Last thing : If you are deploying from Github : Make sure that your nodeJS app is also in the root folder of the Github repo. If it is not you will need to update the workflow file to change the folder to the subfolder.
You just need to add cd yourfoldername above the line where it says npm install and commit the workflow change to the repo.
Hope this helps.
If you're doing a deployment from i.e., Visual Studio Code and deploying the dist/... folder then you wouldn't want to try and actually do a build hence setting SCM_DO_BUILD_DURING_DEPLOYMENT=false.
There is not a running node js server to actually do a build on the agent pool deployment pipeline. Azure devops or Jenkins per se would actually have an agent pool to do a "proper (air quotes)" build. Yes, you're code is running on node hence the setting you choose when setting up the web app. So those 2 things are not the same. Rather, DevOps.
I didn't find it in the documentation so appreciate the answer and responses here; but, I just wanted to give more context to the answer.
It's an upgrade to visual studio web apps deployment to potentially utilize other build methods like described in an answer here about github actions.

app engine go deploy failed

It works well yesterday afternoon, but it does not work now.
I use goapp deploy MY_DIR/app.yaml to deploy, and this is the message of deploy
02:38 PM Host: appengine.google.com
02:38 PM Application: MY_APP; module: MY_MOD; version: MY_VER
02:38 PM Starting update of app: exp-lkl, module: MY_MOD, version: MY_VER
02:38 PM Getting current resource limits.
02:38 PM Scanning files on local disk.
02:38 PM Scanned 500 files.
02:38 PM Scanned 1000 files.
02:38 PM Cloning 1085 application files.
02:38 PM Compilation starting.
02:38 PM Compilation: 1081 files left.
02:38 PM Compilation completed.
02:38 PM Starting deployment.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 1 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 2 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 4 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 8 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 16 seconds.
02:38 PM Checking if deployment succeeded.
02:39 PM Deployment successful.
02:39 PM Checking if updated app version is serving.
02:39 PM Rolling back the update.
Error 500: --- begin server output ---
Server ErrorA server error has occurred.
--- end server output ---
I tried also:
1/ update sdk to the lastest version
2/ update go version (I tried go1.6 and go1.8)
3/ use appcfg.py
But I get the same error
Someone can help?
Finally I fixed this issue.
It seems that app engine changed the error message for the no buildable code. My project does not build, app engine showed the path of the no buildable code before, but now app engine returns 500 error
Error 500:
--- begin server output ---
<h3>Server Error</h3><p>A server error has occurred.</p>
--- end server output ---

Google App Engine Project Deploys but Doesn't Update at xxx.appspot.com

I've created a Google app locally and am trying to see it on app_id.appspot.com. The project for the app is set up on Google Developer's console and I can successfully deploy from the App Engine Launcher with the following log output:
2015-07-17 08:42:59 Running command: "['C:\\Python27\\pythonw.exe', '- u', 'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '-- oauth2_credential_file=C:\\Users\\xxxx/.appcfg_oauth2_tokens', 'update', 'C:\\Program Files\\Google\\Cloud SDK\\app-id\default']"
08:43 AM Application: app-id; version: 6
08:43 AM Host: appengine.google.com
08:43 AM
Starting update of app: app-id, version: 6
08:43 AM Getting current resource limits.
08:43 AM Scanning files on local disk.
08:43 AM Scanned 500 files.
08:43 AM Cloning 2 static files.
08:43 AM Cloning 727 application files.
08:43 AM Uploading 1 files and blobs.
08:43 AM Uploaded 1 files and blobs.
08:43 AM Compilation starting.
08:43 AM Compilation completed.
08:43 AM Starting deployment.
08:43 AM Checking if deployment succeeded.
08:43 AM Deployment successful.
08:43 AM Checking if updated app version is serving.
08:43 AM Completed update of app: app-id, version: 6
08:43 AM Uploading index definitions.
2015-07-17 08:43:22 (Process exited with code 0)
You can close this window now.
I'm on Windows 7 and have tried this on cmd as well with the same output. I've tried changing the version number, waiting overnight, and setting "default_expiration" to "1m" in app.yaml, but no dice. The address app_id.appspot.com still shows a very old version of the app. Any suggestions about what to do from here?
It looks like you are uploading your application with version label 6. Log into the Google Cloud Console and check to see if version 6 is set as the default serving version.
https://console.developers.google.com/project/<your-app-id>/appengine/versions

App Engine doesn't find WEB-INF in WAR created by sbt

I'm trying to make a Lift app that I can run on App Engine and am managing the project with sbt. I have web.xml and appengine-web.xml in src/main/webapp/WEB-INF and package the project with sbt project. According to a previous SO quesiton, that should be all I need. However, I get this:
$ dev_appserver.sh target/scala_2.8.1/
2011-02-06 13:37:45.763 java[20355:903] [Java CocoaComponent compatibility mode]: Enabled
2011-02-06 13:37:45.765 java[20355:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Feb 6, 2011 12:37:47 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
com.google.apphosting.utils.config.AppEngineConfigException: Supplied application has to contain WEB-INF directory.
at com.google.appengine.tools.development.JettyContainerService.determineAppRoot(JettyContainerService.java:319)
at com.google.appengine.tools.development.JettyContainerService.initContext(JettyContainerService.java:145)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:146)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Any ideas why? Thanks.
Sorry, I just figured out the problem after submitting the question. The following invocation of the dev server works: dev_appserver.sh target/scala_2.8.1/webapp

Resources