[6.0] Sometimes, when you click on an item in a tree view, you get a Menu object

Bug #705312 reported by Thibaut DIRLIK (Logica)
156
This bug affects 28 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Won't Fix
High
OpenERP Publisher's Warranty Team

Bug Description

This bug can take many forms, and will happen randomly, but the most common way people notice it is when they end up on a form to view/edit a Menu entry instead of the resource they clicked on.
The problem seems to stem from a bug in CherryPy, as indicated by Christophe Combelles's analysis (see comments #58 and later).

Suggested Workarounds:
- upgrade to a recent version of branch 3.1.X of CherryPy, (3.2+ should be avoided as it may cause other issues, 3.1.2 contains the bug), for example using this command:
   pip install hg+http://bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy
- or if proxying with Apache, add "SetEnv proxy-nokeepalive 1" in your Apache virtualhosts, to disable the use of HTTP/1.1 persistent connections and prevent the CherryPy bug
- or add this in your web client config: "server.socket_timeout = 60" (60 is arbitrary, any large value may work), to allow all waiting requests to complete before allowing CherryPy to timeout the persistent connections

============== ORIGINAL DESCRIPTION ====================
I used the French language when this happenned. I wouldn't reproduced it with english language.

Administration -> Modules -> Modules

Then, click on a module. I got what is show on the screen after I clicked on a module. Here the URL: http://erp6test.we2bs.com/openerp/menu?active=3#url=%2Fopenerp%2Fform%2Fview%3Fmodel%3Dir.ui.menu%26id%3D133%26ids%3D%26view_ids%3D%255BFalse%252C%2520False%255D%26view_mode%3D%255Bu%2527tree%2527%252C%2520u%2527form%2527%255D%26view_type%3Dtree%26domain%3D%255B%28%2527parent_id%2527%252C%2520%2527%253D%2527%252C%252032%29%255D%26context%3D%257B%2527lang%2527%253A%2520u%2527fr_FR%2527%252C%2520%2527client%2527%253A%2520%2527web%2527%252C%2520%2527tz%2527%253A%2520False%252C%2520%2527section_id%2527%253A%2520False%257D%26offset%3D0%26limit%3D20%26count%3D169%26search_domain%3D%255B%255D%26filter_domain%3D%255B%255D%26notebook_tab%3D0

It happend since a moment, and I don't know why. Simetimes it works, sometime it doesn't. If can't reproduce the bug, try to restart your browser, and directly go the modules list.

Note: It happend will other tree views, not only modules.

Tags: maintenance
Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :
Revision history for this message
pitititi (pitititi) wrote :

i've the same problem, in french language too.

Sometime it's the right screen and sometime it's the Menu. It make when i create a new sale quotation or when I edit an existing one :

/openerp/menu?active=72#url=%2Fopenerp%2Fform%2Fedit%3Fmodel%3Dir.ui.menu%26id%3DFalse%26ids%3D%26view_ids%3D%255BFalse%252C%2520False%252C%2520False%252C%2520False%255D%26view_mode%3D%255B%2527tree%2527%252C%2520%2527form%2527%252C%2520%2527calendar%2527%252C%2520%2527graph%2527%255D%26view_type%3Dtree%26domain%3D%255B(%2527parent_id%2527%252C%2520%2527%253D%2527%252C%2520271)%255D%26context%3D%257B%2527lang%2527%253A%2520u%2527fr_CH%2527%252C%2520%2527project_id%2527%253A%2520False%252C%2520%2527tz%2527%253A%2520False%252C%2520%2527client%2527%253A%2520%2527web%2527%252C%2520%2527department_id%2527%253A%2520False%257D%26offset%3D0%26limit%3D20%26count%3D1%26search_domain%3D%255B(u%2527user_id%2527%252C%2520%2527ilike%2527%252C%2520u%2527Administrator%2527)%255D%26filter_domain%3D%255B%255D%26notebook_tab%3D0

openerp/menu?active=72#url=%2Fopenerp%2Fform%2Fedit%3Fmodel%3Dir.ui.menu%26id%3D3%26ids%3D%26view_ids%3D%255BFalse%252C%2520False%252C%2520False%252C%2520False%255D%26view_mode%3D%255B%2527tree%2527%252C%2520%2527form%2527%252C%2520%2527calendar%2527%252C%2520%2527graph%2527%255D%26view_type%3Dtree%26domain%3D%255B(%2527parent_id%2527%252C%2520%2527%253D%2527%252C%2520271)%255D%26context%3D%257B%2527lang%2527%253A%2520u%2527fr_CH%2527%252C%2520%2527project_id%2527%253A%2520False%252C%2520%2527tz%2527%253A%2520False%252C%2520%2527client%2527%253A%2520%2527web%2527%252C%2520%2527department_id%2527%253A%2520False%257D%26offset%3D0%26limit%3D20%26count%3D1%26search_domain%3D%255B(u%2527user_id%2527%252C%2520%2527ilike%2527%252C%2520u%2527Administrator%2527)%255D%26filter_domain%3D%255B%255D%26notebook_tab%3D0

Revision history for this message
pitititi (pitititi) wrote :

Browser : Firefox 3.6.13 and Chromium
OS : Ubuntu

Revision history for this message
Somesh Khare (somesh.khare) wrote :

Hello Thibaut DIRLIK,

Are you sure that you are using the latest code as I was unable to get the error in the latest Stable 6.0. Please update your code and notify us if the problem still exist at your end.

Thanks.

Changed in openobject-client-web:
status: New → Incomplete
Revision history for this message
pitititi (pitititi) wrote :

I've the last 6.0 stable code from yesterday and the error appear

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

Hi,

I confirm what pititi said. I updated right now, stil have the problem. It is really annoying.

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

(Using FF Beta 4)

Revision history for this message
Somesh Khare (somesh.khare) wrote :

Hello Thibaut DIRLIK,

I wonder that the code is working as expected at my end. Please update all the project and check with the new database.

Thanks.

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

I'm behin an apache proxy, maybe it might be a problem. Is it your case pitititi ?

Revision history for this message
pitititi (pitititi) wrote :

yes i've a proxy too

Revision history for this message
pitititi (pitititi) wrote :

after some check, i've no idee when it bug and when it don't...

Revision history for this message
Somesh Khare (somesh.khare) wrote :

Hello Thibaut DIRLIK,

Thanks for your reply.

I have not found any such issue in the latest stable 6.0.1. As for now I am closing this bug you can reopen this bug if the issue still occurs at your end.

Thanks.

Changed in openobject-client-web:
status: Incomplete → Invalid
Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

I could reproduce this bug only with OpenERP behind an apache proxy. But I can't say if it's a problem of proxy configuration or not.

Revision history for this message
Dominique Chabord (dominique-chabord) wrote :

this bug is reported also with 6.0.1 on my demo server, which is behind a proxy.

Revision history for this message
Dominique Chabord (dominique-chabord) wrote :

Some users experiment it every time, some never.

Revision history for this message
Dominique Chabord (dominique-chabord) wrote :
Revision history for this message
fred (blancfred) wrote :

Same problem, it seems that it works for me after deleting some openerp cookies from firefox. I am using Dominique's servers for tests so I have no idea of the server config.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

It seems a cache issue, maybe originated from some old not-working revision.
Usually, after deleting browser cache, it works

Revision history for this message
Sébastien Chaumat (schaumat-free) wrote :

In my tests the bug occurs through the reverse-proxy only. Direct access on the openerp server does not exhibit the issue.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Sébastien, Dominique, Thibaut, which kind of proxy setup are you using? Apache? Would it be possible to have an excerpt of your config files?

Lorenzo and fred indicate that after clearing out browser caches/data the problem disappears, does it disappear forever or does it reappear later on (to know if it's stale data from a previous version or if it's the client breaking something as it goes along)?

Changed in openobject-client-web:
status: Invalid → Incomplete
importance: Undecided → High
Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

I was using a basic apache proxying with mod_proxy, redirecting request to a specified host on the openerp server. We removed the proxy and used apache RewriteRules instead and we didn't had this problem anymore.

Unfortunatly, I don't have access to the apache config file. Personaly, refreshing the cache didn't solve the problem when I had it.

Revision history for this message
Sébastien Chaumat (schaumat-free) wrote : Re: [Bug 705312] Re: Sometimes, when you click on an item in a tree view, you get a Menu object

Our proxy config (apache 2.2) looks like (note this is a SSL host) :

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/our.crt
        SSLCertificateKeyFile /etc/apache2/ssl/our.key
        SSLCertificateChainFile /etc/apache2/ssl/some.crt

      ProxyRequests Off

#test, no effect on bug 705312# ProxyPreserveHost On

        <Proxy *>
               order allow,deny
               allow from all
        </Proxy>

        ProxyPass / http://real-server.qspin.be:8080/
        ProxyPassReverse / http://real-server.qspin.be:8080/

Sébastien

2011/2/9 Xavier (Open ERP) <email address hidden>

> Sébastien, Dominique, Thibaut, which kind of proxy setup are you using?
> Apache? Would it be possible to have an excerpt of your config files?
>
> Lorenzo and fred indicate that after clearing out browser caches/data
> the problem disappears, does it disappear forever or does it reappear
> later on (to know if it's stale data from a previous version or if it's
> the client breaking something as it goes along)?
>
> ** Changed in: openobject-client-web
> Status: Invalid => Incomplete
>
> ** Changed in: openobject-client-web
> Importance: Undecided => High
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (714451).
> https://bugs.launchpad.net/bugs/705312
>
> Title:
> Sometimes, when you click on an item in a tree view, you get a Menu
> object
>

Revision history for this message
fred (blancfred) wrote : Re: Sometimes, when you click on an item in a tree view, you get a Menu object

Eventually the problem reappears and somehow it looks like it is not predictible : in a very short time range (2-3 min), same menu, same browser, one time it works one time it goes to the ir.menu... or sometimes elsewhere,
Tested on new base with demo data and the sales module only: doesn't work sometimes for partner addresses, modules, products... french language.

Revision history for this message
Sébastien Chaumat (schaumat-free) wrote :

The issue is solved for me (so far) by simply replacing the ProxyPass directive by a RewriteRule :

 RewriteEngine on
        RewriteRule ^/(.*) http://real-server:8080/$1 [P]
        ProxyPassReverse / http://real-server:8080/

Tracking the defect should be easier now looking at the http request between client/proxy/server in both cases.

Revision history for this message
beroz (abeer-elsayed) wrote :

I have the same problem .. when I press on menu items randomly i got a screen "cached one" for a page not related to the pressed menu item (but related to ir.menu object).. tested on debian 6 and ubuntu... And I am not behind any broxy..

Revision history for this message
beroz (abeer-elsayed) wrote :

I am using english language.. also following the same steps on the tutorial.. but why all people here installing it behind a proxy? is there a reason behind that?

Changed in openobject-client-web:
status: Incomplete → Confirmed
Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
tags: added: maintenance
Changed in openobject-client-web:
milestone: none → 6.0.2
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

The reason why we install the Webclient behind a proxy, it's to secure it with an SSL certificate.
Correct me if I made a mistake, but Webclient Openerp doesn't support https for user interface in native mode.

Vincent

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> Correct me if I made a mistake, but Webclient Openerp doesn't support https for user interface in native mode.

That is correct.

Revision history for this message
beroz (abeer-elsayed) wrote :

Xavier, sorry, what do you mean by "user interface in native mode" ?

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

That while theoretically CherryPy's built-in server supports https since 3.0 (requires pyOpenSSL and setting the server.ssl_certificate and server.ssl_private_key configuration properties) I'm not aware of anybody having tested that much (if ever), and that the "supported" method for making a web client accessible via https is to make it sit behind an https proxy.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

