Odoo - Long process leads to XmlHttpRequestError BAD REQUEST error - odoo

In odoo while I am doing any long process such as getting data from
amazon and process those data in odoo and after 5-10 min I am getting
this error don't know the reason why this happen.
XmlHttpRequestError BAD REQUEST
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>400 Bad Request</title>
<h1>Bad Request</h1>
Invalid JSON data: ''
The process seems running in background in server but I am getting this error every time. This leads users into the wrong direction.
I am wondering why I am always getting this error? Is that a normal behavior ?
Even data processing will be done properly even after getting this
error, so I am not getting the meaning why this error pop out only in
long process.
Is there timeout issue happen with web server ?
Where I need to look out for that ?
UPDATE
I have did this process from different system and it seems everything
working fine over there.
So what my guess is "It is something related to browser end only"
May be browser is not able to manage such idle requests (may be any
request time out settings needs to be updated)

Solution:
It wasn’t clear at first but the tracing telling me exactly what the problem is “cookie”.
The problem was due to a cookie that has become corrupted. Not sure
how it got that way but it seems that the last time it was generated
something went wrong. The easy solution is to delete all your
cookies of that particular domain or should do this from private
window (incognito mode).

Related

Synchronous XMLHttpRequest broke website today

I got into work today and got a telling off from my boss because the company website wasn't loading properly on mobile. I looked in the console and saw the following error... Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.. I clicked the link https://xhr.spec.whatwg.org/#xmlhttprequest and the update was made yesterday (7th June 2016). How do I fix this error?
Usually the message you provided should not break a page from being rendered.
It just states that you should not use Synchronous XMLHttpRequest.
Synchronous requests will slow down rendering since the site has to wait for each request to complete in an iterative manner.
To "fix" that all your AJAX requests must be set to be async.

WebAPI hangs indefinitely when receiving a POST with incorrect Content-Length in header

I have a project set up using ASP.NET WebAPI on top of Azure, and am having a problem whenever I try to make an HTTP Post where the content-length is too long in the header.
Normally I would've just ignored this problem, because you should be correctly setting the content-length on POST, but it turns out that when this happens, it causes the session to hang indefinitely, and then the Azure emulator crashes.
I have a custom JSON Formatter which extends MediaTypeFormatter, and I set a breakpoint on the first line of my implementation of OnReadFromStreamAsync(). However, the breakpoint is never hit because the hangup happens before ever hitting the JSON Deserializer.
I really have no idea where this hanging is occurring from because I receive no exception, just an indefinite hang and occasional Azure emulator crash.
Thank you in advance for any help or insight you might provide!
This sounds like a bug. The good thing is that you can get updated developer bits form codeplex.
There is a chance what your experiencing is related to one of these:
WebAPI: Stream uploading under webhost is not working
DevDiv 388456 -- WebHost should not use Transfer-Encoding chunked when
content length is known.
Zero ContentLength without content type header in body is throwing
If the updated bits don't fix your problem I suggest you try the standard media formatters to rule in/out your formatter. Failing that, then submit an issue.

Java Server Side Error message validation without actually submitting an application

I am trying to create a testing application to validate server side error messages. Right now our framework is such that each time a incorrect value is entered in a field and the submit button is clicked and on submission, the error message displayed on the page is captured.
Is there anyway I can bypass this technique, such that the validation happens only in the server side and is passed back to the client side, without having to reload the page each time.
Any other ideas would be much appreciated. Please try to ignore the lameness of the question :( I'm just starting off and wanted to try something new to reduce the time taken to capture the error messages.
Thanks a lot..!!
Use AJAX, Luke!
There are a lot of options to do this. You may use jQuery.ajax for sending your form data to some validation servlet. Or you may use JSF for it. It largely depends on your framework and/or architecture of your application.

Classic ASP - Error Catching

I'm working on a site and to help catch errors that we may not hear about, I've created a custom 500 error page.
This page basically records information about the current situation and logs it including the following:
Request.Servervariables("URL")
But, the log seem to actually be providing information about the location of the error.asp file instead of the actual file causing the error. And it doesn't seem to pick up Server.GetLastError().
Any ideas on how to ensure these scripts pick up the errors and deatils about the page causing the error and not the page that is used for 500 errors?
NOTE: When there's an error, the url in the address bar is always the address fo the page causing the error, but the log shows the error handler page 'error.asp'.
I would follow what Dee said, but also be aware that there was something finicky with IIS7 (or 7.5). I can't remember exactly, but you have to do something special to make sure it works on IIS7. Check out this article. IIS7 breaks the server.getlasterror and there is a workaround provided.
Also a cool thing to do is to email yourself those errors. So in your custom 500 asp script just fire off an email with the details. Depends on how critical errors are to your program, but it's good to be in the loop rather than have another log to worry about.

IE halts loading HTML page abruptly

Understanding that my problem could have a very vast scope of possibilities, I'll accept the answer that points me to something that I might have missed.
My software's client is facing this issue of page stopping loading in the middle and that too happens randomly. As usual, this does not happen in out network even with guys doing VPN from remotest parts of the world. The page is only 14 KB.
Its a web-based software that serves HTML via Apache over HTTPS. Client is using IE8 browsers.
We did network trace and found that not only number of bytes differ from our end to the trace at client's end, even encrypted packet sequence also differ (after a while in the stream). But that happens for successful request too!
Has someone experienced similar issue? What could corrupt the stream?
PS: I'm not too optimistic on getting answer here and going to post it to serverfault anyway. If someone thinks its off-topic, please feel free to close it.
It may be the operation aborted scenario which throws an error in IE7, but stops processing silently in IE8.
The HTML file is being parsed, and encounters a script block. The script block contains inline script which creates a new element and attempts to add it to the BODY (document.body.appendChild(newElem)) element before the closing BODY tag has been encountered by the parser. Note that if I removed the highlighted DIV element, then this problem would not occur because the script block’s immediate parent would be BODY, and the script block’s immediate parent is immune to this problem.
Unfortunately the operation aborted dialog was always thrown at the top-level of a web page, even if the problem occured in an iframe. In fact, in most scenarios that we encountered, ad injection in an iframe was usually the root cause of this error. After the user dismissed the error dialog, Internet Explorer would navigate away from the page.