NodeJS Forge viewer error on Google App Engine - google-app-engine

I've deployed my Forge viewer app based on the View BIM 360 & Fusion models tutorial, and I'm having trouble with authentication on Google App Engine.
Having set my callback URL to https://forgeviewer-218710.appspot.com/api/forge/oauth/token, the autentication does not work.
Is this because I need to set my ID, secret, & callback URL in the app.yaml file that App Engine uses to deploy? Or am I way off track?

I tried run your app, but got Error : 400 - Invalid redirect_uri, which means that the Callback URL on the Developer Portal is different from the one your specified on your app.
On the tutorial, at Create an app section, we use http://localhost:3000/api/forge/callback/oauth, but when creating the Forge app that you'll use on your live app, you should use the live version, in this case https://forgeviewer-218710.appspot.com/api/forge/callback/oauth (which is different from what you specified on your question, so please adjust).
To summarize, the callback url MUST match on Forge app registration and on your app live (assuming you have Nodejs, on the FORGE_CALLBACK_URL environment variable). Sorry I don't have experience deploying to Google App Engine.

Related

Google App Engine Custom Admin Pages in the New Google Cloud Console

I'm a Google App Engine user, and I got this message saying the old app engine console will be retired by the end of March.
However - as it seems, there is no place in the Google Cloud Console (which is supposed to be the only available console to manage App Engine projects) to access and use the custom admin pages used to manage the project.
Does anyone know what is up with that?
Thanks,
-Lior

How do I serve an app engine version via subdomain when my app runs through Google Apps?

I'm trying to use a subdomain to serve a matching version id with Google App Engine and Google Apps. I've gone through the documentation but it's still unclear to me.
On this page regarding custom domains, it says I'm in a special case for using Google Apps. test.example.com -> to load "test" version of the application.
https://cloud.google.com/appengine/docs/domain -
Note that the instructions on this page are for App Engine apps that use an ordinary HTTP connection and are not served through Google Apps. Here are some related procedures that require different instructions:
This leads me to here https://support.google.com/a/answer/91080
It looks like the only way to add this subdomain in Google Apps is the Sites URL field.
Will the Sites URL correspond to the App Engine version ID?
You only need to use Google Apps to map an appengine app to a domain if you need https. Right now, Google Apps is the only way you can upload an SSL cert - hence this restriction.
If you do map your appengine app to a domain through google apps, you can do what you want by using wildcard subdomain mapping. Read more here..
The whole process is tedious, slow, and painful, and thats only when its not confusing, so put aside a good few hours to make all the changes and wait for DNS to propagate.

Unable to Remove (Deleted) App Engine Service from Google Admin Dashboard

I recently deployed a Google App Engine app and then set up a custom URL for it from my Google Apps Admin dashboard. Everything ok until the app engine app was deleted (it is no longer listed on my developer console): I would now like to remove it from my admin dashboard to reclaim the custom URL for a different GAE app.
From the admin dashboard, I go into "App Engine Apps" and select the one I want to remove. If I click "delete" on the web address I would like to reclaim, I get "We are unable to process your request at this time. Please try again later." (and this has been happening for days). If, instead, I try to delete the service altogether, when I click to confirm I receive "You do not have the permissions necessary to uninstall this application."
I found this question which suggests getting in touch with the Google Apps help center. After doing that, I received the following:
Our Google Apps team offers support for the core suite of Google Apps services defined at http://www.google.com/apps/intl/en/terms/user_features.html. The issue you’ve experienced is currently outside the scope of our support offering and we won’t be able to offer you further direct assistance at this time.
Does anyone know how I can remove the (deleted) app engine app from my admin console, to reclaim the custom URL?
Following from #Patrice's suggestion, I managed to resolve this from the app engine console (note: not the app admin console, where I was focusing all my efforts/receiving all those cryptic error messages).
I followed the instructions here to add a custom URL in the app engine console . After verifying my domain, I added my custom URL to my new app engine project. When I clicked to confirm, I got some warning saying that this custom URL is currently pointing to another app engine app and that by confirming, it would no longer point there.
I clicked confirm, and now everything is working.

Google App. Engine - Hosting our Web Application

All,
We are trying to host our web application on Google App. Engine with little success.
Here are the specifics:
The web application is built on HTML5, SVG & Javascript. We are using python 2.6 for upload. We initially used the following tutorial for upload but are getting errors once its uploaded.
Link to tutorial: http://www.labnol.org/internet/host-website-on-google-app-engine/18801/
We are getting errors in the appcfg.py python file. We are totally clueless how to go about using this so any guidance would be awesome, tutorials would be even more so.
UPDATE: Further to the outcry and Milimetric's helpful post, here is more detail:
We have managed to upload the web application onto the Google App Engine. Going into the dashboard, we can see the application is running (we can see the instance graphs and CPU stats), however, when we execute the custom link to the web application, we only get the 'Hello World' message.
We followed the tutorial by Milimetric & Rolled back the 'appcfg.py' to original state. Following the tutorial, we only made changes to the 'app.yaml' (inserted our application name). We didnt write any custom python script.
We are not getting any errors anywhere, only the message 'Hello World' upon executing the link in the browser window.
Hope the above is more useful.
Cheers,
If any of the following is redundant (or you already went through the steps), let me know and I'll edit. Just didn't know where to start or how familiar with app engine you were.
That tutorial will set up a functional app engine site. Were you able to get that running without any errors before adding your own code? Try running it locally with the launcher (localhost:8080 by default).
To add code, you have to start with the main.py file from the tutorial. Google app engine applications use the google.appengine.ext.webapp namespace to get started and listen to requests. In main.py, start with MainHandler and add code there.
To add more "routes" to your app, look at the WSGIApplication constructor: webapp.WSGIApplication ([('/(.*html)?', MainHandler)], debug=True) from their tutorial. So for example, you can have a route go to contact-us like this: webapp.WSGIApplication ([('/(.*html)?', MainHandler), ('/contact-us', ContactUsHandler)], debug=True).
As far as tutorials, the google app engine "Getting Started" tutorial is a good primer to get you in the mindset: http://code.google.com/appengine/docs/python/gettingstarted/
Google app engine is a cloud computing technology and it is designed for developing and hosting web applications it supports APIs, and frameworks. To solve this issue you ha eto understand app engine completely so to learn more about app engine visit the link above:
http://en.wikipedia.org/wiki/Google_App_Engine

What is the admin url in an App Engine application?

I once used a page automatically created by App Engine SDK to view the database contents and other info, but I lost the URL. Do you know it? Does it work in production?
The development console url is http://localhost:8080/_ah/admin/.
It does not work in production, but you can use GAE's dashboard in this case: https://appengine.google.com/.
Dev server's documentation is available here.
It's http://appengine.google.com/ if you're not using Google Apps.
Otherwise, it's http://appengine.google.com/a/<your-domain>
There is a section on Data there that includes the Datastore viewer, indexes, etc..
In case you found this answer and you're using App Engine SDK 1.7.6 or higher, the default URL has changed from localhost:8080/_ah/admin to localhost:8000.

Resources