i spent a few hours trying to repro this bug with a simple reverse proxy (similar to Sébastien's), could not repro it so far.

I will try again under SSL as I've only been using raw HTTP. Is there anybody reproducing/suffering this bug without using SSL?

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

Since I use the v6 stable, I do not encounter this bug almost over, but it happens sometimes, without any specific reason. We are not using a proxy anymore, but apache mod_rewrite because of this bug in the past, and it never happened with SSL because I didn't use it when I did the bug report.

I know I don't help you, but at least, this bug seems to dissapear slowly :D

Revision history for this message
beroz (abeer-elsayed) wrote :

It happens to me .. and I am not behind a proxy ... and I am not using ssl .. and this is my installation http://178.79.148.238:8080/openerp you could try demo DB with admin/admin ... click randomly.. and create a sales order .. then do that for 3-5 minutes.. till it caches.. when you press any link after that it will open the menu screen ...let me know whether I could help me more in describing it or not

Revision history for this message
Sébastien Chaumat (schaumat-free) wrote : Re: [Bug 705312] Re: Sometimes, when you click on an item in a tree view, you get a Menu object

Could this be related to caching ?

- thus this could depend on the browser cache state and the browser
version (that evolve from days to days with all those patching around
here)
- this could depend of the proxy internal cache

One way to test would be to force no-cache in the web ui.

Were could I force this easily to test on my know-to-be-buggy server ?

Sebastien
2011/2/28 Thibaut DIRLIK <email address hidden>:
> Since I use the v6 stable, I do not encounter this bug almost over, but
> it happens sometimes, without any specific reason. We are not using a
> proxy anymore, but apache mod_rewrite because of this bug in the past,
> and it never happened with SSL because I didn't use it when I did the
> bug report.
>
> I know I don't help you, but at least, this bug seems to dissapear
> slowly :D
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (714451).
> https://bugs.launchpad.net/bugs/705312
>
> Title:
>  Sometimes, when you click on an item in a tree view, you get a Menu
>  object
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-client-web/+bug/705312/+subscribe
>

Revision history for this message
beroz (abeer-elsayed) wrote : Re: Sometimes, when you click on an item in a tree view, you get a Menu object

I am not sure this is related to cache or not.. but this is how I thought in the bug .. may the the request is not correct... by the way.. I tested it over IE and firefox and the problem happened on both

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

I tried to repro this again this morning, on four different browsers (Safari, Chrome and Firefox under OSX, IE8 under Win7) using beroz's server (thanks for that) and still didn't manage to repro the issue.

Beroz, when you say:

> click randomly.. and create a sales order .. then do that for 3-5 minutes..

Do you mean create a sales order then keep clicking for some time, or create a sales order then create more sales orders? If you can reliably trigger the bug, do you think you could take some kind of video of your desktop while doing so? And if you're proficient with your browser's request-introspection tools (Fiddler for MSIE, Firebug for Firefox and Webkit Developer Tools for Safari and Chrome) would it be possible to get the last half-dozen of request/responses until the bug appears?

> One way to test would be to force no-cache in the web ui.

> Were could I force this easily to test on my know-to-be-buggy server ?

For the browser cache, most browser allow you to clear the cache via their preferences (in Chrome, Preferences > Under the bonnet > Clear browsing data… for instance). The Firefox extension "Web Developer Toolbar[0]" also allows you to disable the cache completely (Disable > Disable Cache).

For the web client cache, it is not active if the current environment is set to "development".

[0] http://chrispederick.com/work/web-developer/

Revision history for this message
beroz (abeer-elsayed) wrote :

Hello Xavier ,
 I have uploaded a screencast to http://cars.com.eg/menu_object_problem.avi

I want to mention three notes:
1. I am following the installation tutorial on openerp documentation exactly, may be there is a step not written and could produce the problem?
2. When I press "configure" the problem become solved... and this is why i thought it is related to cach..
3. When I clear cach it solves the problem, BUT it happens again after some minutes..

Please let me know if you need any more clarification.. or if you have exact steps you need me to try on my testing server..

Abeer

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

beroz, thank you very much for the video. i tried following it step by step (though I note that in the screencast the bug seems to be triggered — at least originally — when clicking on [New], not when clicking on a menu item) and was still unable to make it happen (under Win7 using IE8, FF 3.6 or Chrome whatever's the latest, as I note you seem to be using Windows).

What happens if you go to the index page (by clicking on the logo in the top-left of the screen) and reload the page by pressing Control+F5 (in firefox, at least), and then try to trigger the bug again?

Revision history for this message
beroz (abeer-elsayed) wrote :

When I do so, it solved the problem.. does that mean it is something related to caching?

Revision history for this message
beroz (abeer-elsayed) wrote :

And it happened again now :S ... I open each subitem and press new, then press another item and press new ... keep this behaviour for some minutes.. it will happen... do you like me to share my screen on skype for example? I could show you how it happen...

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

OK sounds like it doesn't have much to do with caching if it comes back (Control-F5 asks Firefox to reload the page from scratch, without loading files from cache), but has to do with the javascript wedging itself one way or another and getting into a "broken" state.

Revision history for this message
beroz (abeer-elsayed) wrote :

I think it might have to do with javascript AND caching because when I press Control-F5 on firefox the problem is fixed (temporarily in this page reload)

Revision history for this message
Christophe Combelles (ccomb) wrote :

I've also found this bug many times, sometimes during a customer demo, which is extremely annoying.

I've tried to understand, and the only reproduceable behaviour I noticed is:
- log in on your computer with the admin account
- DON'T log out, and ask a remote user on a different computer with a different IP address to log in using the SAME admin account.
- Ask the remote user to create a lead, or invoice or something.
=> he should see the wrong ir.ui.menu form
- Now LOG OUT on your side, and ask him again to create a lead
=> he should now see the correct wanted form!

Do the same the other way around, it's the same. It seems related to the cookies or session.

- I could not reproduce it on the same computer with the same ip address and two different browsers
- however I could reproduce it on the same computer using alternatively a wifi connection and a 3G connection both with a different IP address, and with two different browsers.
So I've only seen it when two people are remotely using the same account from two different places. The first user that logs in can use it without problem, the second logged-in user gets this wrong ir.ui.menu form until the 1st one logs out.

Revision history for this message
beroz (abeer-elsayed) wrote :

Yes, another scenario that could re-produce the bug, but you should have two version installed in different machines:

1. Login to your database on the first machine remotely (I am trying with admin login) and make an invoice for example
2. Don't log out
3. Login to the second machine and press new to any object "sales lead for example".. it will make the problem happen..

So I guess it is a session related issue..

Revision history for this message
Ferdinand (office-chricar) wrote :

On one windows computer it is reproducable
first login - click on menu etnry opens menu
logout
login again - works
may be this helps

Changed in openobject-client-web:
milestone: 6.0.2 → 6.0.3
Revision history for this message
fred (blancfred) wrote :

Don't know if it is related but looks like: I tryed to change the dashboards that appears when you clic on top menu (sales...).
by web access behind proxy, the dashboards don't change at all, even if you delete the form content. it works with gtk client, or with a local server without proxy.

Revision history for this message
Vitaliy Sh. (alukard-aka-404-gmail) wrote :

Hmm.. I Also have it problem.
I now use two pc. On one pc with "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1.16) Gecko/20110107 Iceweasel/3.5.16 (like Firefox/3.5.16)" i don't see it and on pc with "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.17) Gecko/2011 0420 Firefox/3.6.17 sputnik 2.2.0.35" I have it.

Lang: ru_RU

Revision history for this message
Xavier ALT (dex-phx) wrote :

Hi guys,

I'm also affected by this problem from a long time now, ... but I made some progress.

It seems that the left panel (containing the menu tree) sometime get polluted with actions hidden input (<input id="_terp_model" .../>), and in that conditions we get two input with the same id "_terp_model" and the javascript obviously the the wrong one.

So the call graph will look something like this:
- clic edit pen
- editRecord()
- openRecord()
- openobject.dom.get('_terp_model')
- MochiKit.DOM.getElement(elem) <== return the _terp_model from the left panel

Are they any web client expert around?

Cheers,

Revision history for this message
Juan José Scarafía (ADHOC) (juanjose-scarafia) wrote :

I was having exactly the problem you describes but it has been solved making what Sébastien Chaumat suggest:

The issue is solved for me (so far) by simply replacing the ProxyPass directive by a RewriteRule :

 RewriteEngine on
        RewriteRule ^/(.*) http://real-server:8080/$1 [P]
        ProxyPassReverse / http://real-server:8080/

that solves the error (I'm using apache to redirect from different domains to different servers)

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Hello i test it with RewriteEngine directive suggest but it does not solve in windows XP with whatever browser what i used

Regards,

Revision history for this message
Jacobus Erasmus (jacobus) wrote :

I'm having this problem as well. Very frustrating. In my case both behind a transparent proxy (ISP enforced) and a https reverse proxy (Apache) also tried rewriteEngine vs ProxyPass and some other fixes to CherryPy.

It has made the situation better but I still have problems.

In my case I simply change the IP of the originating PC and the situation is better.

Revision history for this message
ksh (Axelor) (ksh-axelor) wrote :

Hello everyone,

      I want to add some more details, which may lead us to solution.
      @xmo,
             When we run webclient behind proxy
             When we click on any application menu (say 'Accounting'), it will load all its menu (left accordian) requesting SERVER-PATH/openerp/tree/data.
     And if some (one or more) of these requests SERVER-PATH/openerp/tree/data is failed with response `502 Bad Gateway error`,
             then due to this request fail,the <li id="content_PARENT_MENU" class="accordion-content">, where PARENT_MENU is the root item for which request fails
             a hidden <form> is injected into the DOM, Which contains some hiddens (may be grom screen widget!) _terp_model = 'ir.ui.menu', _terp_domain = '[(parent_id, '=', PARENT_MENU_ID)]', _terp_context, _terp_view etc.(this <form> injection will be performed for each request which fails in that menu list)

             So when, user click on any list item in search-view, DOM operation will get _terp_model's value as ir.ui.menu, which will lead to ir.ui.menu form.

             I have tried to fix this issue with following apache settings:
             Timeout 5400
      ProxyTimeout 5400

    Note: 1. This situation will also produce search bug, you will not be able to search on any field other then name!(because name field is avaliable in ir.ui.menu), as model passed in /openerp/search/eval_domain_filter is 'ir.ui.menu'.
    2. I observed error mostly occurs when Application Menu has large number if menus.

         @Xavier ALT, your trace helped me to found the cause, thank you.

Revision history for this message
Antoine Vanoutryve (e-antoine) wrote :

Same problem here but without any proxy or apache. We use the following iptables's rule :

-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080

Changed in openobject-client-web:
status: Confirmed → Won't Fix
Revision history for this message
beroz (abeer-elsayed) wrote :

Excuse me, why "Won't Fix" ?

Revision history for this message
Christophe Combelles (ccomb) wrote :

In my opinion this bug is critical. It makes the full web ui completely unusable in an un predictable way. It really deserves some investigation.

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Totally agree, is completly unusable, at least gives a technical detail to understand where is the problem.

Regards,

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

I guess that if they have had an idea, they would have fixed the bug. Or they just don't care because of the new webclient ? Because I first reported this bug 9 months ago, and there still have no fix, wheras a lot of people are concerned, and a lot of people explained the problem.

This bug just make the webclient totally unusable, I don't understand why you didn't work on this.

Revision history for this message
Christophe Combelles (ccomb) wrote :

OK after trying everything for hours, here is my conclusion. Could you please check if I'm right?

First here are some relevant links:
http://www.openerp.com/forum/topic12945.html
http://groups.google.com/group/cherrypy-users/browse_thread/thread/e751976da1d01390

The real issue comes from this :
=========================
https://bitbucket.org/cherrypy/cherrypy/issue/853/consistent-time-out-of-the-wsgi-server

If you're using CherryPy 3.1, you have several workarounds:
- either add SetEnv proxy-nokeepalive 1 in your Apache virtualhosts
- better solution: add this in your web client config: server.socket_timeout = 60 (60 is arbitrary)
Changing ProxyTimeout did not change anything for me.

But since the real bug is in cherrypy, the best solution is to upgrade at least to cherrypy 3.2.0, or 3.2.2.

For the OpenERP web client 6.0 branch maintainers, the best thing is to :
- change the doc in http://doc.openerp.com/v6.0/install/linux/web/index.html to tell CherryPy >= 3.2.0. I woul also require to use at least python>=2.6 (but I've checked the minimal python version required by cherrypy)
- change the requirements in the web client's setup.py to : "CherryPy >= 3.2.0" and not "CherryPy == 3.1.2". BTW it's a bad idea to pin egg versions in the setup.py because you prevent people from upgrading. Versions should rather be chosen either manually, or in a pip requirements file, or better in a buildout [versions] section.

For the buildout part, I'll update the recipe to take this into account. http://pypi.python.org/pypi/anybox.recipe.openerp

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Thanks for your debug for this bug, but i found a problem. we get some problems in web client using 3.2.x for cherrypy.

Would be great read a technical debug from OpenERP developers.

Regards,

Revision history for this message
Christophe Combelles (ccomb) wrote :

Could you tell which problems you have with 3.2.x ?
I've been using it intensively for more than 2 hours without problem this evening. However R. Valyi also seems to have problems (with encoding)...

Changed in openobject-client-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Christophe Combelles (ccomb) wrote :

OK I've some more news, installing CherryPy 3.2 is not a good idea for now because of encoding problems. See https://bitbucket.org/cherrypy/cherrypy/wiki/UpgradeTo32

I've retrieve the hg clone of cherrypy and the 3.1.x branch happen to have several fixes not yet released, that actually fi the problem. So the real good solution is to install CherryPy 3.1.3 once it is released, and now the only thing to do is to install the latest revision (3229:4c7d91d0b329) in the cherrypy-3.1.X branch :

pip install hg+http://bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy

This fixes the following bugs :
https://bitbucket.org/cherrypy/cherrypy/issue/1073
https://bitbucket.org/cherrypy/cherrypy/issue/952
https://bitbucket.org/cherrypy/cherrypy/issue/951
https://bitbucket.org/cherrypy/cherrypy/issue/940
https://bitbucket.org/cherrypy/cherrypy/issue/942
https://bitbucket.org/cherrypy/cherrypy/issue/945

The most important for our concern being #940

Revision history for this message
beroz (abeer-elsayed) wrote :

@Christophe Combelles: This command is not working with me :S

pip install hg+http://bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy

Is there something i should write before it?

 in pip-log.txt:

Requirement 'hg+http://bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy' looks like a filename, but the file does not exist
Unpacking ./hg+http:/bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/pip.py", line 252, in main
    self.run(options, args)
  File "/usr/lib/python2.6/dist-packages/pip.py", line 408, in run
    requirement_set.install_files(finder, force_root_egg_info=self.bundle)
  File "/usr/lib/python2.6/dist-packages/pip.py", line 1757, in install_files
    self.unpack_url(url, location)
  File "/usr/lib/python2.6/dist-packages/pip.py", line 1817, in unpack_url
    self.unpack_file(source, location, content_type, link)
  File "/usr/lib/python2.6/dist-packages/pip.py", line 1917, in unpack_file
    or tarfile.is_tarfile(filename)
  File "/usr/lib/python2.6/tarfile.py", line 2529, in is_tarfile
    t = open(name)
  File "/usr/lib/python2.6/tarfile.py", line 1653, in open
    return func(name, "r", fileobj, **kwargs)
  File "/usr/lib/python2.6/tarfile.py", line 1715, in gzopen
    fileobj = bltn_open(name, mode + "b")
IOError: [Errno 2] No such file or directory: '/root/hg+http:/bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy'

Revision history for this message
Christophe Combelles (ccomb) wrote :

@beroz maybe you have an old version of pip ? Try upgrading it first. Make sure you have Mercurial installed as well (hg)

Revision history for this message
Christophe Combelles (ccomb) wrote :

I've created a branch that fixes the fact that ajax errors fail silently and is the reason we see this kinf of behaviour.
https://code.launchpad.net/~anybox/openobject-client-web/bad-cherrypy-warning/+merge/80948

Revision history for this message
Christophe Combelles (ccomb) wrote :

Please note that the pip install command I've given in comment #61 does not work with pip 0.7, it will install cherrypy 3.2.2. You should use a more recent pip, (pip install pip --upgrade)

Revision history for this message
Christophe Combelles (ccomb) wrote :
Changed in openobject-client-web:
status: Won't Fix → Confirmed
milestone: 6.0.3 → 6.0.4
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Christophe, many thanks for the investigation and detailed analysis, and the suggested patches, this is invaluable!
We should be able to reproduce it by forcing a shorter timeout or manually patching CherryPy, and thus properly handle this bug.

Maybe instead of raising an error we could implement a workaround to solve the issue for the majority of the people that will find upgrading CherryPy difficult. Perhaps it would be possible to simply perform the request again in case a 408 error is received, as this is really the expected way to handle a 408, even if in this case CP replies to the wrong request. Re-sending the request would also fix the issue of having no response.
Of course this doesn't prevent us from suggesting an upgrade of CP and doing it ourselves for the all-in-one packages.

Incidentally, this analysis[1] means that the request that gets a 408 would need to be sent a few hundreds of milliseconds after the bulk of the requests have been sent, but not later than that, otherwise the browse will not reuse the dropped persistent connection. This delay could be the result of the synchronous parsing/loading of script blocks, or other similar things.
Maybe this is useful to know to reproduce or implement the workaround.

[1] https://bitbucket.org/cherrypy/cherrypy/issue/847#comment-693355

description: updated
Revision history for this message
Christophe Combelles (ccomb) wrote :
Revision history for this message
Cristian Salamea (ovnicraft) wrote : Re: [Bug 705312] Re: Sometimes, when you click on an item in a tree view, you get a Menu object

On Mon, Oct 31, 2011 at 5:58 PM, Christophe Combelles <email address hidden> wrote:

> Could you tell which problems you have with 3.2.x ?
> I've been using it intensively for more than 2 hours without problem this
> evening. However R. Valyi also seems to have problems (with encoding)...
>
>
With 3.2.2 i get problems with encoding.

Regards,

> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Web Client.
> https://bugs.launchpad.net/bugs/705312
>
> Title:
> Sometimes, when you click on an item in a tree view, you get a Menu
> object
>
> Status in OpenERP Web Client:
> Won't Fix
>
> Bug description:
> I used the French language when this happenned. I wouldn't reproduced
> it with english language.
>
> Administration -> Modules -> Modules
>
> Then, click on a module. I got what is show on the screen after I
> clicked on a module. Here the URL:
>
> http://erp6test.we2bs.com/openerp/menu?active=3#url=%2Fopenerp%2Fform%2Fview%3Fmodel%3Dir.ui.menu%26id%3D133%26ids%3D%26view_ids%3D%255BFalse%252C%2520False%255D%26view_mode%3D%255Bu%2527tree%2527%252C%2520u%2527form%2527%255D%26view_type%3Dtree%26domain%3D%255B%28%2527parent_id%2527%252C%2520%2527%253D%2527%252C%252032%29%255D%26context%3D%257B%2527lang%2527%253A%2520u%2527fr_FR%2527%252C%2520%2527client%2527%253A%2520%2527web%2527%252C%2520%2527tz%2527%253A%2520False%252C%2520%2527section_id%2527%253A%2520False%257D%26offset%3D0%26limit%3D20%26count%3D169%26search_domain%3D%255B%255D%26filter_domain%3D%255B%255D%26notebook_tab%3D0
>
> It happend since a moment, and I don't know why. Simetimes it works,
> sometime it doesn't. If can't reproduce the bug, try to restart your
> browser, and directly go the modules list.
>
> Note: It happend will other tree views, not only modules.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-client-web/+bug/705312/+subscriptions
>

--
Cristian Salamea
@ovnicraft

Revision history for this message
Cristian Salamea (ovnicraft) wrote : Re: Sometimes, when you click on an item in a tree view, you get a Menu object

Hello Olivier, there is any news for this bug ?

I still can reproduce the bug with 3.1.3 tag from bitbucket and proxy configurations recommended here.

Regards,

summary: - Sometimes, when you click on an item in a tree view, you get a Menu
- object
+ [6.0] Sometimes, when you click on an item in a tree view, you get a
+ Menu object
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: [Bug 705312] Re: Sometimes, when you click on an item in a tree view, you get a Menu object

On 02/28/2012 04:02 AM, Cristian Salamea (Gnuthink) wrote:
> I still can reproduce the bug with 3.1.3 tag from bitbucket and proxy
> configurations recommended here.

This bug is basically an upstream bug that we cannot fix ourselves.

As far as I know there is no 3.1.3 tag yet for CherryPy, they are still waiting
for people to test the 3.1.x branch with older versions of Python.
So I don't know what version of CherryPy you are testing with.
See the bug that Christophe reported on
  https://bitbucket.org/cherrypy/cherrypy/issue/1102/313-release-needed

We have not found any proper workaround for this issue, as there is no browser
hook to detect 408 errors and automatically retry them (and the requests that
are failing are not only Ajax, but resources loaded by the browser itself,
which we cannot catch).
You can try Christophe's branch that attempts to catch errors at Ajax level,
but that does not fix the problem, and does not cover all cases where such a
408 error may be raised by CherryPy, as far as I can tell.

Your best bet at the moment is to follow the workarounds that are mentioned in
the bug description. If you can still reproduce the bug and you are 100% sure
you correctly applied the workarounds from the bug description, you will need
to provide us with detailed steps to reproduce and as much analysis as you can
perform, to see if you are hitting a different bug.

In the mean time, the best way to help is to test the 3.1.x branch of CherryPy
with Python 2.4 or Python 2.5 as requested on the ticket, in order to make
release 3.1.3 a reality:
  https://bitbucket.org/cherrypy/cherrypy/issue/1102/313-release-needed

Revision history for this message
Niels Huylebroeck (red15) wrote :

I've tried upgrading to CherryPy 3.1.x from hg repository, yet the error is still occurring for me.

Revision history for this message
Mannu Sharma (mannu) wrote :

Sébastien hint helped me also, previously I was using proxy but on setting parameter ProxyPreserveHost Off solved my problem.

Thank You all.

Revision history for this message
castor (castor-calle) wrote :

I have the same problem but i fix that just with a good internet conexion...

Revision history for this message
senthilnathang (bornspy) wrote :

Why this bug has not been fixed yet ?

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

For the record, there is no 100% working way to correct this issue within OpenERP, the best and simplest fix is to upgrade to a version of CherryPy that does not have this bug, for example by issuing the following command:
    pip install hg+http://bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy

See also the bug description for other workarounds you can try if you cannot upgrade CherryPy properly.

I'm marking this bug as "Won't Fix" to avoid confusing more people: we can't patch OpenERP to fix it.

PS: OpenERP 6.1 and later are not affected at all by this issue.
PS2: you can try Christophe's branch mentioned in comment #66 if you can't update CherryPy but it will not fix the problem, it only tries to workaround a few cases where it occurs and show an error popup instead (and there are many cases it cannot catch, such as the loading of Javascript source files, etc.)

Changed in openobject-client-web:
status: Confirmed → Won't Fix
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Hello Olivier, as i said in comments before with reported it and apply OPW but nothing happens was never solved.
Upgrade cherrypy does not solve the problem and it affects only 6.0.

Its not in few cases, it happens always, please check how to reproduce.

Regards,

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hi Cristian,

I can only stress out the points I already mentioned (see also my comment #71 replying to your comment #70): the bug cannot be fixed in OpenERP itself, OPW or no OPW.

Technically the source of the problem is explained in CherryPy issue #853, specifically this comment:
    https://bitbucket.org/cherrypy/cherrypy/issue/853/#comment-693283

If you're interested you can read the code of the CherryPy fix here:
   https://bitbucket.org/cherrypy/cherrypy/commits/af590589b13770772830093dfd6feecf19ff24d2
You'll see that it's a very low-level problem that is very difficult to patch within OpenERP, short of doing a lot of ugly monkey-patching of CherryPy - at which point it would be ridiculous not to update CherryPy, as the fix *is* available (even if it's not packaged in an official CherryPy release)

So if upgrading to the 3.1.X branch of CherryPy does not fix the problem you should consider these possibilities:

- You did not perform the CherryPy upgrade correctly. For example you mention using a 3.1.3 tag of CherryPy but that does not exist. The recommended way it to use this command:
   sudo pip install hg+http://bitbucket.org/cherrypy/cherrypy@4c7d91d0b329#egg=cherrypy
- It is frequent to have multiple Python versions/environments installed on a single machine, and you may not have upgraded all of them - be sure to upgrade the one that is used by your OpenERP 6.0 Web Client, then restart it!
- Watch out: the 3.1.X branch is still labelled "3.1.2" so `pip freeze` and python -c 'import cherrypy;print cherrypy.__version__' will both report 3.1.2 as the version. You can't verify if CherryPy is correctly patched in this way. But you can look at the installed CherryPy source code to see if the changes of the patch linked above are present.
- You might actually be seeing a different issue than the one described here. You can double-check: the CherryPy bug will cause requests to be randomly dropped with a 408 HTTP error code - you can easily see this with your browser's debugging tools (e.g. Chrome Developer Tools, Firebug, etc.). If you don't see those 408 errors you might have a different problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.