Trouble installing Tryton web client

I am new to Tryton. I would like to install it in a virtual environment on a single-board computer (Orange Pi Zero running Debian 10) and access it using my web browser, then customize it to my needs by building my own modules.

I tried following the official documentation and this wiki, but I am finding both incomplete. Here is what I did:

  1. Create and activate Python virtual environment:

    $ python3 -m venv --system-site-packages --symlinks tryton-training
    $ cd tryton-training && source bin/activate

  2. Install Tryton using pip:

    $ pip3 install trytond
    $ pip3 install psycopg2-binary

  3. Set up postgres database

  4. Create tryton.conf file:

    [database]
    uri = postgresql://user1:XXXXXXX@localhost:5432/training
    path = /home/user1/tryton-training
    [web]
    listen = 0.0.0.0:8000
    root = /home/user1/tryton-training

  5. Launch tryton: trytond -c trytond.conf

I then attempted to access Tryton on my SBC using my web browswer, but got a “405 Method Not Allowed” error. Searching the forums, a post back in 2017 said sao needed to be installed from the repositories. This surprised me, because sao isn’t mentioned anywhere in the official documentation.

So, I created a Node.js virtual environment, installed npm, and downloaded and installed sao:

$ pip3 install nodeenv
$ # install a prebuilt version of node (17.4.0) in the tryton-node directory
$ nodeenv tryton-node
$ # put npm on system $PATH to make it callable
$ cd tryton-node  && source bin/activate
$ wget http://hg.tryton.org/sao/archive/tip.tar.gz
$ untar tip.tar.gz
$ cd sao-061509341eb4
$ mv sao-061509341eb4/* sao-061509341eb4/.* .
$ # install sao here
$ npm install --production

This produced a lot of deprecation warnings:

npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated request@2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@4.2.1: this library is no longer supported
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.

I tried launching Tryton again. This time I got a page with the tryton logo and hamburger menu, but nothing worked because the page was unable to retrieve critical Javascript and CSS files:

...
2921 2973758560 [2022-01-21 12:22:24,476] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:24] "GET /dist/tryton-sao.min.js HTTP/1.1" 405 -
2921 2973758560 [2022-01-21 12:22:24,498] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:24] "GET /dist/tryton-sao.min.css HTTP/1.1" 405 -
2921 2973758560 [2022-01-21 12:22:24,516] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:24] "GET /custom.js HTTP/1.1" 405 -
2921 2963272800 [2022-01-21 12:22:24,525] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:24] "GET /custom.css HTTP/1.1" 405 -
2921 2963272800 [2022-01-21 12:22:25,396] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /dist/tryton-sao.min.css HTTP/1.1" 405 -
2921 2963272800 [2022-01-21 12:22:25,500] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /dist/tryton-sao.js HTTP/1.1" 405 -
2921 2973758560 [2022-01-21 12:22:25,505] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /dist/tryton-sao.css HTTP/1.1" 405 -
2921 2973758560 [2022-01-21 12:22:25,611] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /dist/tryton-sao.css HTTP/1.1" 405 -
2921 2963272800 [2022-01-21 12:22:25,621] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /custom.js HTTP/1.1" 405 -
2921 2963272800 [2022-01-21 12:22:25,706] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /custom.css HTTP/1.1" 405 -
2921 2963272800 [2022-01-21 12:22:25,734] INFO werkzeug 192.168.10.103 - - [21/Jan/2022 12:22:25] "GET /images/tryton-menu.svg HTTP/1.1" 304 -
...

What am I doing wrong?

  • Jim

You should be able to connect to the server like this using Tryton gtk client.

If you want to connect using a web browser you need to install SAO on the server.
This is not a python package, it is a npm package so you need to install it separatly.

That is exactly what I did–please see the second half of my post.

Is there some reason this isn’t in the documentation?

Sorry for the hasty reply - I didn’t read everything properly.
I also have some difficulties with SAO.

No offense taken. I appreciate your rapid reply :slight_smile: .

I realize there is a GTK client, but I’d like to be able to access Tryton using the web browser on my phone, too. I’d also like the other people in our small company to be able to access it without having to install other software on their computer.

You should not fetch the sao archive from a random development point but use the releases from the same series as the server like http://downloads.tryton.org/6.2/tryton-sao-last.tgz
And then run npm install --production --legacy-peer-deps (as in the README.md)

Thanks, ced. That resolved the problem. I didn’t notice that link anywhere on your web site, so I went to the repo and selected ‘gz’ from the list of downloads on the left, which is obviously the wrong one.

There is a source file download section: Tryton - Get Tryton
but maybe we could add direct link to last server, desktop and web clients.

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