FORBIDDEN error with sao

Hi!! I’m using tryton-Sao with Debian 10 but actually comes with FORBIDDEN error when try to load something related with menu

I see two possibilities:

  • a CORS issue. Origins can be configured in the [web] cors.
  • weird URL construction. You should provide the URL used to make requests.

Hi! Thanks for the answer.

The URL it’s http://192.168.1.123:8000/data_test

I’m using SQLite database to use the project.

About CORS.

Can you give me some example about it?

I do not think sao works on other path than root.

Using SQLite on server is really not recommended.

Ok i go to see if i can use postgresql. I’m trying to use the system on android but it’s complicated.

I change the hostname using the local ip address and works so it’s a option.

And now the system don’t use MySQL.

I have the same mistake. The path sao belongs to the executing user “pi”. I’ve set the rights to 777 for now. My config looks like this:
[database]
uri=postgresql://tryton:######@127.0.0.1:5432/tryton
path = /home/pi/
[jsonrpc]
# Settings for the JSON-RPC network interface
data=/home/pi/sao
[web]
listen=0.0.0.0:8000
root = /home/pi/sao
hostname = raspitryton.local

Nevertheless, I get the message that the access or another method is to be trained.

Could you try:

root = /home/pi/sao/

Note the ending /

Thanks for the advice. Unfortunately, that’s not the solution.

Hi!

Well i did a script to detect the IP address to start and stop the server with that IP to get external access.

If it’s localhost on can access in local to the web client but if the connection shares the ip the system start with external ip and client works

I know that’s it’s not the best solution but works

Great. Then please send me that script. That way I’ll learn more start parameters.

I made some mistakes in the execution. I saved the ‘sao’ directory in the private HOME directory of pi. Just like I put the path (PATH) in a directory that was not writable for the user root. Now I no longer get the message forbidden.

Good morning,
I’m still suffering from the same defect. So far I have activated all modules via the Tryton client. I haven’t made any company settings or set up another user yet. Is it possible that the message ‘forbidden’ appears for this reason?
I have enabled debugging and get the following output in the console:

8682 1932522592 [2020-02-18 07:40:41,354] INFO trytond.modules all modules loaded
8682 1932522592 [2020-02-18 07:40:41,412] INFO trytond.protocols.dispatcher <class 'trytond.pool.res.user'>.get_preferences(*(True, {'client': '1e54dcb8-6506-4652-956b-2211f915f32d'}), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:41,576] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:41] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:41,636] INFO trytond.protocols.dispatcher <class 'trytond.pool.res.user'>.get_preferences(*(True, {'client': '1e54dcb8-6506-4652-956b-2211f915f32d'}), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:41,648] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:41] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:41,680] INFO trytond.protocols.dispatcher <class 'trytond.pool.res.user'>.get_preferences(*(False, {'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []}), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:42,388] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:42,421] INFO trytond.protocols.dispatcher <class 'trytond.ir.model.Model'>.list_models(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:42,586] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:42,701] INFO trytond.protocols.dispatcher <class 'trytond.ir.ui.icon.Icon'>.list_icons(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1922036832 [2020-02-18 07:40:42,707] INFO trytond.protocols.dispatcher <class 'trytond.ir.model.Model'>.list_history(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1953494112 [2020-02-18 07:40:42,751] INFO trytond.protocols.dispatcher <class 'trytond.ir.ui.view.ViewSearch'>.get_search(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:42,788] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1922036832 [2020-02-18 07:40:42,795] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1953494112 [2020-02-18 07:40:42,843] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1953494112 [2020-02-18 07:40:43,073] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:43] "POST /tryton/ HTTP/1.1" 403 -
8682 1953494112 [2020-02-18 07:40:43,112] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:43] "GET /images/tryton-error.svg HTTP/1.1" 200 -

CK said that here is not normal:

from admin@192.168.188.20//tryton/

but I can not fix this error. Sometimes extensive debugging is less meaningful than the normal output of the program. I suspect that the 'custom.js' responsible for the display is responsible for this error with the double ‘/’. 'method not allowed' is written in the status output.