[Bug] HTML Push Analytics Job fails with "Invalid dashhboard UID 'undefined'" in DHIS2 v2.43 (despite correct API configuration)

Hi DHIS2 Community,
I am trying to set up the new native HTML Push Analytics feature on a DHIS2 v2.43 instance, but the Job Scheduler consistently fails with a 400 Bad Request because it sends “undefined” as the dashboard UID to the Push Analytics service.

Below are the details of my setup, the troubleshooting steps I’ve already taken, and the relevant logs.

  • DHIS2 Version: 2.43 (running on Ubuntu Server)
  • Push Analytics Service: Latest version from dhis2/push-analytics GitHub repository.
  • Node.js: v20.x (LTS)
  • Database: PostgreSQL

And these are the steps I followed:

  • Installed Node.js 20.x and all required Puppeteer/Chromium system dependencies : Service starts successfully and listens on http://127.0.0.1:1337.
  • Created a dedicated DHIS2 user (user.push) with a custom role containing only ( but Later I also tried an user with ALL authority, It didn’t change the outcome).
  • Configured dhis.conf to allow user impersonation: switch_user_feature.enabled = true, switch_user_allow_listed_ips = 127.0.0.1, max.sessions.per_user = 100
  • Set the system setting via API: keyHtmlPushAnalyticsUrl = “http://127.0.0.1:1337”
  • Verified the service works manually: curl “http://127.0.0.1:1337/?dashboardId=WSzJ482amYh&username=user.push&locale=en” returns the correct HTML.

After all that, this is the catalina.out log:

  • ERROR 2026-10-15T17:45:21,034 400 Bad Request on GET request for “http://127.0.0.1:1337”: “REQUEST HANDLER ERROR (E1502): Invalid dashhboard UID “undefined”” (DefaultNotifier [pool-4-thread-1])
    …
    org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request on GET request for “http://127.0.0.1:1337”: “REQUEST HANDLER ERROR (E1502): Invalid dashhboard UID “undefined””
    at org.hisp.dhis.pushanalysis.scheduling.HtmlPushAnalyticsJob.getPushAnalyticsHtmlBody(HtmlPushAnalyticsJob.java:197)

Is this a known issue for DHIS2 v2.43?
Any insights would be highly appreciated!
Thank you.

Hi @Eve_Amour,

Thanks for including your settings, they helped us determine the cause!

The keyHtmlPushAnalyticsUrl setting isn’t just the address of the push analytics service. It’s a URL template with placeholders that DHIS2 fills in each time the job runs. With only http://127.0.0.1:1337, DHIS2 calls the service without a dashboard, user or locale, which gives the “Invalid dashboard UID undefined” error.

Please change the setting to:

http://127.0.0.1:1337/?dashboardId={id}&username={username}&locale={locale}

Type {id}, {username} and {locale} exactly like that, with the curly braces. Don’t put a real dashboard ID or username in. DHIS2 swaps them for the dashboard from the job and each user in the receiving group. Then re-run the job.

The same error was reported on 2.41.8.1 here: HTML Push Analytics Job Fails in v2.41.8.1 (400 Bad Request / Invalid dashboard UID "undefined". We’re making the error message point to this setting and adding it to the push analytics documentation in this pull request: fix: explain the keyHtmlPushAnalyticsUrl template when a request has no query parameters by karolinelien · Pull Request #96 · dhis2/push-analytics · GitHub.

Let us know if it works!

We would also be very interested in hearing your usecase for the push analytics functionality. Feel free to write about that here or send me a direct message/email (karoline@dhis2.org)

Thanks,
Karoline
DHIS2 Product Manager