Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Encountered a "Odoo client error", pls advise

By
Markus van Dijk
on 8/27/15, 5:55 AM 1,500 views

Hi,

I am introducing Odoo in our organization and encounter an error in my browser (Firefox and Safari).
After finding the problem location, I have a solution, but I am not certain what the best way forward is. First, is patching the code enough or is this a symptom of another problem? Second, what is the best way to submit the patch? As you might guess, I am new to tinkering with Odoo. Please advise.

Here are the details. Request:

http://192.168.99.100/web?debug=#page=0&limit=80&view_type=list&model=project.project&action=142 

Popup:

Odoo Client Error
TypeError: undefined is not an object (evaluating 'val.constructor')
http://192.168.99.100/web/static/src/js/pyeval.js:814

After clicking OK (:-)) the next pop-up says:

Odoo Client Error
TypeError: undefined is not an object (evaluating 'dict['widget'].get('value')[1]')
undefined:74

 I use Odoo version 8.0-20150401 from the Docker image. The code at odoo-8.0/addons/web/static/src/js/pyeval.js 814 is:

var wrap_context = function (context) {
for (var k in context) {
if (!context.hasOwnProperty(k)) { continue; }
var val = context[k];
if (val === null) { continue; } // <======= also test against undefined?
if (val.constructor === Array) { // <======= line 814
context[k] = wrapping_list.fromJSON(val);
} else if (val.constructor === Object
&& !py.PY_isInstance(val, py.object)) {
context[k] = wrapping_dict.fromJSON(val);
}
}
return context;
};

At first glance I would say that the test for null should also include a test for undefined. Any thoughts from more experienced hackers?

Regards, Markus

Judging by the comments and answers, no one else encounters this problem. It was probably caused by a timeout of the nginx proxy. After tuning the proxy and restoring a backup of the data we seem to have no reoccurrence of the problem. Thank you for your time :-)

Markus van Dijk
on 10/8/15, 10:40 AM
0
Markus van Dijk
On 11/19/15, 5:10 AM

The timeout reported in the nginx log coincided with a request causing long query of the DB. As soon as the nginx timeout was longer than the query time the problem disappeared.

My guess is that the timeout reply received by the client is not converted to a proper error/exception structure in the 'context' array, causing an undefined entry in the array.

FYI: the relevant lines in nginx.conf to prevent the problem in my situation are:

http { 
server {
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;

Hope this helps.

Regards, Markus

0
CGS
On 11/3/15, 4:46 AM

I just got the same error in a custom form, but there is no network traffic when the error occurs. How did you connect it to a proxy problem?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/27/15, 5:55 AM
Seen: 1500 times
Last updated: 11/19/15, 5:10 AM