-
-
Notifications
You must be signed in to change notification settings - Fork 532
Description
When the controller ("/queue_job/runjob") gets called, a fatal error occurs.
Oddly, if I take the URL that it's trying to reach and replace the http://localhost:8069/ with https://my-domain/, and execute it from my browser where I'm logged in, it works. (I have Nginx acting as reverse proxy and doing SSL termination; hence the https and the use of a hostname).
If I try the same thing from a clean browser with no cookies, it fails.
The only thing that I can think of that's different is the fact that I'm a logged in user when it succeeds. This would seem to be contrary to documentation that I've read that states that it's intended for anonymous users to be able to call the controller.
Running everything locally with Odoo16 in Docker.
Am I missing something?
2023-05-01 13:24:42,269 39 INFO ? odoo.addons.queue_job.jobrunner.runner: asking Odoo to run job fb5f9379-3a40-44e9-b4bd-aa60cf212d53 on db odoo162
2023-05-01 13:24:42,336 33 ERROR ? odoo.http: Exception during request handling.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1989, in __call__
response = request._serve_nodb()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1552, in _serve_nodb
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1725, in dispatch
return endpoint(**self.request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 696, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/mnt/extra-addons/queue_job/controllers/main.py", line 41, in runjob
env = http.request.env(user=SUPERUSER_ID)
TypeError: 'NoneType' object is not callable
2023-05-01 13:24:42,337 33 INFO ? werkzeug: 127.0.0.1 - - [01/May/2023 13:24:42] "GET /queue_job/runjob?db=odoo162&job_uuid=fb5f9379-3a40-44e9-b4bd-aa60cf212d53 HTTP/1.1" 500 - 1 0.003 0.045
2023-05-01 13:24:42,338 39 ERROR ? odoo.addons.queue_job.jobrunner.runner: exception in GET http://localhost:8069/queue_job/runjob?db=odoo162&job_uuid=fb5f9379-3a40-44e9-b4bd-aa60cf212d53
Traceback (most recent call last):
File "/mnt/extra-addons/queue_job/jobrunner/runner.py", line 242, in urlopen
response.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:8069/queue_job/runjob?db=odoo162&job_uuid=fb5f9379-3a40-44e9-b4bd-aa60cf212d53