Bahmni Connect (0.89) : Initial sync failed error "Cannot read property 'levelId' "

I am using bahmni 0.89 ,I had configured Bahmni connect with Location based sync strategy and it was working well earlier.

For the functionality purpose I have added 6 level address hierarchy.

Actually i was trying to setting up bahmni connect 0.89 android app then i got following error as “Initial sync failed”

After that i tried setting up bahmni connect on progressive web app for the first time synchronization it is giving following error

Any idea to resolve this problem?

Please refer to this documentation https://bahmni.atlassian.net/wiki/spaces/BAH/pages/325713930/Setup+Bahmni-Connect+Using+Location+Based+Strategy and check whether you have missed any steps while configuring bahmni connect.

Same Problem Encountered here… as LocationBasedStrategy…

and Notice Error on OpenMRS Module

Can anyone help me please to solve this problem. Thank you!

Hello @ryanopenmrs ,

Please map well the Address with login location and set user_generated_id in openmrs database table " address_hierarchy_entry"

For configuring location based strategy have you gone through with the link mentioned by @hanishap (link here) .

Have look on Bahmni wiki page for more details of Bahmni connect configuration.

Is there anything wrong with mapping with the Address?

Here is the Location Management for the Login:

Thank you. Please guide me to solve this.

Here is my Address Hierarchy:

Also is it important that the Bahmni Offline Sync Module is Running? There is an error such as this:

How can I fix this? Thank you. (Bahmni Offline Sync OMOD Already been Fixed! - but I dont know how… )

Even on https://demo.mybahmni.org/bahmni-connect/offline/index.html#/initSync has error on it…

Attention to all admins of Bahmni Connect, please fix the errors. Thank you!

Thank you @amolsatvix, for helping to fix this error…

It was solve thru:

  1. deleting the records with all address in the category in the mysql database: delete from event_records where category like ‘%address%’; delete from event_log where category like ‘%address%’;

  2. inserting the addresshierarchy.sql command: Insert into event_records(uuid, title, timestamp, uri, object, category) (select uuid(), ‘addressHierarchy’, ‘1970-01-01 00:00:01’, concat(’/openmrs/ws/rest/v1/addressHierarchy/’,uuid), concat(’/openmrs/ws/rest/v1/addressHierarchy/’,uuid), ‘addressHierarchy’ from address_hierarchy_entry);

  3. restart the bahmni-event-log: (check status) service bahmni-event-log-service status (stop) service bahmni-event-log-service stop (check status again - should not be running) service bahmni-event-log-service status (start) service bahmni-event-log-service start (check status again - should be running) service bahmni-event-log-service status

  4. Go to bahmni connect website, Clear Storage, Re-Run… There it should sync…

Kudos to Bahmni Connect and to Sir @amolsatvix… Thank you…