Data import issue with 14.0.0-beta3

There seems to be an issue with data import in ERPNext v14.0.0. As this was working fine with v13.5, this happened somewhere in the current release. This is on a self-hosted solution, and seems to affect any document type:

  • Create a data import for any document type. Choose either Insert New Records or Update existing records.

  • Click on the Download Template button in the next window. Nothing happens, and there is an error in the Javascript console:
    Unable to handle success response
    Object { message: (1) […] }
    request.js:282:12
    console.trace() TypeError: (intermediate value)[e] is not a function
    update_record_count_message Purchase Order Import on 2022-04-22 09:15:30.539064 line 350 > injectedScript:64
    make_dialog Purchase Order Import on 2022-04-22 09:15:30.539064 line 350 > injectedScript:51
    Purchase Order Import on 2022-04-22 09:15:30.539064 line 350 > injectedScript:51
    with_doctype model.js:134
    Purchase Order Import on 2022-04-22 09:15:30.539064 line 350 > injectedScript:51
    download_template data_import__js:224
    require assets.js:17
    eval_assets assets.js:95
    execute assets.js:78
    callback assets.js:129
    e request.js:83
    200 request.js:127
    call request.js:279
    jQuery 6
    call request.js:253
    call request.js:103
    fetch assets.js:119
    execute assets.js:77
    require assets.js:15
    require assets.js:14
    download_template data_import__js:223
    f script_manager.js:30
    s script_manager.js:108
    trigger script_manager.js:126
    promise callbackfrappe.run_serially/< dom.js:265
    run_serially dom.js:263
    trigger script_manager.js:140
    onclick button.js:25
    input button.js:15
    jQuery 8
    make_input button.js:14
    t base_input.js:60
    refresh_input base_input.js:87
    refresh base_control.js:113
    attach_doc_and_docfields layout.js:410
    refresh layout.js:283
    refresh_fields form.js:609
    render_form form.js:549
    promise callback
    frappe.run_serially/< dom.js:265
    run_serially dom.js:263
    render_form form.js:541
    initialize_new_doc form.js:510
    promise callback*initialize_new_doc form.js:507
    trigger_onload form.js:485
    refresh form.js:382
    render formview.js:108
    show_doc formview.js:74
    make_and_show formview.js:32
    make formview.js:15
    with_doctype model.js:134
    make formview.js:12
    show factory.js:25
    render_page router.js:224
    render router.js:203
    route router.js:113
    push_state router.js:376
    set_route router.js:272
    set_route router.js:266
    set_route router.js:448
    setup quick_entry.js:41
    with_doctype model.js:134
    setup quick_entry.js:32
    setup quick_entry.js:31
    make_quick_entry quick_entry.js:18
    new_doc create_new.js:419
    with_doctype model.js:134
    new_doc create_new.js:412
    new_doc create_new.js:408
    make_new_doc list_view.js:270
    setup_new_doc_event list_view.js:1294
    jQuery 2
    request.js:283:12
    call request.js:283
    jQuery 6
    call request.js:253
    call request.js:103
    fetch assets.js:119
    execute assets.js:77
    require assets.js:15
    require assets.js:14
    download_template data_import__js:223
    f script_manager.js:30
    s script_manager.js:108
    trigger script_manager.js:126
    (Async: promise callback)
    run_serially dom.js:265
    run_serially dom.js:263
    trigger script_manager.js:140
    onclick button.js:25
    input button.js:15
    jQuery 8
    make_input button.js:14
    t base_input.js:60
    refresh_input base_input.js:87
    refresh base_control.js:113
    attach_doc_and_docfields layout.js:410
    refresh layout.js:283
    refresh_fields form.js:609
    render_form form.js:549
    (Async: promise callback)
    run_serially dom.js:265
    run_serially dom.js:263
    render_form form.js:541
    initialize_new_doc form.js:510
    (Async: promise callback)
    initialize_new_doc form.js:507
    trigger_onload form.js:485
    refresh form.js:382
    render formview.js:108
    show_doc formview.js:74
    make_and_show formview.js:32
    make formview.js:15
    with_doctype model.js:134
    make formview.js:12
    show factory.js:25
    render_page router.js:224
    render router.js:203
    route router.js:113
    push_state router.js:376
    set_route router.js:272
    set_route router.js:266
    set_route router.js:448
    setup quick_entry.js:41
    with_doctype model.js:134
    setup quick_entry.js:32
    setup quick_entry.js:31
    make_quick_entry quick_entry.js:18
    new_doc create_new.js:419
    with_doctype model.js:134
    new_doc create_new.js:412
    new_doc create_new.js:408
    make_new_doc list_view.js:270
    setup_new_doc_event list_view.js:1294
    jQuery 2

  • Uncollapsing the top line:
    Unable to handle success response
    Object { message: (1) […] }
    gives the following. The relevant error seems to be: "“Sortable.js requires a window with a document”. Unfortunately, this is beyond my understanding to try and address.
    Object { message: (1) […] }

