New custom Report just keeps on loading (recent behaviour, possible bug?)

Hi,

I am used to create new Reports just fine, using type “Report Builder”.

For example,

However, since two months ago, it seems that this is not working. My setup is similar.

But after clicking “Show Reports”, this page just keeps on loading and I cannot even get to the steps to play around with adding new columns etc.

Is there something wrong with new releases etc? I have tried logging in as Admin, but no difference. Report Builder type should be available to non-Administrator.

Thank you.

Best Regards,

William J

Please check browser console for error.

Hi @saurabh6790,

Thank you. I am getting similar errors.

Report: involving “Delivery Note”.
desk#Report/Delivery Note/Machine Delivery Report:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at report.min.js:1
at Object.callback (desk.min.js:555)
at Object.callback [as success_callback] (desk.min.js:134)
at 200 (desk.min.js:136)
at Object. (desk.min.js:141)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at z (jquery.min.js:4)
at XMLHttpRequest. (jquery.min.js:4)

Another Report, involving Item.
VM1554:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at report.min.js:1
at Object.with_doc (desk.min.js:555)
at report.min.js:1
at Object.callback (desk.min.js:552)
at Object.callback [as success_callback] (desk.min.js:134)
at 200 (desk.min.js:136)
at Object. (desk.min.js:141)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)

Another Report, involving Task.
Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at report.min.js:1
at Object.with_doc (desk.min.js:555)
at report.min.js:1
at Object.callback (desk.min.js:552)
at Object.callback [as success_callback] (desk.min.js:134)
at 200 (desk.min.js:136)
at Object. (desk.min.js:141)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)

Please share if have any ideas.

Thank you.

Best Regards,

William J

Hi,

Please find more details.

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data[Learn More] report.min.js:1:602

frappe.views.ReportViewPage<.init/</< https://adikons.erpnext.com/assets/js/report.min.js:1:602
.with_doc https://adikons.erpnext.com/assets/js/desk.min.js:555:190
frappe.views.ReportViewPage<.init/< https://adikons.erpnext.com/assets/js/report.min.js:1:503
.with_doctype/<.callback https://adikons.erpnext.com/assets/js/desk.min.js:552:11
frappe.call/callback https://adikons.erpnext.com/assets/js/desk.min.js:134:31
frappe.request.call/statusCode[200] https://adikons.erpnext.com/assets/js/desk.min.js:136:127
frappe.request.call/< https://adikons.erpnext.com/assets/js/desk.min.js:141:85
n.Callbacks/i https://adikons.erpnext.com/assets/frappe/js/lib/jquery/jquery.min.js:2:27146
n.Callbacks/j.fireWith https://adikons.erpnext.com/assets/frappe/js/lib/jquery/jquery.min.js:2:27914
z https://adikons.erpnext.com/assets/frappe/js/lib/jquery/jquery.min.js:4:12057
.send/c/< https://adikons.erpnext.com/assets/frappe/js/lib/jquery/jquery.min.js:4:15619

Thank you.

Please share JSON field value from report page

Hi @saurabh6790,

This is the line from view-source:https://adikons.erpnext.com/assets/js/report.min.js that is causing the problem. I am not sure how to read the result coming out fom frappe.getdoc() as bolded below.

frappe.views.ReportFactory=frappe.views.Factory.extend({make:function(route){new frappe.views.ReportViewPage(route[1],route[2]);}});frappe.views.ReportViewPage=Class.extend({init:function(doctype,docname){if(!frappe.model.can_get_report(doctype)){frappe.show_not_permitted(frappe.get_route_str());return;};this.doctype=doctype;this.docname=docname;this.page_name=frappe.get_route_str();this.make_page();var me=this;frappe.model.with_doctype(this.doctype,function(){me.make_report_view();if(me.docname){frappe.model.with_doc(‘Report’,me.docname,function®{me.parent.reportview.set_columns_and_filters(JSON.parse(frappe.get_doc(“Report”,me.docname).json));me.parent.reportview.set_route_filters();me.parent.reportview.run();});}else{me.parent.reportview.set_route_filters(true);me.parent.reportview.run();}});},make_page:function(){var me=this;this.parent=frappe.container.add_page(this.page_name);frappe.ui.make_app_page({parent:this.parent,single_column:true});this.page=this.parent.page;frappe.container.change_to(this.page_name);$(this.parent).on(‘show’,function(){if(me.parent.reportview.set_route_filters())

Please let me know if there are other details needed.

Thank you.

Best Rgds,
William J