Invalid or unexpected token prevent accessing ERPNext Desk
See original GitHub issueInformation about bug
After upgrading to Frappe-bench V14, ERPNext Desk is stocking at LOGO in production mode. I have looked up others who were also experiencing same issue when they were using Frappe-bench V13 before.
Reference link: https://discuss.erpnext.com/t/erpnext-desk-stuck-at-logo-in-production/81143
Uncaught SyntaxError: Invalid or unexpected token
listing.html:2 Uncaught TypeError: Cannot set properties of undefined (setting 'listing')
at listing.html:2:19
at kanban_card.html:2:36
address_list.html:2 Uncaught TypeError: Cannot set properties of undefined (setting 'address_list')
at address_list.html:2:19
at index.js:107:1
capture.js:14 Uncaught TypeError: Cannot set properties of undefined (setting 'get_data_uri')
at capture.js:14:10
at control.js:53:1
report_factory.js:4 Uncaught TypeError: Cannot read properties of undefined (reading 'Factory')
at report_factory.js:4:71
at report_utils.js:155:1
As you can see, the desk doesn’t work when accessed through the set domain https://erp.mydomain.com/ but works fine through http://serverip:8000/app. The previous solution for this is to use stable version of Frappe-bench V13. Since now ERPNext V14 requires Frappe-bench V14, I am limited to V14.0.0 and V14.0.2. I have tried both, they all result the same issue.
Module
other
Version
V14.0.2
Installation method
No response
Relevant log output / Stack trace / Full Error Message.
No response
Issue Analytics
- State:
- Created a year ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Invalid or unexpected token prevent accessing ERPNext Desk
Information about bug After upgrading to Frappe-bench V14, ERPNext Desk is stocking at LOGO in production mode. I have looked up others who ......
Read more >V14 not working when accessed from iPhone or Android
Please disregard this thread. The underlying problem was indeed Invalid or unexpected token prevent accessing ERPNext Desk · Issue #31785 · ...
Read more >SyntaxError: Unexpected token (80:2) when I install ERPNext
Hi @everyone I'm installing ERPNext on Ubuntu 18. I'm cloning from github. do I need to change the code?
Read more >Can not go to desk after run bench update - ERPNext Forum
After I run bench update --patch I got this error: Server: SyntaxError: Unexpected token (18:3487) in ...
Read more >Can't Access Desk after login, only showing ERPNext Logo
Can't Access Desk after login, only showing ERPNext Logo ... It says:- Uncaught SyntaxError: Unexpected token { desk:41 on console
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ankush Sometimes when i run bench build with or without force, it works. But as soon as i clear cache(ctrl+shift+r) the same exact error returns.
Even when i reinstall, I the desk loads, but as soon the cache is cleared the error returns.
i also updated node to 16.15.0
@ankush : I have applied your suggested change (
taget: ["esnext"]
), and re-enabled Cloudflare with all of its optimizations.It does seem to be fixing the error. I will keep it like this for a few days and report back.