Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login page missing CSS: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/odoo/d7/d764ceb077964b7b3152235918b5c065424133d7' #165181

Open
gregory112 opened this issue May 13, 2024 · 7 comments

Comments

@gregory112
Copy link

gregory112 commented May 13, 2024

Impacted versions:
odoo 17, Docker container, with PostgreSQL database (deployed with docker-compose)

Steps to reproduce:
Create a new Odoo with existing database.

Current behavior:
image

2024-05-13 06:32:10,509 1 INFO odoo werkzeug: 172.18.0.12 - - [13/May/2024 06:32:10] "GET /web/login HTTP/1.1" 200 - 5 0.012 0.062
2024-05-13 06:32:10,654 1 INFO ? werkzeug: 172.18.0.12 - - [13/May/2024 06:32:10] "GET /web/static/src/libs/fontawesome/fonts/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1" 200 - 1 0.005 0.093
2024-05-13 06:32:10,662 1 INFO odoo werkzeug: 172.18.0.12 - - [13/May/2024 06:32:10] "GET /web/binary/company_logo HTTP/1.1" 200 - 3 0.009 0.075
2024-05-13 06:32:10,671 1 ERROR odoo odoo.http: Exception during request handling. 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 2192, in __call__
    response = request._serve_db()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1768, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1795, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1912, in dispatch
    return self.request.registry['ir.http']._dispatch(endpoint)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 725, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/binary.py", line 136, in content_assets
    stream = request.env['ir.binary']._get_stream_from(attachment, 'raw', filename)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_binary.py", line 129, in _get_stream_from
    stream = self._record_to_stream(record, field_name)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_binary.py", line 73, in _record_to_stream
    return Stream.from_attachment(record)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 498, in from_attachment
    stat = os.stat(self.path)
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/odoo/d7/d764ceb077964b7b3152235918b5c065424133d7'
2024-05-13 06:32:10,673 1 INFO odoo werkzeug: 172.18.0.12 - - [13/May/2024 06:32:10] "GET /web/assets/fa68d48/web.assets_frontend.min.css HTTP/1.1" 500 - 5 0.015 0.098
2024-05-13 06:32:10,824 1 INFO odoo werkzeug: 172.18.0.12 - - [13/May/2024 06:32:10] "GET /web/assets/5ec42d9/web.assets_frontend_minimal.min.js HTTP/1.1" 200 - 5 0.008 0.034
2024-05-13 06:32:10,933 1 INFO ? werkzeug: 172.18.0.12 - - [13/May/2024 06:32:10] "GET /web/static/img/favicon.ico HTTP/1.1" 200 - 1 0.006 0.035

Expected behavior:
Working as usual

@gregory112
Copy link
Author

Is this somehow related to the data in database? Because I did see some WAL related errors when I backed up my PostgreSQL instance due to harddrive problems. I'm afraid data corruption might cause this? If so, is it possible to somehow reset it (as I now have good drive)?

@tjventurini
Copy link

I guess I have the same kind of issue.

image

Here is the repository: https://github.com/tjventurini/odoo-setup

At first everything goes well, but after a couple of hours the assets are broken. When I then try to regenerate the assets if first works well again but stops working completely shortly after.

@tjventurini
Copy link

Is it possible @gregory112 that you too changed the name of the service?
For me it is working again since I changed it back to web

@tjventurini
Copy link

ok, stopped working after dinner 😅

@gregory112
Copy link
Author

@tjventurini Nope, I didn't change anything, other than migrating my database to other disk.
In fact it is broken since the first set up. Might probably a race condition or something. I saw some old issue that might be related too: #13808

@tjventurini
Copy link

Did you try to clear the cache using the query shown in this?
It did not help me but I would like to know if it fixed the issue for you ^^

@tjventurini
Copy link

I also tried to regenerate the asses again with the following command.
docker compose exec --user postgres postgres psql --username=odoo --dbname=odoo -c "delete from ir_attachment where res_model='ir.ui.view' and name like '%assets_%'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants