Web SAO access denied

Hi
Having a small issue with the web setup, likely a setting thing. Database has been initialized and setup fully using the tryton client UI, no problems accessing the Tryton from it. But on the WEB after logging in I get an access is denied, after a few post calls. I can see the request / responses on the server, they end at a post to model.ir.model.get_notification, which returns a 403.

[Tue Apr 19 22:46:23 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.res.user.device.renew>
[Tue Apr 19 22:46:23 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.res.user.get_preferences>
[Tue Apr 19 22:46:24 2022] INFO:werkzeug:172.16.101.1 - - [19/Apr/2022 22:46:24] "POST /yc/ HTTP/1.1" 200 -
[Tue Apr 19 22:46:24 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.res.user.get_preferences>
[Tue Apr 19 22:46:24 2022] INFO:werkzeug:172.16.101.1 - - [19/Apr/2022 22:46:24] "POST /yc/ HTTP/1.1" 200 -
[Tue Apr 19 22:46:24 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.res.user.get_preferences>
[Tue Apr 19 22:46:24 2022] INFO:werkzeug:172.16.101.1 - - [19/Apr/2022 22:46:24] "POST /yc/ HTTP/1.1" 200 -
[Tue Apr 19 22:46:24 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.ir.model.list_models>
[Tue Apr 19 22:46:24 2022] INFO:werkzeug:172.16.101.1 - - [19/Apr/2022 22:46:24] "POST /yc/ HTTP/1.1" 200 -
[Tue Apr 19 22:46:24 2022] INFO:werkzeug:172.16.101.1 - - [19/Apr/2022 22:46:24] "POST /yc/ HTTP/1.1" 200 -
[Tue Apr 19 22:46:24 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.ir.ui.icon.list_icons>
[Tue Apr 19 22:46:24 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.ir.model.list_history>
[Tue Apr 19 22:46:24 2022] INFO:trytond.wsgi:<JSONRequest 1@172.16.101.1 'http://nz:8100/yc/' [POST] model.ir.model.get_notification>
[Tue Apr 19 22:46:24 2022] INFO:werkzeug:172.16.101.1 - - [19/Apr/2022 22:46:24] "POST /yc/ HTTP/1.1" 403 -

It seems you are using the developement version of sao (where the get_notification function was added) with a server version that does not have this function implemented.

You should use the same series (two first version digits) on sao and on the server.

This happens too often so I created Issue 11421: Check server version - Tryton issue tracker

1 Like

Thanks, I should have thought of that :man_facepalming: I used a specific version of tryton in the requirements, didn’t think to use a specific branch from github. I was going to use the docker image but I couldn’t figure how to use it for development and since I wanted to install custom packages it didn’t work. I ended up modifying my boot script to add the version to the repo checkout process, which solved the issue.

rm -rf /usr/share/tryton-sao/www
git clone -b "6.2" --single-branch https://github.com/tryton/sao /usr/share/tryton-sao/www
cd /usr/share/tryton-sao/www
npm install --legacy-peer-deps
./node_modules/grunt/bin/grunt  dev

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.