# "method not allowed" error in web client after upgrade to 6.4

**URL:** https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252
**Category:** System Administrator
**Created:** [May 11, 2022, 2:16pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252 "2022-05-11T14:16:42Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 11, 2022, 2:16pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/1 "2022-05-11T14:16:42Z")

</div>

Hi all, I upgraded trytond from 6.2.6 to 6.4.0, including sao, and now sao shows a “Method not allowed” error immediately after logging in.

Am I missing some critical step in the upgrade? I have followed the same procedure when upgrading within series 6.2 but this is my first upgrade to a new series.

Cheers,  
Dale

Procedure:

1. install --upgrade trytond and modules using pip to 6.4.\*
2. ran the three migration commands as listed in the “Migration from 6.2 to 6.4” post (although the first two commands failed, presumably because there aren’t any payments in the database).
3. ran trytond-admin -c ./trytond.conf -d scc --all
4. installed sao-6.4.0
5. logged in with browser and got “Method not allowed” error

Trytond is not logging to a file, the following errors were in the terminal session used to start trytond:

```auto
17575 34432474624 [2022-05-11 14:00:18,841] ERROR werkzeug 10.0.2.2 - - [11/May/2022 14:00:18] code 400, message Bad request syntax ('{"id":17,"method":"model.ir.ui.icon.list_icons","params":[{"client":"339011b3-a73c-4ead-823e-220036ecbf85","company_filter":"one","company":1,"company.rec_name":"Swift Construction Company","language":"en","language_direction":"ltr","groups":[1,4,2,5,3,6],"locale":{"date":"%m/%d/%Y","grouping":[3,3,0],"decimal_point":".","thousands_sep":",","mon_grouping":[3,3,0],"mon_decimal_point":".","mon_thousands_sep":",","p_sign_posn":1,"n_sign_posn":1,"positive_sign":"","negative_sign":"-","p_cs_precedes":true,"n_cs_precedes":true,"p_sep_by_space":false,"n_sep_by_space":false}}]}POST /scc/ HTTP/1.1')
17575 34432474624 [2022-05-11 14:00:18,841] INFO werkzeug 10.0.2.2 - - [11/May/2022 14:00:18] "None /scc/ HTTP/1.1" HTTPStatus.BAD_REQUEST -

```

sao error:

 ![2022-05-11 sao method not allowed after upgrade](https://discuss-cdn.tryton.org/uploads/default/original/2X/7/7d06b874ea0c0bc697f0a14ef89060d7a592cfbd.png)

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 11, 2022, 9:57pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/2 "2022-05-11T21:57:05Z")

</div>

> [@dalers](#):
>
> install --upgrade trytond and modules using pip to 6.4.\*

I guess this did not work correctly.  
Clearly the server running is not from 6.4 series.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 11, 2022, 11:27pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/3 "2022-05-11T23:27:09Z")

</div>

Hi @ced, trytond and modules all show 6.4.0.

```auto
(env) [tryton@starlord ~/trytond]$ pip list | grep tryton
trytond 6.4.0
trytond-account 6.4.0
trytond-account-invoice 6.4.0
trytond-account-invoice-stock 6.4.0
trytond-account-product 6.4.0
trytond-company 6.4.0
trytond-country 6.4.0
trytond-currency 6.4.0
trytond-party 6.4.0
trytond-product 6.4.0
trytond-purchase 6.4.0
trytond-stock 6.4.0
(env) [tryton@starlord ~/trytond]$

```

I created a script that ran pip install --upgrade for all my installed modules. I did have to run the script twice though to deal with module dependencies (the first time some upgrades failed because their dependencies hadn’t been upgraded yet).

```auto
(env) [tryton@starlord ~/trytond]$ head ~/bin/upgrade_trytond_6.4.sh
#!/bin/sh

echo
echo "trytond"
pip install --upgrade "trytond==6.4.*"

echo
echo "trytond-account"
pip install --upgrade "trytond-account==6.4.*"

(env) [tryton@starlord ~/trytond]$

```

After pip upgrade I started trytond and ran the “Migration from 6.2 to 6.4” instructions in trytond-console (although the first 2 commands failed, I presume because I don’t have any payments yet in my database).

I then ran “trytond-admin -c ./trytond.conf -d scc --all”, and then upgraded sao. The sao upgrade process reported 3 high severity vulnerabilities and a new minor version of npm was available, but no errors. After that I logged in with a web browser, and then the “Method not allowed” error was reported.

Is it possible there are system dependencies which I must also upgrade? I only upgraded trytond, the trytond modules, and sao (and NOT proteus).

Thanks,  
Dale

Fwiw, this is the complete venv:

`````auto
(env) [tryton@starlord ~/trytond]$ pip list
Package Version
----------------------------- ---------
certifi 2021.10.8
charset-normalizer 2.0.12
defusedxml 0.7.1
forex-python 1.8
Genshi 0.7.6
idna 3.3
lxml 4.8.0
passlib 1.7.4
pip 22.0.4
polib 1.1.1
proteus 6.2.3
psycopg2 2.9.3
pycountry 20.7.3
python-dateutil 2.8.2
python-magic 0.4.25
python-sql 1.3.0
python-stdnum 1.17
relatorio 0.10.0
requests 2.27.1
setuptools 56.0.0
simpleeval 0.9.12
simplejson 3.17.6
six 1.16.0
sqlite3 0.0.0
trytond 6.4.0
trytond-account 6.4.0
trytond-account-invoice 6.4.0
trytond-account-invoice-stock 6.4.0
trytond-account-product 6.4.0
trytond-company 6.4.0
trytond-country 6.4.0
trytond-currency 6.4.0
trytond-party 6.4.0
trytond-product 6.4.0
trytond-purchase 6.4.0
trytond-stock 6.4.0
urllib3 1.26.9
Werkzeug 2.1.1
wrapt 1.14.0
(env) [tryton@starlord ~/trytond]$
````Preformatted text`
`````

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 12, 2022, 2:17am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/4 "2022-05-12T02:17:34Z")

</div>

P.S. I installed the latest version of the tryton client and it works correctly (the “method not allowed” error only occurs in the web client).

---

<div class="post-metadata">

### Author: ![hodeinavarro](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/hodeinavarro/32/1185_2.png) [@hodeinavarro](https://discuss.tryton.org/u/hodeinavarro)
#### Post date: [May 12, 2022, 7:37am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/5 "2022-05-12T07:37:19Z")

</div>

I’ve my werkzeug dependency at `2.1.2`, maybe it’s worth a try upgrading it since it’s known that pallet dependencies gave some issues, as discussed on [Howto deal with Pallets Projects dependencies](https://discuss.tryton.org/t/howto-deal-with-pallets-projects-dependencies/5148)

You could try also to downgrade it to `2.0.*` since it should be supported if I’m correct.

If that doesn’t solve your issue I’ve no idea ☹

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [May 12, 2022, 8:38am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/6 "2022-05-12T08:38:49Z")

</div>

The error is raised because sao is calling a method that does not exist on the server. This is clearly a sign of running new verison of sao with old version of tryton.

Could you check the output of: `trytond --version` ? If this shows `6.4.x` its a clear sign that you have updated correctly the server.

Please note that you should restart the server to run the new series. Maybe sao is conecting to an older series server?

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [May 12, 2022, 9:11am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/7 "2022-05-12T09:11:39Z")

</div>

> [@pokoli](#):
>
> This is clearly a sign of running new verison of sao with old version of tryton.

Maybe you did a pip install without an activated virtual environment, it’s easy overlooked. So try to run the `trytond --version` with and without an activated virtual environment. If you don’t get an error back in the last case, you have accidentally installed a tryton version outside your virtual environment and you have to uninstall that one.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 12, 2022, 9:21am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/8 "2022-05-12T09:21:43Z")

</div>

Finally I do not think it is a version issue because the method `model.ir.ui.icon.list_icons` exists since a long time.  
But there are some strange things in your report. The logging shows a 400 Bad Request but the client show a 405 Method Not Allowed. So they are not linked.  
This makes me think that the problem is in the proxy (I guess there is a proxy because werkzeug shows request from 10.0.2.2 and [dalescott.net](http://dalescott.net) resolve in another IP).  
So you should look in the browser console which network request is actually returning a 405.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 13, 2022, 3:01am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/9 "2022-05-13T03:01:11Z")

</div>

The fault is perhaps browser related. I was using Chrome on current Linux Mint and on Windows for testing, and after clearing browser data on both platforms the “method not allowed” error has not re-appeared after logging in. Does this seem reasonable?

Thank you everyone for assisting. I am sorry I didn’t think of clearing browser data sooner.

Fwiw, the server is a vm hosted by VirtualBox. It has a local address of 10.0.2.15, and is forwarded to the host IP address ([dalescott.net](http://dalescott.net) 174.0.60.222) by the VirtualBox NAT capability (still using port 8000).

Does this explain anything? Nothing?

Thanks again for your help.

Dale

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 13, 2022, 4:05am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/10 "2022-05-13T04:05:26Z")

</div>

Sorry, I spoke too soon. Clearing browser data only allows one web login. Logging out and then attempting to log back in produces the “method not allowed” error again. Clearing browser data again allows login again, and the cycle repeats.

@pokoli and @edbo, I am not sure what this means. trytond --version returns 6.4.0 with and without activating the venv, but running pip list without activating the venv does not list trytond or any modules.

```auto
[tryton@starlord ~/trytond]$ source env/bin/activate
(env) [tryton@starlord ~/trytond]$ env/bin/trytond --version
trytond 6.4.0
(env) [tryton@starlord ~/trytond]$ deactivate
[tryton@starlord ~/trytond]$ env/bin/trytond --version
trytond 6.4.0
[tryton@starlord ~/trytond]$ pip list
Package Version
---------- -------
pip 20.3.4
setuptools 57.0.0
sqlite3 0.0.0
[tryton@starlord ~/trytond]$ 

```

Is there anything more than can be gained by continuing to troubleshoot? If not, I’ll blow away the venv and do a new install of 6.4.0.

Thanks again,  
Dale

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [May 13, 2022, 9:00am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/11 "2022-05-13T09:00:53Z")

</div>

> [@dalers](#):
>
> Clearing browser data only allows one web login. Logging out and then attempting to log back in produces the “method not allowed” error again. Clearing browser data again allows login again, and the cycle repeats.

This is weird. Can you also try the desktop client? Just download, unpack and run it (`<unpacked_dir>/bin/tryton` if you are on Linux / BSD).  
As Sao is a web **client** it downloads the program first and then runs it. So it seems that at the first time you get the right data but the next time it gets the wrong data from cache.

> [@dalers](#):
>
> Is there anything more than can be gained by continuing to troubleshoot?

Like I said, try the desktop client first. You can also make the Tryton server a bit more verbose by using `-v`. Adding more `v` will make it even more verbose. You can then see which query is failing.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 13, 2022, 2:37pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/12 "2022-05-13T14:37:26Z")

</div>

There are no obvious issues with the desktop client (I tried both Linux and Win 64bit). Fwiw, I had noticed (in the past with 6.2.x) that the web client doesn’t always request password authentication - I only enter my user name and then I’m in. I had wondered if Chrome was automatically entering a remembered password but can’t say for sure why.

I will be able to restart the trytond server with more verbosity and report more in a couple hours.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [May 13, 2022, 8:56pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/13 "2022-05-13T20:56:00Z")

</div>

> [@dalers](#):
>
> - I only enter my user name and then I’m in. I had wondered if Chrome was automatically entering a remembered password but can’t say for sure why.

Sao stores the session to avoid ssking for password so if the session is still valid you can login without password.

Having said that, the server will ask your password when performing some actions like posting an invoice.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 14, 2022, 2:55pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/14 "2022-05-14T14:55:49Z")

</div>

Hi all, today the issue seems to have resolved itself after shutting down and re-starting the server (vm), and restarting trytond with verbosity -vv.

I logged in without issue using Chrome on Win10. I then tried loging in using Chrome on Linux Mint and the “method not allowed” error appeared, but after clearing browser data I have been able to login multiple times without further issue.

Is it recommended to reboot after a series upgrade?

@pokoli, thanks for clarifying when the server asks for a password.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [May 16, 2022, 7:21am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/15 "2022-05-16T07:21:19Z")

</div>

> [@dalers](#):
>
> Is it recommended to reboot after a series upgrade?

You just need to restart all tryton services otherwise they will be running the previous series and not the newer ones.

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [May 16, 2022, 10:11am UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/16 "2022-05-16T10:11:34Z")

</div>

> [@dalers](#):
>
> Is it recommended to reboot after a series upgrade?

Completely rebooting the server is not necessary, but restarting the trytond services is a must. Also if you have any other system in between like NginX you will be hit by caching issues. That’s my experience. I have to restart uwsgi and reload NginX to clear caches.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [May 16, 2022, 11:18pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/17 "2022-05-16T23:18:14Z")

</div>

Thanks everyone for your help. Rebooting the server has solved the problem (possibly because I had forgotten to kill and restart trytond processes before/after upgrading).

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [June 15, 2022, 11:18pm UTC](https://discuss.tryton.org/t/method-not-allowed-error-in-web-client-after-upgrade-to-6-4/5252/18 "2022-06-15T23:18:53Z")

</div>

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