message: Array [ “(()=>{var Ii=Object.create;var Pt=Object.defineProperty;var $i=Object.getOwnPropertyDescriptor;var Ei=Object.getOwnPropertyNames;var Di=Object.getPrototypeOf,Hi=Object.prototype.hasOwnProperty;var jt=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Mi=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ei(e))!Hi.call(o,n)&&n!==t&&Pt(o,n,{get:()=>e[n],enumerable:!(i=$i(e,n))||i.enumerable});return o};var ki=(o,e,t)=>(t=o!=null?Ii(Di(o)):{},Mi(e||!o||!o.__esModule?Pt(t,"default",{value:o,enumerable:!0}):t,o));var zt=jt((ls,ze)=>{(function(e){"use strict";typeof define=="function"&&define.amd?define(e):typeof ze!="undefined"&&typeof ze.exports!="undefined"?ze.exports=e():window.Sortable=e()})(function(){"use strict";if(typeof window=="undefined"||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var e,t,i,n,s,d,h,f,g,x,b,w,S,R,v=[],E=!1,M=!1,W=!1,F=[],q,P,D,V,j,ne,re,be,ve=!1,De=!1,he,He,vt,ce,yt=/\s+/g,U="S…” ]

Thanks.

Regards,
Gora

Thanks for reporting. Can you move this to Frappe’s repo on Github and tag a version 14.0.0 there please?

Will definitely do so later today. Thanks

A fresh install fixed things. Must have been an error that I overlooked in the earlier attempt Thanks to everyone who helped on the Githib bug report: you guys are aweome.

Can you point me to how you were able to install v14? I’ve been trying to install for several days but i keep getting errors at the point of creating new site. I’ve tried both manual install and easy install script and it breaks at the same stage.

Can you point me to how you were able to install v14? I’ve been trying to install for several days but i keep getting errors at the point of creating new site. I’ve tried both manual install and easy install script and it breaks at the same stage.

Am fairly new to ERPNext, and using it on Linux (Ubuntu 20.04). Would be glad to help out on that platform, but would have little idea of installing on Microsoft Windows. Here are my notes on the install, assuming that dependencies like Redis, MariaDB / mysql, etc. are already installed:

node --version
  • Make a OS user for Frappe. I named the user frappe. The user will temporarily need sudo access during the installation process. Install Frappe, and ERPNext as that user:
sudo su - frappe
# Change to some directory that has enough disk space.
# I am assuming final installation will be under
# /mnt/data/erpnext/frappe-bench-14
cd /mnt/data/erpnext
# Read init.log after the step below for any errors.
# frappe-bench-14/ will be created, so do not create it
# beforehand
bench init /mnt/data/erpnext/frappe-bench-14  2>&1|tee init.log
cd /mnt/data/erpnext/frappe-bench-14
# Activate virtual environment created during init
source env/bin/activate
# If in the process you get messages about upgrading pip,
# and/or bench, this an be done, as instructed, using
# something like:
pip3 install --upgrade pip
pip3 install --upgrade frappe-bench
  • Create new site, entering details as prompted. Ensure that you are in the frappe-bench-14/ directory, and that the virtual environment is activated:
# You will need the MariaDB root user password, and will
# need to add a password for the Administrator user
bench new-site mysite.mydomain.com
  • Install ERPNext in the new site
bench get-app erpnext
bench --site mysite.mydomain.com install-app erpnext
  • I also restored a database backup from the v13.5 site, but will skip that
  • Stop any existing ERPNext processes running under supervisor, or nginx, and remove the configuration files
  • Set up for production:
cd /mnt/web/erpnext/frappe-bench-14
# Examine start.log below for errors such as port conflicts
# frappe user needs sudo access to write supervisor, and
# nginx configuration files
(sudo bench setup production frappe) 2>&1 | tee start.log
  • Migrate the site to the new Frappe / ERPNext version (not sure if this is needed, but seems to be):
# Examine migrate.log below for errors
(bench --site hr.mimirtech.com migrate) 2>&1 | tee migrate.log
  • Rebuild static assets (not sure if this is needed):
bench build
  • We also had custom supervisor, and nginx configurations that we saved, and restored after installing ERPNext, but that might not be necessary.
  • Sometimes, the nodejs socket.io interface seems to start up on a different port. In case of issues, you should check that the port specified in the nginx configuration file matches the nodejs port from:
sudo netstat -anlp | less
  • This is really an issue with yarn, pip, and similar installers, but sometimes the cached files in the frappe user’s home directory can become quite huge: ours was several GB, and fill up the / partition so that the installation will give you errors about insufficient disk space. As the frappe user, clean up such caches with:
yarn cache clean
pip cache purge