Can't login when I use bench migrate-to-v5?

Hi.
I have a error.
I coudn’t login when I use bench migrate-to-v5 ?
Thank ?

What error do you get?

Hi, ydvyas
After I updated frappe upto V.5 by command: “bench migrate-to-v5”
but I couldn’t login by user: “Administrator”.
a few day ago, I used “bench migrate-to-v5” for update to V.5. It run simple.
Thank.
Jack Le

Is there an error on the JS console?

Thank, pdvyas.
I don’t know. I try call Rest API. It run good.
I think It some error in login file.
Jack Le.

Try running bench frappe -b
Also, if you’re still not able to login, check the javascript console on your browser for error.

Thank pdvyas.
I’m still not able to login.
I just have updated Frappe to V5 in morning. I think that new version.
Jackle,

Please share the error or traceback. Only then can we figure out the problem.

Thank pdvyas.
I have fixed my ERROR.

Jack Le

Great, what was the issue?

Hi, Pydvyas,
I only copy and replay folder “/frappe-bench/sites/assets/js”.
Jack Le.

I have found that if V5 is installed under root, users cannot login. Obvious fix is to install under a local user.

It takes care of it (drops to a local user). Previously, it used to set a very restrictive umask.
Check nginx logs for permission denied.

bench update
bench patch fix-file-perms

should repair perms and solve this issue

I am also unable to migrate to v5, this is the error when I run the update:

    Executing erpnext.patches.v4_2.party_model in rigpl-local (rigpl-local)
Traceback (most recent call last):
  File "/home/aditya/frappe-bench/env/bin/frappe", line 9, in <module>
    load_entry_point('frappe==4.4.4', 'console_scripts', 'frappe')()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/cli.py", line 40, in main
    ret = run(fn, args)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/cli.py", line 84, in run
    out = globals().get(fn)(**args)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/cli.py", line 68, in new_fn
    return fn(*args, **new_kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/cli.py", line 443, in latest
    frappe.modules.patch_handler.run_all()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/patches/v4_2/party_model.py", line 14, in execute
    set_party_in_jv_and_gl_entry(receivable_payable_accounts)
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/patches/v4_2/party_model.py", line 89, in set_party_in_jv_and_gl_entry
    (new_account, account_details.get("master_type"), account_details.get("master_name"), d.name))
  File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 101, in sql
    self.check_transaction_status(query)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 211, in check_transaction_status
    frappe.throw(_("Too many writes in one request. Please send smaller requests"), frappe.ValidationError)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 234, in throw
    msgprint(msg, raise_exception=exc)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 227, in msgprint
    _raise_exception()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 211, in _raise_exception
    raise raise_exception, msg
frappe.exceptions.ValidationError: Too many writes in one request. Please send smaller requests
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/aditya/bench-repo/bench/cli.py", line 38, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/cli.py", line 172, in update
    patch_sites()
  File "/home/aditya/bench-repo/bench/utils.py", line 91, in patch_sites
    exec_cmd("{frappe} --latest all".format(frappe=get_frappe(bench=bench)), cwd=os.path.join(bench, 'sites'))
  File "/home/aditya/bench-repo/bench/utils.py", line 61, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/home/aditya/frappe-bench/env/bin/frappe --latest all' returned non-zero exit status 1

Patch issue. After a fix from us, bench frappe --latest should solve this.

Paging @nabinhait