Error when trying to end visit after adding info to visit

Hello.

I am having an error when trying to end visits. After I input information (like vitals or an attachment), the visit cannot be ended. I get a JSON.parse error:

I am using version 2.12.2 standalone.

Are you able to reproduce it here? https://qa-refapp.openmrs.org/

No sir. The demo works as intended