GoogleChrome / rendertron

A Headless Chrome rendering solution

Home Page:https://render-tron.appspot.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rendertron returning base href of Angular application as "https://null"

opened this issue · comments

Rendertron version: 3.1.0
Angular version: 11.2.14

I have Rendertron running in an azure container and being accessible through the URL of an azure App Service. I am using Firebase cloud functions to divert traffic to this based on https://github.com/justinribeiro/pwa-firebase-functions-botrender/blob/master/functions/index.js

When I use the app service from Azure, the base href gets written to "https://null" which causes a bunch of issues in trying to find assets from relative URLs. The base href is usually '/'

<base href="https://null">
Example of errors I get because of this:

aEhtQi9K2tljTpIw6lHk:36 GET https://null/assets/styles/cookieconsent.min.css net::ERR_NAME_NOT_RESOLVED
aEhtQi9K2tljTpIw6lHk:40 GET https://null/styles.7723db603dedc70e2fc3.css net::ERR_NAME_NOT_RESOLVED
aEhtQi9K2tljTpIw6lHk:66 GET https://null/assets/img/logo.svg net::ERR_NAME_NOT_RESOLVED
null/assets/site.webmanifest:1 GET https://null/assets/site.webmanifest net::ERR_NAME_NOT_RESOLVED
null/assets/favicon-32x32.png:1 GET https://null/assets/favicon-32x32.png net::ERR_NAME_NOT_RESOLVED
null/assets/favicon-16x16.png:1 GET https://null/assets/favicon-16x16.png net::ERR_NAME_NOT_RESOLVED

Somethings I have tried:

  1. Using the rendertron demo that is available at https://render-tron.appspot.com/
    Result: It page renders correctly. The base href gets written as the full domain name.

  2. Using a locally running container of my docker image on my laptop
    Result: It page renders correctly. The base href gets written as the full domain name.

This issue only seems to be occurring from the instance running in Azure. I have tried upgrading the service plan but that didn't seem to have an effect.
The original plan was P1V2 (which didn't seem to be getting overwhelmingly utilized)
I upgraded up to P3V2 but it didn't appear to cause any different behavior.

I have looked at the logs of my firebase function and it doesn't look like it surpassing the 10 second time limit (but I could be wrong) and I am not sure if that could be the culprit anyway.

Nonetheless, the page does render but not correctly since the relative urls are broken.

I would sincerely appreciate any help you have.

Thank you.

Same here

In general, as we're deprecating the project, you should look into alternative approaches to rendering on the web.