Closed AyaYousef closed 6 years ago
Hi AyaYousef,
Does the Odoo work if you add ?debug=assets in the URL?
Regards, Yenthe
Yes
Then it is related to Odoo itself and/or the compilation of the assets. Sadly there are multiple reports about this with no clear solution. For example: https://github.com/odoo/odoo/issues/19627 https://github.com/odoo/odoo/issues/12560 https://github.com/odoo/odoo/issues/14938 https://github.com/odoo/odoo/issues/10377
There are a lot of assets issues known in Odoo honestly. Your best best is to run a query to drop all your assets and to recompile them again.
Can you please help me on this, I mean to give me a reference for that query that I can run to recompile them again :)
@AyaYousef The python code to add a menu item to regenerate these web assets is in the first issue @Yenthe666 mentioned here: https://github.com/odoo/odoo/commit/28491aac45dc912696c1fcc57a50e3ec98906336 From issue https://github.com/odoo/odoo/issues/19627 With a few git commands, you could probably automatically add this menu command to your odoo. Of course, that would be useless, when your odoo is failing to display the menus due to problems with the web assets. You can read the issue for many workarounds others have used.
I tried to delete the attachments mentioned there, restarted odoo service and activated the developer mode with assets. The style errors disappeared for sometime, and once I installed a new app (assets management) the problem occurred again!
@AyaYousef
Did you install Odoo Community and Enterprise with odoo_install.sh
from here in this repo master
branch, or with my new version?
Assuming you used this repo master
version.
Try my new version, I've fixed many bugs.
You can run it over your existing install, it doesn't require an empty server.
Comment back if it fixes this assets error issue for you:
rm odoo_install.sh
wget https://github.com/chris001/InstallScript/raw/patch-2/odoo_install.sh
chmod +x odoo_install.sh
./odoo_install.sh
@chris001
I installed Enterprise from here in this repo branch 11
Here's the command I used sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/11.0/odoo_install.sh
so shall I use the same command you mentioned?
@AyaYousef Try my new version, I've fixed many bugs. See above for commands to download and run install.
@chris001 can you send me the link of branch 11.0
@AyaYousef This is the commands to run, and it will get you branch 11.0 :
rm odoo_install.sh
wget https://github.com/chris001/InstallScript/raw/patch-2/odoo_install.sh
chmod +x odoo_install.sh
./odoo_install.sh
Post back with your results.
@chris001 I rebuilt the server and used your script for a fresh start It seemed to be styling compiling error on any newly created database is no longer happening. However, I encountered lessc error after restoring an old db was built on the old script.
Do I need to upgrade all the apps installed in the restored db?
Also, I've encountered another error in the new script Wkhtmltopdf I can't print any report in pdf format.
@AyaYousef 1.
I encountered
lessc
error after restoring an old db was built on the old script. Do I need to upgrade all the apps installed in the restored db?
What's the output of this command:
which lessc
I've encountered another error in the new script
Wkhtmltopdf
I can't print any report in pdf format. "Your installation of Wkhtmltopdf seems to be broken. The report will be shown in html."
Can you share the exact steps to get this error.
Now the old compiling styling error messages are coming across all the database including the old restored and the newly created ones.
Hi,
I reported this Wkhtmltopdf issue to different thread but I can share reproduce steps also here. It happens with all printouts so this is just one example.
1) Create Sales Order 2) Select "Print"
=> Sales Order won't get printed and pop-up error message is displayed. See the attached screenshots.
Mikko
I managed to correct Wkhtmltopdf related issues. I run following command and after that printing and email sending started to work without problems:
apt-get -f install fontconfig libxrender1
Regards, Mikko
@chris001 this is the output of which lessc
/usr/local/bin/lessc
Regarding the steps to trigger the pdf report are exactly the same as @salmemik said, also I used his suggested solution and now I can print pdf reports with no issues.
Now only the styling errors remain!
@AyaYousef @salmemik
I've updated the install script #74 to install the dependencies required by wkhtmltopdf
which are fontconfig libxrender1 xvfb
Reference: https://stackoverflow.com/questions/37765698/unable-to-install-wkhtmltopdf-with-patched-qt-in-ubuntu-16-04
@AyaYousef
?debug=assets
at the end of your odoo URL in the browser address bar, and reload the page?cat /var/log/odoo/odoo-server | grep WARN
cat /var/log/odoo/odoo-server | grep ERROR
@chris001
For style (static web assets) what happens when you copy and paste ?debug=assets at the end of your odoo URL in the browser address bar, and reload the page?
Sometimes it works just fine, other times the styles are not rendered and the page loads too messy as if it can't read the css/less styles.
You installed enterprise or community?
I'm using Odoo V11 Enterprise Edition.
Output of commands: cat /var/log/odoo/odoo-server | grep WARN
Ok since it's a big list of warning messages, I'll skip the duplicated messages, the following is the recap
2018-02-18 10:43:09,808 5942 WARNING ? odoo.addons.l10n_mx_edi.models.certificate: OpenSSL library not found. If you plan to use l10n_mx_edi, please install the library from https://pypi.python.org/pypi/pyOpenSSL
2018-02-18 10:43:09,914 5942 WARNING ? odoo.addons.voip.models.res_partner: The `phonenumbers` Python module is not installed, contact look up will not be done for incoming calls. Try: pip install phonenumbers.
2018-02-18 10:44:34,510 5944 WARNING ? odoo.addons.base.ir.ir_cron: Skipping database dci-demo because of modules to install/upgrade/remove.
2018-02-18 10:47:00,452 5941 WARNING dci-demo odoo.modules.loading: Transient module states were reset
2018-02-18 12:12:02,839 7820 WARNING dci-demo odoo.addons.base.ir.ir_qweb.assetsbundle: (b'\n<--- Last few GCs --->\n\n 9067 ms: Mark-sweep 27.1 (248785.9) -> 27.1 (272416.9) MB, 229.9 / 0 ms [allocation failure] [GC in old space requested].\n 9311 ms: Mark-sweep 27.1 (272417.9) -> 27.1 (296058.9) MB, 243.2 / 0 ms [allocation failure] [GC in old space requested].\n 9511 ms: Mark-sweep 27.1 (296059.9) -> 27.1 (319335.9) MB, 199.0 / 0 ms [last resort gc].\n 9728 ms: Mark-sweep 27.1 (319335.9) -> 27.0 (342244.9) MB, 217.2 / 0 ms [last resort gc].\n\n\n<--- JS stacktrace --->\n\n==== JS stack trace =========================================\n\nSecurity context: 0x19d3750b4629 <JS Object>\n 1: /* anonymous */(aka /* anonymous */) [/usr/lib/nodejs/less/lib/less/tree/expression.js:20] [pc=0x6ca2baf4b14] (this=0x19d3750041b9 <undefined>,e=0x76551e161b1 <JS Object>)\n 2: arguments adaptor frame: 3->1\n 3: InnerArrayMap(aka InnerArrayMap) [native array.js:~1001] [pc=0x6ca2b3307e8] (this=0x19d3750041b9 <undefined>,bk=0xac00211c059 <JS Function (SharedFunctionInfo 0x1fb48caf3611)...\n\n', b'FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory\n')This error occured while compiling the bundle 'web.assets_backend' containing:
2018-02-19 08:43:04,825 27781 WARNING dci-demo odoo.addons.base.ir.ir_qweb.assetsbundle: (b'', b'')This error occured while compiling the bundle 'web.assets_backend' containing:
Output of commands: cat /var/log/odoo/odoo-server | grep ERROR
2018-02-19 09:02:02,092 28160 ERROR dci-demo odoo.addons.base.ir.ir_qweb.assetsbundle: Could not execute command '/usr/bin/lessc'
2018-02-19 09:06:58,216 28159 ERROR dci-demo odoo.addons.base.ir.ir_qweb.assetsbundle: Could not execute command '/usr/bin/lessc'
2018-02-19 09:07:47,339 28159 ERROR dci-demo odoo.addons.base.ir.ir_qweb.assetsbundle: Could not execute command '/usr/bin/lessc'
2018-02-20 06:53:02,339 1476 ERROR dci-demo odoo.http: Exception during JSON request handling.
2018-02-20 06:53:17,933 1476 ERROR dci-demo odoo.http: Exception during JSON request handling.
2018-02-20 06:53:30,569 1477 ERROR dci-demo odoo.http: Exception during JSON request handling.
2018-02-20 06:53:42,658 1478 ERROR dci-demo odoo.http: Exception during JSON request handling.
@AyaYousef
You're running 11 enterprise? Previous post said 11 community?
Is module l10n_mx_edi
from enterprise?
voip
is enterprise.
Why don't these 2 modules install their own dependencies?
pip3 install phonenumbers pyopenssl
lessc
isn't being found on your system path. Will look into this more.
@chris001
You're running 11 enterprise? Previous post said 11 community?
yes I'm using both versions, but here I'm reporting on an Enterprise version
Is module l10n_mx_edi from enterprise?
Yes, both are Enterprise
lessc isn't being found on your system path. Will look into this more.
Any chance to find a fix for my problem?
Any chance to find a fix for my problem?
Run this command, and report back your results here:
sudo ln -s /usr/local/bin/lessc /usr/bin/lessc
@chris001
Run this command, and report back your results here: sudo ln -s /usr/local/bin/lessc /usr/bin/lessc
ln: failed to create symbolic link '/usr/bin/lessc': File exists
What's the output of:
ls -la /usr/bin/lessc
and:
echo $PATH
ls -la /usr/bin/lessc
lrwxrwxrwx 1 root root 28 Oct 24 2015 /usr/bin/lessc -> ../lib/nodejs/less/bin/lessc
echo $PATH
/home/user_name/bin:/home/user_name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
What's the output of:
ls -la /usr/lib/nodejs/less/bin/lessc
What's the output of: ls -la /usr/lib/nodejs/less/bin/lessc
-rwxr-xr-x 1 root root 12683 Oct 24 2015 /usr/lib/nodejs/less/bin/lessc
What's the output of:
curl -I http://127.0.0.1:8069/web/static/tests/boot_tests.js
Also, did you delete any user or demo data (attachments) from your odoo?
INFO demo odoo.models.unlink: User #1 deleted ir.attachment records with IDs: [510]
What's the output of: curl -I http://127.0.0.1:8069/web/static/tests/boot_tests.js
HTTP/1.0 200 OK
Date: Wed, 07 Mar 2018 05:59:57 GMT
Etag: "wzsdm-1518950199-471-634717522"
Cache-Control: max-age=604800, public
Expires: Wed, 14 Mar 2018 05:59:57 GMT
Content-Type: application/javascript
Content-Length: 471
Server: Werkzeug/0.14.1 Python/3.5.2
Also, did you delete any user or demo data (attachments) from your odoo?
I'm not quite sure about it, what if I deleted a user, what is harm on that?
Should be fine to delete a user, that log item was just an INFO message.
Can you start odoo from command line, do the action that causes the web interface bug, and copy/paste the error (exception) output that it prints to the terminal.
sudo systemctl stop odoo-server
cd /home/odoo/odoo-server
./start.sh
I appreciate your support @chris001 but it seems the problem lays in lack of resources, I've upgraded my ram, and seems like everything working smoothly. Thanks again.
Aha. Happy you've figured it out.
@AyaYousef For the benefit of the group,
I started my server with the following specs:
MEMORY | VCPUS | SSD DISK
1 GB | 1 vCPU | 25 GB
Upgraded to the following plan:
MEMORY | VCPUS | SSD DISK
2 GB | 1 vCPU | 50 GB
After upgrading the server, I didn't experience styling nor wkhtmltopdf rendering issues.
@AyaYousef Thanks for sharing your odoo server specs.
Yeah, agreed.
I totally agree with you Chris, this is not the first time I experience this issue.. and it took a lot of time to figure it out! I hope they can do something regarding this.
@AyaYousef @Yenthe666
I posted this as an issue to the official odoo github repo:
https://github.com/odoo/odoo/issues/23909
If you go to the issue, then click "Subscribe" on the right hand side of the issue, github will give notifications to you, when there is activity, updates, comments, on the issue.
I'm confident odoo developers will fix this bug, because the software will become much more user friendly, because users will learn much more quickly when their odoo 11 is crashing due to lack of memory, and so the users can fix the problem by adding memory (or removing memory intensive yet unnecessary services running on their odoo server) very quickly and very easily.
Hi @chris001,
You might not know but I voluntarely work on Odoo issues, changes and improvements so I know quite some of the guys well. I'll ping the right ones, let me know if you get no response in a week or so.
Very strange I have these errors aswell. When running it from a Sandy Bridge CPU host system I have no issues. Running the same from a KVM VM on a host with a Xeon E5335, I have the above error. Same docker version etc. it seems related to CPU support, maybe missing SSE4 instructions?
ubuntu 16.04 cd /usr/bin sudo ln nodejs node
For Ubuntu use sudo apt-get install --reinstall node-less this is a package with 'lessc' command, Odoo is using this for CSS!.
Hello there, Impacted version: 11 Steps to reproduce:
After installing Odoo V11 EE or CE, I got this style error in backend view
and in the website app