Error in Purchase Order Form View: JSON.parse SyntaxError at Line 1

When I open any of my Purchase Order forms, it does not display the form view and shows this error in the console: “SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data.” Could someone please guide me on how to solve this issue?

See in the below image

Hi,

Is this happening on first use of ERPNext or have there been customizations? If it is the first time ERPNext is being used , please describe the operating environment and instructions followed to install.

Also check if any listview client script was applied or not. if applied, then remove/comment out it and check it.

Let me explain the complete story. Basically, what happened is that I just migrated my site from version 14 to 15. All the forms are working fine, but this issue is happening only in the Purchase Order form. Additionally, there are no scripts applied to the Purchase Order list.

If a new PO is added does the same message appear? Or is the PO in the list not one from before the upgrade to 15?

The issue is related only to the Purchase Order form. I am unable to create any Purchase Orders on this site or view any previously created forms. When I try to create and save a new Purchase Order, it shows me this error.

What do bench version and bench --version return?

bench version

Screenshot from 2024-12-02 18-03-03

bench --version

image

Try: pip3 install frappe-bench --upgrade and bench update, then bench restart to bring things up to date, and see if that helps.

bench --version
5.23.0
erpnext 15.44.0
frappe 15.48.1
payments 0.0.1