Error After Updating Frappe, ERPNext and HRMS

I’m experiencing login issues with one of my Frappe sites after updating frappe, erpnext, and hrms apps. On site one, logged-out users (including myself) can’t access the login page - we’re getting JavaScript errors in the browser console showing “None is not defined” and “frappe.boot is undefined” errors. The strange part is that users who are already logged in can use the desk normally without issues, and my other site (site two) on the same server works perfectly fine. The main errors appear related to the boot process not initializing properly for non-authenticated users, preventing the login page from loading correctly. Has anyone encountered similar issues after updating these apps, and what might be the fix?

Hi,

It may help to describe the operating environment, how the upgrade was performed and if this was the first time an upgrade was tried or if updates were successful in the past.

Hello Simon,

Thank you for your response. I’m running on Ubuntu 22.04 LTS. This issue is particularly puzzling as I’ve performed numerous successful updates in the past following my standard procedure without any problems. My typical update workflow is:

  1. Pull the latest changes for frappe, erpnext, and hrms apps (all from version-15 branch)
  2. Run bench --site site-name migrate
  3. Complete with bench update

The current issue occurred immediately following this same process. What’s most unusual is that it only affects the login page for non-authenticated users on one specific site, while already-logged-in users continue to access the system normally.

I’ve also tried the following command but the issue persists

  • bench --site site-name clear-cache
  • bench build

Maybe try bench restart?

Can the Administrator login to a new session?

I’ve restarted bench several times, but I’m still getting these errors in my browser console which is preventing me from logging in.

Please share the output of bench version.

This is likely due to an issue in how frappe.boot was parsed on earlier versions.
You can temporarily resolve this by setting a currency in System Settings.

Yes i noteced that it’s something related to currency being set to None.
Here’s my bench version:

erpnext 15.57.0
frappe 15.63.0
hrms 15.43.0
payments 0.0.1
webshop 0.0.1

If possible, could you click on the first error and share the surrounding code, curious to see what’s causing it now, it should be handled on this version of frappe.

The issue has been resolved! The problem was related to the missing currency field in System Settings. Since I didn’t have access to the UI, I fixed it directly in the database with:

sql

INSERT INTO `tabSingles` (`doctype`, `field`, `value`) 
VALUES ('System Settings', 'currency', 'USD');

After executing this command, make sure to:

  • Clear the cache: bench --site site-name clear-cache
  • Rebuild assets: bench build
  • Restart your Frappe server: bench restart

To answer your question about the error: When frappe.boot was initializing, it was expecting a currency value, but since it was missing in the database, it defaulted to None, which caused JavaScript errors when trying to reference it. The error cascaded and prevented the login page from loading properly.

After adding the currency, cleared the cache, and everything is working perfectly now. It seems the recent updates to frappe/erpnext/hrms made the currency field mandatory for boot initialization.

Thanks for your help!

Yep, the thing is, the None parsing was fixed in framework a while ago: fix: convert frappe.boot to JSON properly by akhilnarang · Pull Request #28765 · frappe/frappe · GitHub

That’s why I’m curious to see where it originated on your site, I couldn’t find any other instance of the broken parsing.

Thank you so much for your help!!