# Bahmni connect Sync issues

**URL:** <https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515>\
**Category:** Bahmni\
**Tags:** bahmni-connect\
**Created:** [April 16, 2018, 12:20pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515 "2018-04-16T12:20:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_22734026db12803ebb3e059622ac3534.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [April 16, 2018, 12:20pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/1 "2018-04-16T12:20:58Z")

</div>

Hi, One of the implementations using Bahmni connect for sometime had reported couple of sync issues listed below. This causes the whole sync to be blocked.

1. Issue with catchment 1 at the time of initial sync:

The initial sync gets stuck at a particular point with the progress bar doing back and forth but nothing progressing really. Refer the screenshot for what the screen and chrome console shows.

 ![catchment1_issue1](https://talk.openmrs.org/uploads/default/original/2X/c/c0e2776735ce6bf413e0393e813bb945bea21281.png)

1. Issue with catchment 2 at the time of upload sync after capturing some data in offline ![catchment2_issue2](https://talk.openmrs.org/uploads/default/original/2X/f/fb2ad5968d96c043989575f02cab71fb36a0c510.png)

Any suggestion on how to go about investigating these issues?

Also, i think the sync shouldn’t get blocked if some error is encountered. It should complete the sync and in the end present a report showing a list of patients not synced and errors associated with them.

---

<div class="post-metadata">

**Author:** ![ouiliam](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ouiliam/32/6415_2.png) [@ouiliam](https://talk.openmrs.org/u/ouiliam)\
**Post date:** [April 18, 2018, 12:08pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/2 "2018-04-18T12:08:54Z")

</div>

I noticed that when there is a problem patient, it still seems to sync the other patients, but I definitely agree a report showing unsynced patients and errors is necessary.

I had sync issues when using duplicate secondary IDs

> [@Bahmni Connect not checking for duplicate patient identifiers, duplicate patient gets corrupted on SYNC](https://talk.openmrs.org/t/bahmni-connect-not-checking-for-duplicate-patient-identifiers-duplicate-patient-gets-corrupted-on-sync/17565):
>
> We use a secondary patient ID, but in Bahmni Connect, there is no checking occurring that the ID entered does not already exist. It lets you create a user with an already existing ID. This can lead to problems in SYNC, where the duplicate ID patient created in Connect can become corrupted, and then it’s not even possible to change the ID to enable SYNC any more, with the following error: [pasted image 0]

---

<div class="post-metadata">

**Author:** ![sumanmaity112](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sumanmaity112/32/4608_2.png) [@sumanmaity112](https://talk.openmrs.org/u/sumanmaity112)\
**Post date:** [May 10, 2018, 12:59pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/3 "2018-05-10T12:59:08Z")

</div>

Hi @arjun, Can you check the network call, for which its throwing the error. Also re-upload the 2nd image

---

<div class="post-metadata">

**Author:** ![ouiliam](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ouiliam/32/6415_2.png) [@ouiliam](https://talk.openmrs.org/u/ouiliam)\
**Post date:** [May 12, 2018, 6:57pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/4 "2018-05-12T18:57:27Z")

</div>

![image](https://talk.openmrs.org/uploads/default/original/2X/f/f7f5f8ebab002caea447502cb847ec166d781d8f.png)

---

<div class="post-metadata">

**Author:** ![ouiliam](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ouiliam/32/6415_2.png) [@ouiliam](https://talk.openmrs.org/u/ouiliam)\
**Post date:** [May 12, 2018, 6:57pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/5 "2018-05-12T18:57:50Z")

</div>

```
Request URL: https://localhost/openmrs/ws/rest/v1/bahmnicore/patientprofile/
Request Method: POST
Status Code: 400 Bad Request
Remote Address: [::1]:443
Referrer Policy: no-referrer-when-downgrade
Cache-Control: max-age=0, no-store
Connection: close
Content-Encoding: gzip
Content-Type: application/json;charset=UTF-8
Date: Sat, 12 May 2018 18:54:02 GMT
Server: Apache-Coyote/1.1
Set-Cookie: reporting_session=B5B69E80EFD2B8E02E753A26A81F5CB3; path=/; domain=localhost; expires=Wed, 11-Jul-2018 18:54:01 GMT; secure; HttpOnly
Transfer-Encoding: chunked
Vary: Accept-Encoding
Accept: application/json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en;q=0.9,es;q=0.8
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 2516
Content-Type: application/json
Cookie: JSESSIONID=B5B69E80EFD2B8E02E753A26A81F5CB3; bahmni.user.location=%7B%22name%22%3A%22impl.balat%22%2C%22uuid%22%3A%22265e0732-aa46-4993-bf8b-c85bed90a70d%22%7D; bahmni.user=%22superman%22; app:clinical:grantProviderAccessData=%7B%22uuid%22%3A%22c1c26908-3f10-11e4-adec-0800271c1b75%22%7D; user.platform=%22chrome-app%22; app%3Aclinical%3AgrantProviderAccessData=%7B%22uuid%22%3A%22c1c26908-3f10-11e4-adec-0800271c1b75%22%2C%22display%22%3A%22superman%20-%20Super%20Man%22%2C%22links%22%3A%5B%7B%22rel%22%3A%22self%22%2C%22uri%22%3A%22http%3A%2F%2Flocalhost%2Fopenmrshttp%3A%2F%2Flocalhost%2Fopenmrs%2Fws%2Frest%2Fv1%2Fprovider%2Fc1c26908-3f10-11e4-adec-0800271c1b75%22%7D%5D%2C%22name%22%3A%22Super%20Man%22%7D; reporting_session=B5B69E80EFD2B8E02E753A26A81F5CB3
Disable-WWW-Authenticate: true
DNT: 1
Host: localhost
Origin: https://localhost
Pragma: no-cache
Referer: https://localhost/bahmni-connect/home/index.html
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36
{,…}
patient
:
{person: {names: [{givenName: "b", familyName: "b", display: "b b", preferred: false,…}],…},…}
relationships
:
[]
```

---

<div class="post-metadata">

**Author:** ![mksd](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksd/32/11729_2.png) [@mksd](https://talk.openmrs.org/u/mksd)\
**Post date:** [August 21, 2018, 9:41am UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/6 "2018-08-21T09:41:31Z")

</div>

See also

- [BAH-605](https://bahmni.atlassian.net/browse/BAH-605) - _Clicking on Sync On Bahmni Connect gives an error saying “There was an unexpected issue on the server”_

@ouiliam @mksrom could you both look at the above ticket and report either here or there whether this looks like anything we ever came across?

---

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [August 23, 2018, 1:50pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/7 "2018-08-23T13:50:54Z")

</div>

@mksd, this does not remind of any of the issues we had.

---

<div class="post-metadata">

**Author:** ![ouiliam](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ouiliam/32/6415_2.png) [@ouiliam](https://talk.openmrs.org/u/ouiliam)\
**Post date:** [September 27, 2018, 12:40pm UTC](https://talk.openmrs.org/t/bahmni-connect-sync-issues/17515/8 "2018-09-27T12:40:05Z")

</div>

Maybe you have to log in at least once to Bahmni Online first.
