While downloading the PDF seeing the error:RendererNoRenderFinishedEventReceivedError – retried.
Issue Description:
While downloading the PDF seeing the error:RendererNoRenderFinishedEventReceivedError – retried.
Root Cause:
The issue can have multiple causes but we discuss the render process and some of the known potential problems.
When a PDF of the dashboard is created, the way it works is as follows:
- Looker receives the request.
- Looker creates a virtual Chrome session.
- In the virtual Chrome session, chrome is opening up the dashboard.
- When Chrome gets to the dashboard, Chrome is doing the equivalent of right-clicking in the browser, selecting print and printing as a PDF.
- In other words you can 'simulate' what Looker does by going to the dashboard in Chrome, right-clicking the page and selecting print and printing as a PDF to file.
- The approach is somewhat beneficial as it makes it easy to 'render' the pdf without a lot of customer libraries, etc.
- When a dashboard is loaded by a user, or by the virtual Chrome session, API calls may be made by the browser that go to external endpoints. The main ones would be:
- ping.looker.com - This is a telemetry endpoint. The information sent is very basic. (i.e. did the dashboard load, how long did it take, etc. No data about the content of the dashboard. And you can inspect this yourself.)
- In 21.10.X versions, some visualizations were disabled via a cdn network as java script files. This is not done in the latest versions of 22.X and above.
- If the machine where the looker instance is running has no internet access, the endpoints like ping.looker.com will fail to load. Additionally the virtual Chrome session will not try to print the dashboard as a PDF until the dashboard is fully 'loaded'. It does not consider the dashboard loaded until all api calls are complete.
- This means that the virtual chrome session is waiting for ping.looker.com to load, but because it never loads the dashboard never 'completes' and the virtual Chrome session never tries to print the dashboard as a PDF.
In newer versions (all the latest 22.X versions and above) there is a flag for Looker that disables the virtual Chrome sessions' attempts to contact external endpoints like ping.looker.com. When it encounters them it skips them. This flag is enabled so that no calls are made to this endpoint. For older versions, sometimes the flag has to be enabled.
Diagnosing:
- Check for the following kernel setting
- Run: sudo sysctl -a | grep user.max_user_namespaces
- If the returned value is zero for the setting, it must be increased
- This should be brought up with the linux admin. This is a kernel setting and they should be the ones to change it. Its used as part of the rendering process
- In testing environments, the default is usually: 127821
- If unsure what to set it to, check to see what similar settings are set to:
- Run: sudo sysctl -a | grep namespaces
- See the below output:
user.max_cgroup_namespaces = 127821 user.max_ipc_namespaces = 127821 user.max_mnt_namespaces = 127821 user.max_net_namespaces = 127821 user.max_pid_namespaces = 127821 user.max_user_namespaces = 127821 user.max_uts_namespaces = 127821
- In the above, based on the other settings, we can assume that 127821 is the desired setting
- To change the setting run: sysctl -w user.max_user_namespaces=127821
- After the change run: sudo docker restart looker-container
- This setting will probably not persist and your sys admin should be consulted
- Another possibility is that failures can occur in airgapped environments
- This issue was discovered in the 22.4.X release. Make sure to check the release notes to see if this applies.
- Create and run the following script on the Linux machine:
#!/bin/bash # Step 1: Exec into the container sudo docker exec -it looker-container /bin/bash -c " # Step 2: Create a backup of the original file cp /app/startup.sh /app/startup.sh.bkup # Step 3: Run the sed command to update the file sed -i '/export METAMEM=\"1000m\"/a export DISABLE_EXTERNAL_RENDER_ACCESS=\"true\"' /app/startup.sh " sudo docker restart looker-container
- After the above changes, verify if the issue still occurs. If the error occurs, follow the following KB - How To Collect All Looker Logs For Insights?, to gather the logs and raise a ticket with the UiPath Support Team.