In Cisco DNA center, version, under System -> Settings -> Trust & Privacy -> Device Certificate and PKI Certificates, you get an error message saying:

Internal Server Error: An unexpected condition was encountered. Please try after the system is restored.

Current solution is to restart pki broker and jboss service from DNAC shell.

magctl service restart -d apic-em-pki-broker-service
magctl service restart -d apic-em-jboss-ejbca

Wait a few minutes after restart and try again.

This is probably related to this bug:

Install npm, Puppeteer and dependencies:

apt update -y && apt upgrade -y
apt install -y npm
apt install -y libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxi-dev libxtst-dev libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 libgbm1
npm install -g n
n lts
hash -r
npm install puppeteer

Install Chrome without snap:

apt install ./google-chrome-stable_current_amd64.deb

Make a test file test.js:

const puppeteer = require('puppeteer');
const fs = require('fs');

async function run () {
  const browser = await puppeteer.launch({
    executablePath: '/usr/bin/google-chrome-stable',
    args: ['--no-sandbox'],
    defaultViewport: {width: 1920, height: 1080}
  const page = await browser.newPage();
  await page.goto('');
  await sleep(3000);

  await page.screenshot({path: 'screenshot.png'});
  const html = await page.content();
  fs.writeFileSync('source.htm', html);


function sleep(ms) {
  return new Promise((resolve) => {
    setTimeout(resolve, ms);

Test it:

node test.js