Trying to understand how Google Cloud App Engine works, I am trying the tutorial mentioned in:
https://medium.com/google-cloud/getting-started-with-google-app-engine-and-spring-boot-in-5-steps-2d0f8165c89
I can get the response "Hello Spring Boot!" on my local system using browser at "http://localhost:8080" but when I deploy the code to Google App Engine, I access .appspot.com then i fail to get the message "Hello Spring Boot!" but get 404 Error not found. I suspect this is an access/permissions issue but have not been able to solve it
Things I have checked:
1) My GCP has billing enabled for this project
2) I can see that there is one instance for in App Engine dashboard
3) My Google application credentials in bash ENV variable points to the API key created for this #appspot.gserivceaccount.com
4) I have used GCP to deploy an earlier project for maven spring boot, this is a new project to test APP engine.
Related
I have installed google datastore emulator in my local machine along with it written a sample spring boot application .
I can't connection datastore emulator
This is my application.properties config
spring.cloud.gcp.datastore.project-id=project-id
spring.cloud.gcp.datastore.emulator.enabled=true
spring.cloud.gcp.datastore.emulator-host=http://localhost:8081
by this config , I will throw Exception
The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
When using the Datastore emulator, you don't need credentials for running the application, so it might be that the library doesn't know that.
However, if you want to try it providing credentials, once you have a service account created, then run in the shell the following:
export GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH"
KEY_PATH you have to replace it with the path of the JSON file that contains your service account key. You can find more information here.
I am using
angular 8
nativescript 6.8.0
typescript 3.5.3
"#capacitor/android": "2.4.0",
"#capacitor/cli": "^2.4.2",
"#capacitor/core": "^2.4.2",
ng serve -- webapp is working fine login also working fine and able connect backend login REST API
npx cap server -- also working fine on http://localhost:3333/
I follow https://capacitorjs.com/ to convert my webapp to android app but
npx cap open android --- able to open app on android studio but not able to login and also not able to dubug properly because i am not java and android developer expert can any one guide how to proceed and where i am going wrong.
Add this in Your manifest in application tag
cleartextTrafficPermitted="true"
I tried to integrate Quickbooks Desktop with my application in Java.
I have installed the Quickbooks Desktop trial version and Quickbooks Web Connector. I have created a web service for the sample code given in Quickbooks Desktop's development documentation.
My QWC file.
<?xml version="1.0"?>
<QBWCXML>
<AppName>Example Development Service</AppName>
<AppID></AppID>
<AppURL>http://localhost:8080/qbwc/services/QBWebConnectorSvcSoapImpl</AppURL>
<AppDescription>Example Development Service</AppDescription>
<AppSupport>http://locahost:8000/wsdl</AppSupport>
<UserName>loyola.a</UserName>
<OwnerID>{57571caa-e934-4f14-b3bf-dfdbacdd273a}</OwnerID>
<FileID>{dc25fda6-bce2-493b-9e04-a1560bde96e4}</FileID>
<QBType>QBFS</QBType>
<Style>DocWrapped</Style>
<Scheduler>
<RunEveryNSeconds>600</RunEveryNSeconds>
</Scheduler>
<IsReadOnly>false</IsReadOnly>
</QBWCXML>
While Web connector calling authenticate method, I am getting the below error in QWClog file even my username and password are correct,
QBWebConnector.SOAPWebService.do_authenticate() : QBWC1012: Authentication failed due to following error message.
Object reference not set to an instance of an object
Please help me for further steps to do.
I know that to deploy onto app-engine you can run the maven command:
mvn appengine:update
Which then prompts for the auth code and launches a browser to confirm you want to publish onto the app engine. I'm looking to automate this fully so it can just be run as a command from maven. I have the appengine-maven-plugin setup but there doesn't seem to be any functionality to skip the manual step.
Has anyone managed to solve this? I know you can deploy right from Jenkins but we're looking for a solution that could be automates if our Jenkins server was down
Thanks
The authentication flow which redirects you to the browser for login and consent is call three-legged Oauth because it involves three steps: 1) request for a token 2) login and consent 3) API call with token.
An authentication flow which does not involve user login and consent is called two-legged Oauth (server to server): 1) request for a token, signed with a private key 2) API call with token. Server to server auth requires that you setup a service account with appropriate permissions (scopes). You must also safely distribute the private key for that service account so that you can sign your requests. See the OAuth2ServiceAccount instructions
The Bitnami Jenkins image actually does quite a bit for you out of the box. When you setup Push-to-Deploy you launch an instance with gcloud. That launch command specifies the scopes you want that images to have access too with the --scopes parameter, including "https://www.googleapis.com/auth/appengine.admin". Permission to these scopes is given to the default project service account. When Jenkins deploys your code, the service account credentials are made available through the Jenkins Google Oauth Plugin.
You can build another tool that will push code programatically. You will need to create a service account which generates a JSON Web Token (JWT) Again see the Outh2ServiceAccount instructions. The JWT is your private credential and you need to find a secure place to store it. The App Engine SDK knows how to use JWTs to get auth tokens.
During runtime you can pass the path to the JWT file as the --service_account_json_key_file parameter to appcfg.py. To plumb that parameter through the Maven plugin you'll have to use -DadditionalParams="--service_account_json_key_file " which is available on the tip of github.com/GoogleCloudPlatform/appengine-maven-plugin/master. (Will be in App Engine release 1.9.27, but you can pull from Github until then.)
I am just started exploring app engine with android (Java) and I followed a link to teach me how to create an App Engine Connected Android Project. https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae
I followed exactly what was written in the link ,
1) Created a new app engine connected android project
2) Get the project number and API Keys from https://code.google.com/apis/console/#project
3) enable Google Cloud Messaging in the Google APIs Console
4) set the LOCAL_ANDROID_RUN to true in CloudEndpoints class
5) used a emulator with google api(v17)
6) installed the android cloud messaging library from android sdk manager
7) I am using eclipse indigo
i got errors these lines in RegisterActivity.java
import messageEndpoint.MessageEndpoint;
import messageEndpoint.CollectionResponseMessageData;
import messageEndpoint.MessageData;
i got i got errors these lines in GCMIntentService.java
import com.tez.deviceinfoendpoint.Deviceinfoendpoint;
import com.tez.deviceinfoendpoint.Deviceinfoendpoint.Builder;
import com.tez.deviceinfoendpoint.model.DeviceInfo;
and errors like that:
Deviceinfoendpoint cannot be resolved to a type GCMIntentService.java
MessageEndpoint cannot be resolved to a type RegisterActivity.java
What should i do?
Right click on the app engine project and select Google-->Generate Cloud End Point Client Library. Clean the project and refresh. It should work.
Although I'm not quite sure about the cause of your error stack, it's encouraged to right-click on the app-engine project and select generate cloud end point as suggested above. However, if you badly need to create an endpoint on your own, you will have to make sure a similar entry as below is added into your web.xml inside your webapp directory.
<param-name>services</param-name>
<param-value>${package}.MyEndpoint</param-value>
And after you ensure the above entry,
you can make your module
Deploy it local server and run the app on emulator
Or else if you're working with your production server,
Make the module
Deploy to app-engine and test it on a device or an emulator of your choice.
Hope this might help you if the issue was with your new endpoint/services exposed through the new endpoint that you create. Thanks!