Rules engine throws an error cannot load tasks, performance, contacts

Hey y’all I am experiencing an odd error

I can view Messages and Reports tab. However, I cannot view Tasks, Contacts and Performance.

When I click on Tasks and Performance I see this error

When I visit Contacts I see this

In the browser console I see two errors

feedback.service.ts:179 Error selecting contact Error: Rules Engine: Rules are not declarative.
Updates are required. 
at Object.<anonymous> (provider-wireup.js:35:13) at Generator.next (<anonymous>)
at Object.initialize (provider-wireup.js:33:13)
at Object.initialize (index.js:31:48)
at rules-engine.service.ts:126:32

and

Error fetching relevant forms TypeError: Cannot read properties of null (reading ‘doc’)
at contacts-content.component.ts:388:82
at Array.map ()
at contacts-content.component.ts:386:42
at xml-forms.service.ts:332:26

There are several things that make this error puzzling.

  1. I don’t see any error in the api-logs.
  2. The errors only appear when I login as a chw, but when I login with the medic admin, the components load fine.
  3. Last week, the chw could login just fine.
  4. I’ve tried changing DBs but I get the same behavior.
  5. The same config / branch is working fine in another instance, it seems it’s something not quite right with my local instance.

Anyone with an idea what could be causing this issue?

Hi @Ben_Kiarie

This is due to Make declarative config mandatory · Issue #5906 · medic/cht-core · GitHub being merged to latest master.
Can you please recompile your configuration using the latest cht-conf and push it to your instance?

Thanks Diana. I’ll do that and report back.

That worked … also just going back to 4.21.x branch worked so that i can mirror the deployed instance

2 Likes