Giter VIP home page Giter VIP logo

Comments (7)

ademidun avatar ademidun commented on September 25, 2024

Why not just use the rendertron's demo endpoint: https://render-tron.appspot.com/ as a temporary fix instead of using our own endpoint

A demo Rendertron service is available at https://render-tron.appspot.com/. It is not designed to be used as a production endpoint. You can use it, but there are no uptime guarantees.

source
Tutorial mentions that as well: https://angularfirebase.com/lessons/seo-angular-part-1-rendertron-meta-tags/

from atila-angular.

ademidun avatar ademidun commented on September 25, 2024
  • Another solution is to possibly modify rendertron's app.yaml:

    1. Which is "better" for our use case, standard or flexible environment? What's the similarities and differences between standard and flexible (note that page is not available for nodejs)
    2. Reduce min_instances to zero (if using flexible)
    3. Change from flex to standard environment
    4. Change instance class.
  • It seems like flexible is more customizable and is useful for more longer, cpu and memory intensive tasks

  • For something "quick and easy" like prerendering web pages it seems like standard engine is a better option and we should probably go with opton 4:

from atila-angular.

ademidun avatar ademidun commented on September 25, 2024

Okay so to summarize:

  1. Use the quick and dirty fix of using the demo endpoint for now

  2. When I go back home, I will get the original server code that was used to deploy to rendertron and push to Github and redeploy our own app engine server by doing the following:

  3. Change from flex to standard environment

  4. Change the instance class to the cheapest standard instance class

  5. Monitor the effect it has on performance

from atila-angular.

ademidun avatar ademidun commented on September 25, 2024

Trying to load the frontend resources through rendertron is causing a CORS error. I suspect that it might be because of the service workers?

Access to manifest at 'https://atila-7-staging.firebaseapp.com/manifest.json' from origin 'https://atila-7-staging.appspot.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Screen Shot 2019-08-10 at 6 35 19 PM

To make things even more confusing, some resources are passing by CORS and others are not

  • landing page gifs are passing by CORS

  • Fonts .woff files and manifest.json are not passing CORS

  • maybe it is an issue with my ngsw-config.json?

Screen Shot 2019-08-10 at 6 38 57 PM

This tutorial suggests solving it by using something called foreign fetch: but that is now deprecated.

THe confusing part is that the main atila-7.appspot rendering engine seems to be working fine. It also fails on other resources but doesn't seem to request manifest.json which is why it doesn't fail

from atila-angular.

ademidun avatar ademidun commented on September 25, 2024

I noticed the page still renders as long as manifest.json gets loaded after all the other files

from atila-angular.

ademidun avatar ademidun commented on September 25, 2024

Steps to reproduce the bug:

  1. Initial startup of app engine instance (occurs after sleeping or new version is deployed)

  2. If the first url visited is not root, then manifest.json will be requested, it will fail because of CORS, then the rest of the app won't load.

from atila-angular.

ademidun avatar ademidun commented on September 25, 2024

The now deprecated rendertron server can be found in this repo: https://github.com/ademidun/atila-angular-server-old

from atila-angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.