I have a new Google App Engine project (1.7.3) and want to add the FreeBase API through the GPE tooling --> Add Google APIs.
I have an older project where I succesfully downloaded the API which resulted in this classpath entry:
<classpathentry kind="con" path="com.google.gdt.eclipse.managedapis.MANAGED_API_CONTAINER/freebase-v1r10lv1.7.2-beta"/>
The .log of eclipse tells me this:
MESSAGE IO error while downloading http://api-directory.googleapis.com/5935/download-apiary/freebase/v1?lang=java&dependencies=1
!STACK 0
java.io.IOException: Server returned HTTP response code: 502 for URL: http://api-directory.googleapis.com/5935/download-apiary/freebase/v1?lang=java&dependencies=1
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.google.gdt.eclipse.core.jobs.DownloadRunnable.run(DownloadRunnable.java:81)
at com.google.gdt.eclipse.managedapis.platform.ManagedApiInstallJob.run(ManagedApiInstallJob.java:190)
at com.google.gdt.eclipse.managedapis.ui.ApiImportWizard$2.execute(ApiImportWizard.java:145)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
When I try to access the URL with a browser a also get a 502 error.
I tried adding another API, the books API, and that went fine, but I want to use the FreeBase API.
I am getting the error for both the preferred and sandbox options that are available in the API list.
Related
We are using windows 8.1 for one angular application. Installed the bower and npm, also installed node server.
We can see the login page after npm start but after login success we are not able to redirect. It showing error
Cannot GET /components/home.html
After inspect element Console error like this:
angular.js:11038 GET http://localhost:8081/components/home.html 404 (Not Found)
Header:
Request URL:http://localhost:8081/components/home.html
Request Method:GET
Status Code:404 Not Found
Remote Address:[::1]:8081
Referrer Policy:no-referrer-when-downgrade
Response:
Cannot GET /components/home.html
But it is working on linux machine perfectly. We are using .Net web api so we want to use one machine for both application.
Any help is appreciated. Thanks!
If you have tested on Linux and it works, I would say it is a configuration in paths the server that it is serving the assets. If you are using Express or Webpack to serve you React code, they have good support for Windows, so probably is a local configuration issue.
Try checking for any static paths, e.g. ./foo/bar and replacing them with a more Windows-friendly syntax, for example:
const path = require("path")
path.join("foo", "bar")
I am developing a Google App Engine application with IntelliJ idea, the app is running successfully on local machine but when I need to deploy it on my cloud it fails and I get the following error :
Password for myemail#gmail.com:
java.lang.RuntimeException: Bad authentication response: 404 Not Found
Unable to update app: Bad authentication response: 404 Not Found
please see the log
Having checked the log file the content was:
java.lang.RuntimeException: Bad authentication response: 404 Not Found
at com.google.appengine.tools.admin.ClientLoginServerConnection.getAuthToken(ClientLoginServerConnection.java:250)
at com.google.appengine.tools.admin.ClientLoginServerConnection.authenticate(ClientLoginServerConnection.java:86)
at com.google.appengine.tools.admin.ClientLoginServerConnection.doHandleSendErrors(ClientLoginServerConnection.java:120)
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:296)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
at com.google.appengine.tools.admin.LoggingClientDeploySender.send(LoggingClientDeploySender.java:47)
at com.google.appengine.tools.admin.ResourceLimits.remoteRequest(ResourceLimits.java:173)
at com.google.appengine.tools.admin.ResourceLimits.request(ResourceLimits.java:139)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:467)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:55)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute(AppCfg.java:1347)
at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:332)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:213)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:124)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:120)
Caused by: java.io.FileNotFoundException: https://www.google.com/accounts/ClientLogin
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1834)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.google.appengine.tools.admin.AbstractServerConnection.connect(AbstractServerConnection.java:133)
at
I also have searched for this error and I think this link should address this issue
Issue 12898: Some AppEngine deploys are failing
I uploaded a picture from the setting up App Engine deployment,
Question : What exactly should I change in order to get it working and successfully deploying on the App Engine Server?
I solved the issue by appcfg.cmd [options] update <war-location> and adding the argument --oauth2 to the command it should have been also solved by updating the sdk versionas mentioned in comments
I've previously worked with J2EE where it's possible to add this configuration to web.xml
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error</location>
</error-page>
The effect of the above code is that if an unhanded exception is thrown, it will be passed to the /error page, which will be shown to the user.
Is there a way to do something similar to this when my Go web application panics on Google App Engine?
Yes, see Custom error responses:
When certain errors occur, App Engine serves a generic error page. You
can configure your app to serve a custom static file instead of these
generic error pages, so long as the custom error data is less than 10
kilobytes. You can set up different static files to be served for each
supported error code by specifying the files in your app's app.yaml
file. To serve custom error pages, add a error_handlers section to
your app.yaml, as in this example:
error_handlers:
- file: default_error.html
- error_code: over_quota
file: over_quota.html
I'm using Google Cloud Endpoints as back end of a mobile application.
Now i want to implement push notifications for the iOS client but can't load the .p12 certificate from an #ApiMethod, get this error message:
Invalid keystore reference. File does not exist:
/base/data/home/apps/s~my-ws/1.379168523188882449/MyCert.p12"
I added the certificate under /src directory but does not seem to recognize it.
I'm using IntelliJ IDEA, Appengine API 1.9.12, javapns (for Push Notifications) and Maven.
Edit
Maybe i made a step forward.
I put the .p12 file under /src/webapp/WEB-INF/ and added
<configuration>...<webResources><resource><includes><include>*.p12</include>
in my pom.xml.
Then i run mvn clean install && mvn appengine:endpoints_get_discovery_doc and inspected the generated myws-1.0-SNAPSHOT.war. Within the .war file there is my MyCert.p12certificate, but i get this error message now:
java.security.AccessControlException: access denied (\"java.io.FilePermission\" \"/WEB-INF/MyCert.p12\" \"read\")"
Could you check the code that is actually loading the cert? It may be that you need to remove a leading slash from the File constructor. This is not an App Engine thing but a java File thing.
Also, unrelated to your solution but helpful, is a thread here on best ways to store p12 files on App Engine.
I am quite puzzled by this behavior.
I have a Java AppEngine instance which makes an http call to a "settings.php" on another server. But I get the following error:
ERROR :
java.io.IOException: Could not fetch URL: http://<3rdpartywebsite>/settings.php
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:138)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:45)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:30)
...
I have tried using URLFetchService and even a simple HttpURLConnection class. Even tried with a different User-Agent and other http headers, but to no avail.
What is baffling is that the same code and website works fine on Local Eclipse Dev environment, works via Browser (can see php text) AND works on the Compute Engine too! Only the Production App Engine throws the "could not fetch" error. Unfortunately this is not a transient error, it fails 10/10 times.
Any idea what could be going wrong or something that I can try?
Thanks, Asim