ERPNext Login Issue

I have been trying to log in into this new instance. I’ve tried bench update and bench update --patch.

After I try to login, this traceback appears in my Chrome console

Traceback (most recent call last):
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/app.py", line 59, in application
    init_request(request)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/app.py", line 121, in init_request
    frappe.local.http_request = frappe.auth.HTTPRequest()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/auth.py", line 53, in __init__
    frappe.local.login_manager = LoginManager()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/auth.py", line 107, in __init__
    if self.login()==False: return
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/auth.py", line 126, in login
    self.authenticate(user=user, pwd=pwd)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/auth.py", line 206, in authenticate
    self.user = self.check_password(user, pwd)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/auth.py", line 218, in check_password
    return check_password(user, pwd)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/utils/password.py", line 35, in check_password
    )""",{ 'doctype': doctype, 'name': user, 'fieldname': fieldname, 'pwd': pwd }, as_dict=True)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/database.py", line 166, in sql
    self._cursor.execute(query, values)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 893, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1103, in _read_query_result
    result.read()
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1396, in read
    first_packet = self.connection._read_packet()
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1059, in _read_packet
    packet.check_error()
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 384, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
InternalError: (1054, u"Unknown column 'salt' in 'field list'")

Also, this was seen in bench start trace -

11:25:23 watch.1          | SyntaxError: Unexpected end of JSON input
11:25:23 watch.1          |     at JSON.parse (<anonymous>)
11:25:23 watch.1          |     at make_build_map (/home/jatin/erp/frappe-bench/apps/frappe/frappe/build.js:193:22)
11:25:23 watch.1          |     at Object.<anonymous> (/home/jatin/erp/frappe-bench/apps/frappe/frappe/build.js:22:17)
11:25:23 watch.1          |     at Module._compile (module.js:641:30)
11:25:23 watch.1          |     at Object.Module._extensions..js (module.js:652:10)
11:25:23 watch.1          |     at Module.load (module.js:560:32)
11:25:23 watch.1          |     at tryModuleLoad (module.js:503:12)
11:25:23 watch.1          |     at Function.Module._load (module.js:495:3)
11:25:23 watch.1          |     at Function.Module.runMain (module.js:682:10)
11:25:23 watch.1          |     at startup (bootstrap_node.js:191:16)

I have been also facing chromedriver install issue in update.

Have you moved from develop branch to master

yes I used bench switch-to-master

Switch to develop it will work

I am also getting the same error

okay I will try. Also, should I again try bench update and bench update --patch or leave it be ?

hello @root13F were you able to solve this ?

No Not yet.
After using bench switch-to-branch develop from master I ran bench update and bench update --patch
Bench update works but Bench update patch gets me this error :

jatin@Jatin-PC:~/erp/frappe-bench$ bench update --patch
remote: Counting objects: 161, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 161 (delta 125), reused 131 (delta 120), pack-reused 12
Receiving objects: 100% (161/161), 1.70 MiB | 302.00 KiB/s, done.
Resolving deltas: 100% (127/127), completed with 96 local objects.
From https://github.com/frappe/frappe
   9862619..0363a64  develop    -> upstream/develop
Backing up sites...
Patching sites...
Migrating rainbow.dev
Executing erpnext.patches.v10_0.added_extra_gst_custom_field in rainbow.dev (7db674be14c50c19)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/jatin/erp/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/commands/site.py", line 222, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/migrate.py", line 39, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/jatin/erp/frappe-bench/apps/erpnext/erpnext/patches/v10_0/added_extra_gst_custom_field.py", line 9, in execute
    make_custom_fields()
  File "/home/jatin/erp/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 242, in make_custom_fields
    create_custom_fields(custom_fields, ignore_validate = frappe.flags.in_patch)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 133, in create_custom_fields
    create_custom_field(doctype, df, ignore_validate=ignore_validate)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 118, in create_custom_field
    custom_field.insert()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/model/document.py", line 221, in insert
    self._validate_links()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/model/document.py", line 734, in _validate_links
    frappe.LinkValidationError)
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/__init__.py", line 327, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/__init__.py", line 313, in msgprint
    _raise_exception()
  File "/home/jatin/erp/frappe-bench/apps/frappe/frappe/__init__.py", line 286, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find Document: Employee Tax Exemption Proof Submission

I am thinking of doing a clean install.

I’ve fixed this problem by resetting the Administrator password via cmd. bench set-admin-password password and reset all users password! whew!

1 Like

This post solve the problem

1 Like